Selecting a list item in a WebElement
Question ID: 108626
1
0

Our application has an object that I thought should show up as a WebList, but it is coming as a WebElement. The list is a list of states that can be selected for an address form. The problem is, all the items in the list are also showing as WebElements but we are not able to click them to select them.

Browser("browser").Page("page").WebElement("element").Click

Marked as spam
Posted by (Questions: 387, Answers: 66)
Asked on September 25, 2018 8:42 pm
260 views
Answers (1)
1
Private answer

Often if you change the Replay Type from Event to Mouse, it will solve this type of issue. Try changing your code as follows:

Setting.WebPackage(''ReplayType'') = 2 'Mouse
Browser(''browser'').Page(''page'').WebElement(''element'').Click
Setting.WebPackage(''ReplayType'') = 1 'Event(Default)

What is ReplayType?

ReplayType is a UFT Web Add-in setting. It can be used to change how the events are replayed on the browser. There are two modes of ReplayType:

*Event (1) - Replay of events using the Browser methods (something similar to DOM).

*Mouse (2) - Replay of events using the mouse and keyboard simulation.

Setting.WebPackage(''ReplayType'') = 2 'Mouse

Setting.WebPackage(''ReplayType'') = 1 'Event(Default)

Marked as spam
Posted by (Questions: 17, Answers: 807)
Answered on September 25, 2018 8:44 pm
0
This worked perfectly! I am now able to select specific items in the list!
( at September 25, 2018 8:46 pm)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top