Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Varying items in the dropdown
#1
Not Solved
I am new to QTP and i am working on weblist which contains multiple values.For the first iteration there will be 3 items in the dropdown and on subsequent iteration there will be only 2 items in the dropdown.I have used the below code to access the values from the dropdown.But i am not able to access the second value(item) from dropdown

Code:
Cnt=Browser("Browser").Page("page").WebList("weblist").GetROProperty("items count")
For i=1 to cnt step 1
Browser("Browser").Page("page").WebList("weblist").select (i)
Browser("Browser").Page("page").WebButton("button").Click
Next

Kindly Help

Thanks in advance
Reply
#2
Not Solved
try using for i=0 to cnt-1...
Reply
#3
Not Solved
Try this
Code:
Cnt=Browser("Browser").Page("page").WebList("weblist").GetROProperty("items count")
For i=0 to Cnt - 1
Browser("Browser").Page("page").WebList("weblist").select (i)
Browser("Browser").Page("page").WebButton("button").Click
Next
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Different Type of Dropdown Selector zunebuggy 6 3,396 05-01-2018, 06:46 PM
Last Post: zunebuggy
  [UFT] [WPF] DataGrid: get items of ControlTemplate robertosalemi 0 3,484 07-14-2016, 07:52 PM
Last Post: robertosalemi
  SwfList: unchecked all items robertosalemi 0 1,952 12-21-2015, 03:46 PM
Last Post: robertosalemi
  Select Menu items shilpaS 1 7,072 06-19-2015, 01:23 AM
Last Post: supputuri
  Upgraded QTP 11.0 to UFT 11.53, Object Index Properties are varying Raghava M 0 2,180 01-28-2015, 06:02 PM
Last Post: Raghava M

Forum Jump:


Users browsing this thread: 1 Guest(s)