Using a keyword test to select a value in a drop down in Chrome results in the middle value
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using a keyword test to select a value in a drop down in Chrome results in the middle value
I am using Test Complete to test the functionality of a web page which includes some data entry and selection of values from some drop down menus. I am using the "On-Screen Action" to select the value in the drop downs but I am not getting what I expect. Instead of the value I want selected which is a variable being stored in a spreadsheet, it scrolls till the value I want is displayed then it selects the middle value currently being displayed in the drop down. The web page is being tested through Chrome.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you post a screenshot of the keyword test steps that are executing this?
Typically, selecting a drop down is executed by the "ClickItem" method where you pass to that method either the string value of the item to be selected or the integer index of the item. If you are using the ClickItem method, then there may be some difference between the drop down component you are using and how TestComplete typically works with such components.
Please include, also, screenshots of the drop down control in the Object Browser displaying the full Advanced view of the properties of the object and the methods available.
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Robert,
Here is the info you asked for to help flesh out the issue. As you can see I am using the ClickItem method and pulling the value to be selected from a spreadsheet. Although I don't think it makes a difference, I am seeing this behavior with drop downs that contain text as well as drop downs that are integers.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please provide a screen shot like this, both for properties and methods of the object in question.
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, I have two ideas about this:
1) The values in the drop down box that you posted are numerical values. It is possible that the values coming from your spreadsheet are being interpreted as integers or other numeric values and the automation is assuming they are the index to be selected rather than the string. Solution: Make sure that you explicitly format the data in your spreadsheet to be "strings" if they are meant to be strings rather than numerics. This is done by using the ' symbol before the value in the spreadsheet cell.
2) There are other topics on these forums that mention difficulties with recent versions of Chrome and TC not properly selecting values from drop downs. so, if #1 doesn't pan out, I would suggest you contact SmartBear support directly https://support.smartbear.com/message/?prod=TestComplete.
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Robert,
Thanks for the input. The example I showed you is one of three drop downs I am no longer able to navigate, both the website and testcomplete were updated at the same time so I don't know which broke what. One of the menus is all text and it does the same thing so I don't think the behavior is a result of a misdirected attempt to select based on index. I went ahead and tried your suggestion all the same but it didn't make a difference. Oh well, guess I will follow your second suggestion now, time to submit a ticket to SmartBear.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We use TestComplete to test in Oracle and Oracle forms. We deal with drop down lists a lot and I use Keyword scripting for all my testing. To select a value in drop down lists I use 'Keys' as the Method or Property and then click on the three elicpes to open the Edit Parameter popup. Mode = Constant; Type = String, and in Value: I type the value I want to select from the drop down list. Hope this helps and good luck.
