Lampson
2 years agoOccasional Contributor
Missing the step to select an item in a dropdown in recording scripts
I'm trying to click a dropdown and select "Agent" in the dropdown(picture1.png, picture2.png), which will open a popup,but the record scripts doesn't list the step of selecting "Agent"(picture3.png)....
- 2 years ago
Here's two things you can try:
- If you can access the option using arrow keys, you can add a 'Keys' step that uses your 'whole dropdown' object, and set its input to '[Down][Down][Down][Down][Down][Down][Enter]'. This will get you to 'Agent', without having to map anything inside the box.
- If that doesn't work, the more complex idea would be to manually create the Namemapping object you are looking for. In the Namemapping file, add a new object and select something you know you don't have mapped. You can then take that object and change its selector to an xpath equal to this formula:
the current xpath selector for your entire dropdown/div[7]
or
//div[@id='globalDropdownActionItems']//div[7]
Once saved, try Highlighting the object, with the dropdown open. TestComplete should highlight the Agent (the seventh div object) and then you can set up a 'Click' step with that object.
Good luck,
- If you can access the option using arrow keys, you can add a 'Keys' step that uses your 'whole dropdown' object, and set its input to '[Down][Down][Down][Down][Down][Down][Enter]'. This will get you to 'Agent', without having to map anything inside the box.