What is the best way to automate Dropdown which have lot of values to select (Eg: State Dropdown)
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the best way to automate Dropdown which have lot of values to select (Eg: State Dropdown)
Can anyone suggest me:
1. how can i automate State dropdown which have lot of values to select (By Using TestComplete and JavaScript)
As of now i have created object of some values and clicking on them in a simple way. But it's not convenient.
I want to select one state (Which I want to pick from Excel File) from State Dropdown.
2. Is there any way to select the value from dropdown after getting the list of values with Find Element. (Like we do
most of the time in selenium)
Eg of selenium:
List L = Dropdown.findElemets (.......................);
L.selectByName ("Pass the name of the value that you wanna select from the Dropdown");
Like this, is there any way to do so with Test Complete Also?????
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When i try to pick "+WhatToClick+" from excel file like 'New York' , Xpath is not selecting the item. But when i pass the excat value in the xpath instead in the excel file, It's working for me. Can you please suggest a better way to pass the text in the xpath as a variable??
Xpath = //span[contains(text(), 'New York')].Click(); --- working for me
WhatToClick = excelSheet.Cell("A", 3).Value; Where teh value is 'New York'
XPath = //span[contains(text(), "+WhatToClick+")].Click(); ---- Not working for me where WhatToClick is picking from the excel file.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
lets try to do it like this:
WhatToClick = "'"+excelSheet.Cell("A", 3).Value+"'"
put single quote before and after the WhatToClick
TestComplete QA Engineer
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It worked for me. Thank you so much

- « Previous
-
- 1
- 2
- Next »
- « Previous
-
- 1
- 2
- Next »