Forum Discussion
Hi,
How many objects you are seeing //font[text()='Country of Registration :']//following::td//option this xpath in your browser window? like in console
Its showing 502 items , but even am not able to click on the dropdown list first then i can try to select the countries from dropdown.
Please suggest if any other options.
- shankar_r7 years agoCommunity Hero
try using below xpath instead of yours and see how it works.
//font[text()='Country of Registration :']//following::td/select
- mayursheth17 years agoContributor
Now this is selecting the dropdown but how to select the particular Country from the list?
Its datadriven activity (kept data in the excel) , Please suggest :)
what method or action need to select it?
- AlexKaras7 years agoChampion Level 3
Hi,
A bit of explanation to the code suggested by shankar_r :)
> Its datadriven activity
It is quite a usual thing for the modern web applications when regular combo-box is emulated using, for example, text box and list box elements. Those elements can be wherever within the page markup with the only thing that makes them work been a page script code (everything dependent on this or that library used by page developers).
So, the general approach is to investigate the page (with the opened combo-box) using TestComplete's Object Spy in order to figure-out actual set of UI elements you need to interact with in test code and then decide how to get those elements and how to interact with them.
This is illustrated by Shankar's code: after the click on the combo-box, assuming that it is opened, the code tries to find the UI element with the country name and click the found item.
Related Content
- 2 years ago
- 5 years ago
- 6 years ago
Recent Discussions
- 2 days ago