How to select a value in a dropdown identified as a WebElement
Question ID: 105912
1
0

In our application, we have a dropdown list that identifies in UFT as a WebElement. When I record on this object, it only records the click on the object but doesn’t record selecting the value. How can I get this to work?

Here’s a publicly exposed example of a similar drop down:
http://demos.telerik.com/kendo-ui/dropdownlist/cascadingdropdownlist

Note, UFT wouldn’t even record the click on the object on this web site, so you have to SPY on the Categories object then from the spy, click the "Add Object to Repository" button, then open the OR and drag the object to the UFT editor!

Marked as spam
Posted by (Questions: 387, Answers: 66)
Asked on January 30, 2015 11:07 pm
307 views
Answers (3)
1
Private answer

You can use the Object property to set the innerText of the object

Browser(''Example of cascading DropDownL'').Page(''Example of cascading DropDownL'').WebElement(''Select category...'').Click

Browser(''Example of cascading DropDownL'').Page(''Example of cascading DropDownL'').WebElement(''Select category...'').Object.innerText = ''Confections''

Marked as spam
Posted by (Questions: 17, Answers: 807)
Answered on January 30, 2015 11:07 pm
0
Perfect!! Thanks!
( at January 30, 2015 11:07 pm)
0
Private answer

@rahul472, I know this is an older post but were you able to get the answer of your question or did you get the solution?

Marked as spam
Posted by (Questions: 0, Answers: 1)
Answered on May 13, 2018 7:12 pm
-1
Private answer

@Michaeldx

object.innerText method is selecting the value but unable to click on the object. please do you have any alternative solution the give me.

Marked as spam
Posted by (Questions: 0, Answers: 1)
Answered on April 18, 2018 2:26 pm
EyeOnTesting

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

X
Scroll to Top