Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to match weblist data with expected values
#1
Hello All,

I am new to UFT and I have this task where I need to perform a comparision between list of all the items available in a weblist with expected list. And I was told not use any excel or Local/global data sheets.

And this weblist I am talking about is common for different users but with no of items might vary. So I want parametrize this in way that I can use it as function and can use for diffrent users.

Below is the code I am using to capture all the weblist values. Since I am not supposed to use a excel or data sheets. I dont know hoe to compare with expected data.

Code:
all = Browser("B").Page("P").WebList("L").GetROProperty("all items") arr = split(all, ";")


Please help
Reply
#2
It should be a simple thing to achieve.

What are the places where you are allowed to fetch expected data from? (flat file, database, anything else?)
Reply
#3
Hi Ankur,

We basically use parameter.item method to parameter anything, unfortunately our client wants it like that.

So the sample goes like this.

'Browser(b).page(p).weblist("listname").parameter.item("ParameterName") ' we pass name and value in the properties here'

Now this can be used to verify only one value. So is there any possible way to do this for list of parameter values. without using or placing the values in any external sources like Db, excel, datasheets etc?

Thanks in advance.
Reply
#4
I still don't get why they don't want you to use a proper file to store data but if they insist it is indeed doable.

Just store the entire list as a comma (or whatever delimiter you like) separated value in the parameter. Then split the variable and do the comparison.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#5
Can I get a sample Code on how to loop that and compare with the weblist. It would really help a lot
Reply
#6
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to select value from Weblist using QTP neenumaria 4 14,028 08-07-2018, 04:43 PM
Last Post: NovGirl
  finding expected value in webtable Anupama 8 4,291 05-23-2018, 06:20 PM
Last Post: Anupama
  WebElement (only Weblist) is not getting identified in QTP 11, Windows 7 priyaang 3 6,592 06-26-2015, 12:39 AM
Last Post: supputuri
  Application Issue on selecting value from weblist using UFT 12.1 on run sunilkgupta 0 2,664 01-01-2015, 08:22 PM
Last Post: sunilkgupta
  get visible cell data values from webtable Satwik 1 5,028 07-24-2014, 11:57 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)