Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Capture values from drop down list
#1
Solved: 10 Years, 9 Months, 1 Week ago
Hi,

In my application, we have some fields which are dependent to each other. For eg: when you select a value from a field, the other field values changes. These fields are drop down list fields. I need to verify the values in these drop down list fields. For that I think I need to capture the values from drop down list and compare them to the data tables. Could anyone please help me how to capture all the values from drop down list field?

Thanks
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
these values must be there in an array of some property. use object spy to find out
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 10 Years, 9 Months, 1 Week ago
Thanks Ankur. I was able to get all the list values in to an array. Now I want to compare with the data table (which I created with Expected value). How should I get the values from Data table so that I can compare with the list array. How to write this script?
Reply
#4
Solved: 10 Years, 9 Months, 1 Week ago
Dear Lakshmi,

You can try the following code and if you need anything more let me know..
Code:
NT_ListCount = Browser("xx").page("xxx").WebList("xxxx").GetROProperty("items count")
DataTable.LocalSheet.AddParameter "yyyy ",""
For ILoop=2  to NT_ListCount
      DataTable.SetCurrentRow(ILoop-1)        
      DataTable("NetWork",dtLocalSheet) =Browser("xxxx").Page("xxx").WebList("yyy ").GetItem(ILoop)
       Next

Thanks
Sridhar
Reply
#5
Solved: 10 Years, 9 Months, 1 Week ago
Thanks Sridhar.
It worked.
I have another question,
Get Row Count method gets the number of rows in the longest column, but how to get the row count of a particular column?

Thanks.
L
Reply
#6
Solved: 10 Years, 9 Months, 1 Week ago
Dear Lakshmi,
You are saying rowcount of a particular column...Can you give me some example like are u getting valuese from Webtable or weblist ...

Regards
Sridhar
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need to verify the drop down values based on condition santhoshmscsoftware 1 2,714 05-04-2016, 11:28 PM
Last Post: supputuri
  Drag and drop issue excellentpawan123 0 2,599 01-13-2015, 05:04 PM
Last Post: excellentpawan123
  Drop down list class is a link thotamurali 2 3,983 08-22-2014, 05:48 PM
Last Post: thotamurali
  Selecting values from drop down using QTP. prempujaripati 2 46,376 06-26-2014, 06:06 PM
Last Post: rasmirani
  issue in drag and drop excellentpawan123 0 2,207 05-15-2014, 04:36 PM
Last Post: excellentpawan123

Forum Jump:


Users browsing this thread: 1 Guest(s)