Forum Discussion

mayursheth1's avatar
mayursheth1
Contributor
7 years ago

Unable to select the country name from dropdown

Hi Team,

 

am beginer to TestComplete and don't have much knowledge on programming.

 

Query:
On contacts section  i have 2 country dropdowns , when am spying it on first one which is mandatory in the section on first time it highlights properly but while running it selects the below country dropdown value.(PFA video for reference)

 

What i have tried:

1)Unable to Map as new object as this has been identified in different section and now in this section it shows (while spying) already exists.

2)Tried with Xpath but Click method is not showing for it.(below JS)

function OI()
{
var Page = Sys.Browser("chrome").Page("*");
Page.FindChildByXPath("//font[text()='Country of Registration :']//following::td//option").Click();

}

 

Gives attached error message.

 

Please let me know if any actions/Methods available in TC which i can use it to identify uniquely.

 

Thanks in Advance :)

Mayur Sheth