Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Different Type of Dropdown Selector
#1
Not Solved
We are testing an in-house web app.  Most fields are WebEdit type, but the dropdowns are not conventional dropdowns.  They are made up of WebElement type objects.  For example, the "dropdown" contains the word Country and has a small down arrow (upsidedown triangle) next to it.  It appears as a typical selector type dropdown, but using Object Spy I see every part of this dropdown is a WebElement.  So I figured out if I used the .Click on the down arrow WebElement, I count the Country selection list to appear.  This works.

When I try this:

 
Code:
Browser("MyBrowser").Page("MyPage").WebElement("selCountry").SetTOProperty "innertext", DataTable("Country", dtGlobalSheet)
  

and my Global data Country column contains UNITED STATES, this does not select UNITED STATES from the list.  It does not error, but it does not select it.  My selCountry is the WebElement of the selection list and if I select UNITED STATES manually and use Object Spy on the UNITED STATES selected, it is the WebElement selCountry and the innertext property is UNITED STATES.  If I select another country, the innertext property is whatever I select.  Why can I not select this at runtime?

Thank you.
Reply
#2
Not Solved
So something new I discovered. If I select UNITED STATES and use object spy on the UNITED STATES text I can add the object as a WebElement. Then if I select (for example) JAPAN, and do object spy I can now add this as a separate new WebElement. Each item in the dropdown list is a separate object. So please help me figure out how I can select (dynamically) a country from the "dropdown" when each is a unique object? I do not know how they coded this, but that is how it works. I hope I don't need a new plugin for this type of web coding.

Thanks again for anyone who can assist.
Reply
#3
Not Solved
May be use Descriptive Programming and pass the country dynamically at run time to identify and select the country?
Reply
#4
Not Solved
Are you able to provide an example?

I thought that I was doing that here:

Browser("MyBrowser").Page("MyPage").WebElement("selCountry").SetTOProperty "innertext", DataTable("Country", dtGlobalSheet)

when essentially this is the same as:

Browser("MyBrowser").Page("MyPage").WebElement("selCountry").SetTOProperty "innertext", "UNITED STATES"

Thank you.
Reply
#5
Not Solved
(04-12-2018, 11:42 AM)Ankur Wrote: May be use Descriptive Programming and pass the country dynamically at run time to identify and select the country?

But I cannot do that because each country name in the list is a unique WebElement object.  I guess I could add every country to the Object Repository.  

This is the way they programmed it.  They are using some third party web app.  I may have to ask them what it is and find a UFT plug-in for it.  All the other objects act as regular object.  It is just the dropdowns that are not typical WebList type objects.


Thanks
Reply
#6
Not Solved
Paste the relevant screenshots of Object Spy for web element with details on what is creating an issue in object identification.
Reply
#7
Not Solved
(04-24-2018, 02:19 PM)Ankur Wrote: Paste the relevant screenshots of Object Spy for web element with details on what is creating an issue in object identification.

I hope I did this right.  I uploaded my screenshot to my Flickr account and got the URL and inserted it here as an image.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  cannot use the type method on object and submit is not working jove1776 5 8,813 01-27-2015, 10:08 PM
Last Post: Parke
  Not able to click text inside the grid dropdown szkapoo 6 4,631 12-20-2014, 09:43 PM
Last Post: supputuri
  Issue related to dropdown selection(Please help urgent) excellentpawan123 2 4,270 05-31-2014, 12:00 PM
Last Post: excellentpawan123
  How to import .xlsx file type to QTP qtped 3 6,656 03-27-2014, 01:33 PM
Last Post: Ankur
  type mismatch error in QTP QAlearningQTP 1 7,122 02-04-2014, 08:14 AM
Last Post: QAlearningQTP

Forum Jump:


Users browsing this thread: 2 Guest(s)