Ask a Question

Working with Dropdown

prabhjot88singh
Contributor

Working with Dropdown

Hello team,

 

I have application and i would like to work with dropdown option for my website.

 

Specially i need to first click on dropdown and then select first item from the list.

 

Please share the steps for Keyword Test, attached is the screenshot where I need your assistance.

 

Could you please assist in the same.

9 REPLIES 9
tristaanogre
Esteemed Contributor

What have you tried?  Have you used Object spy to figure out the object and it's methods?  You can try recording selecting the item and see what TestComplete finds.  Once you do so, you can make whatever modifications you want.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

yes, i have tried working with what Testcomplete finds during recording of the dropdown

 

However, whenever i playback the recorded steps I do not get the item selected and it says unable to find keyword dropdown.

 

Best,

Prabhjot

trajmo
Occasional Contributor

Try to catch the item you want to select with object spy with point and fix and choosing the specified item and press Shift+Ctrl+A in this way you can see if the class of the dropdown is recognized.

I had the same problem with selecting the dropdown items on desktop application build in Delphi, after adding the class of the dropdown Tools->Current Project Properties->Open Aplication->Text Recognition all items from the dropdown were recognized.

I had also follow the steps from the link Compiling Delphi 2007 Applications With Debug Information  and rebuilding new .exe my application is working more fast and stable, the controls are recognized.

 

 

 

Tried , but still Testcomplete is unable to identify the dropdown element.

 

Can we schedule a call sometime and I can screen share you the issue.

 

Best,

Prabhjot

Your error sounds like one of timing where the drop down control is perhaps not available immediately upon selection.  Is there an activity you're doing before you attempt the drop down that may require the page to load or refresh?


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

Nopes, no other activity,

It is a simple dropdown click which is not being recognised by TestComplete keyword script

So, it cannot find the drop down?  

There's an "Additional Info" panel on the log for that error.  Can you provide that information?

Also, what was mapped for the drop down control?  Are there variable components in the properties (ID's, etc) that change from run to run?  It might have mapped fine the first time but might need to be adjusted.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

Hello,

 

There the logs:

 

The object with the specified attributes does not exist.

Possible causes of the error



Tested object:
Aliases.browser.pageMyOptrustPensionOnlineServic.panel.panel.panel.panel.nav.link
(Sys.Browser("chrome").Page("https://penweb-uat-web.penweb.local/member/penweb/app/dashboard").Panel(0).Panel(0).Panel(0).Panel(0...))

 

Also, please note these are not variable properties, Link dropdown has the same properties everytime it loads.

 

Lets setup a call. Please assist.

 

Best,

Prabhjot

TanyaYatskovska
SmartBear Alumni (Retired)

Hi @prabhjot88singh,

Based on the error you get, TestComplete cannot find the object. It means that mapping criteria have been changed since the time you had created the test. It's worth checking the criteria you use to make sure that they are reliable (contain IDs, names, etc.).

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



cancel
Showing results for 
Search instead for 
Did you mean: