Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP 9.2 Checking values in a dropdown list
#1
Not Solved
I am trying to automate an application which uses a lot of forms.
In the dropdown boxes on the form there are about 50-100 values.
What options do I have in QTP to test all values are there, during regression testing. In some of the dropdown boxes you have to select an option. The second dropdown displays values based on the option selected in the first. Will appreciate any help I can get. I am a new QTP user. I was thinking about datatables. Will those help in the scenario above?
Reply
#2
Not Solved
Hi

First of all get the items count for that use getitems count
frame a loop.
then get an item from that list by using getitem(i)
i stands for the number in the list
after getting you can compare the object and write the result if you want.
Reply
#3
Not Solved
Hi

If the order in which items display in your Listbox doesn't change then try this one .Initially Using object Spy get the property "allitems".
In your script store the info in the same format got above in a variable.Get the object's(listbox) allitems property using getroproperty in another variable. compare both strings. You will get true or flase.

Anu
Reply
#4
Not Solved
Hi below link may help for your question.
http://www.allinterview.com/showanswers/37219.html
Reply
#5
Not Solved
Hi everyone,

Thanks for all your suggestions. I was just checking the posts today. Was expecting an email when a reply has been posted.
Anyways I tried creating a standard checkpoint for the WebList and checked the innertext property in the checkpoint properties. So when I run my test the checkpoint passes if the values in the list are the same. If a value is missing or a new value is added later(after recording) the checkpoint fails. Do you guys agree with this solution??
Reply
#6
Not Solved
My Question is related to the same post.
My Application is based out of Java. Where i have 2 dropdowns (where value in second is triggered based on first dropdown).
The problem i am facing is when i select the value from first dropdown, the value is not populated in the second dropdown when done using QTP.

When I do the same manually in my application i.e. I select value from the first dropdown, the values in the second dropdown populates 'onchange' of values in the first dropdown.

Please suggest me as to which method I should use in QTP ..with the help of that i can ask qtp to trigger values in second dropdown.
I tried the below methods but are not working .........
Code:
Browser().page().frame().weblist().fireevent"OnChange"
Browser().page().frame().weblist().fireevent"OnpropertyChange"
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Different Type of Dropdown Selector zunebuggy 6 2,834 05-01-2018, 06:46 PM
Last Post: zunebuggy
  Not able to click text inside the grid dropdown szkapoo 6 4,289 12-20-2014, 09:43 PM
Last Post: supputuri
  Issue related to dropdown selection(Please help urgent) excellentpawan123 2 4,045 05-31-2014, 12:00 PM
Last Post: excellentpawan123
  spell checking of web objects kriday 3 3,763 07-05-2013, 01:37 PM
Last Post: Staff
  Selecting a value from a Dropdown qtpbeginner78 12 17,529 06-10-2013, 11:10 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)