Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Choice in a WebList
#1
Solved: 11 Years, 4 Months ago
Hello,

I am currently beginning to use QTP and am automating simple tests.
I have to do a test on a web application, where there is a WebList with several hundreds possible choices. All of them is finishing by "- Active" or "- Inactive". The test have to choose one of these choices finishing by "- Active", no matter which one exactly. The problem is that of course the texts are changing frequently from active to inactive and vice-versa, so we cannot select one precisely and hard-code it.

For the moment I though about two possible solutions (but do not know how to implement them):

1- Use a regular expression in the .Select of the WebList. I tried by using the object repository but did not find where I can do that, so I am beginning to think it is not possible.

2- Extract all the data of the WebList in a VB structure and then test each entry, until finding one which is OK and that I will use in the .Select. I do not know if it is possible and how to do it.

Can you tell me if one of these solutions is possible, and how? Or maybe tell me another better solution!

I hope I have been clear enough,

Still
Reply
#2
Solved: 11 Years, 4 Months ago
I posted a video on my blog some time back describing how to choose values from a web table in QTP
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 11 Years, 4 Months ago
Hello Ankur
i have seen that video but the solution is for webTable
now here my proble is quite same, let me explain that,

suppose i have one Listbox/DDLB in my web script that contain values like
val1
val2
val3
now with the use of script i have to found the value from that.
suppose i want to found val2.
then how it could be possible?
please Explain with Script if possible.
Reply
#4
Solved: 11 Years, 4 Months ago
Thank you very much Ankur, I used your video and added some stuff in my code, it worked well, it was not so complicated in fact!

Regards,
Still
Reply
#5
Solved: 11 Years, 4 Months ago
Nice to hear that Still.
Infact that is how I want people should approach any problem, instead of getting a ready-made answer they should pick up with a hint, the way you did.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  WEBLIST shayk1985 3 5,618 05-17-2018, 11:49 AM
Last Post: Ankur
  Weblist selection diya 11 21,376 06-16-2015, 08:27 PM
Last Post: rajpradeep32
  Comparing webtable data with weblist and webelements in other webpage arnav 1 5,816 04-18-2014, 10:01 PM
Last Post: Parke
  Unable to select value on weblist ShekharUlli 3 5,678 09-26-2013, 08:58 AM
Last Post: basanth27
  Not able to select weblist value automation2012 2 3,500 09-20-2013, 07:19 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)