Highlighted
Absent Member.
Absent Member.
348 views

UFT does not recognize drop-downs until I manually click them.

I have two drop-down lists, the second one gets populated when an item in the first drop-down is selected.  This works just fine if I first manually select an item from both drop-downs. However, if I close the brower and come back in, and run the script without manually selecting any values, the script can't find the second drop-down. 

 

 

Browser("Cubs 3 - Test").Page("Cubs 3 - Test").WebList("Units").Select "Item 1 in first dropdown"
Browser("Cubs 3 - Test").Page("Cubs 3 - Test").WebList("Units_2").Select "Item 2 in first dropdown"

Anyone run into  a situation like this? 

 

 

 

0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Re: UFT does not recognize drop-downs until I manually click them.

Have you tried using child objects approach... Issues like these are usually solved by using ChildObjects


Accept as solution/Give Kudos to the author if the piece of information answered/helped you to solve your problem.
All the thoughts here are mine not related to my employer nor anyone.
0 Likes
Highlighted
New Member.

Re: UFT does not recognize drop-downs until I manually click them.

Try to trigger OnBlur or OnChange events.

 

Browser("Cubs 3 - Test").Page("Cubs 3 - Test").WebList("Units").Select "Item 1 in first dropdown"

Browser("Cubs 3 - Test").Page("Cubs 3 - Test").WebList("Units").FireEvent "OnBlur"

Wait 1
Browser("Cubs 3 - Test").Page("Cubs 3 - Test").WebList("Units_2").Select "Item 2 in first dropdown"

Accept as solution/Give Kudos to the author if the piece of information answered/helped you to solve your problem.
All the thoughts here are mine not related to my employer nor anyone.
Test Automation Ecstasy
0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Re: UFT does not recognize drop-downs until I manually click them.

Try this.

 

Setting.WebPackage("ReplayType") = 2

Browser("Cubs 3 - Test").Page("Cubs 3 - Test").WebList("Units").Select "Item 1 in first dropdown"
Browser("Cubs 3 - Test").Page("Cubs 3 - Test").WebList("Units_2").Select "Item 2 in first dropdown"
Setting.WebPackage("ReplayType") = 1

_____________________
Rajkumar Rajangam
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.