Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selecting a state from a weblist
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi Guys,

I came across some simple but unusual problem. Please reply if you have any suggestions.

1) I am selecting a state from weblist object

Code:
Browser("abc").Page("xyz").Weblist("state").Select Datatable("Global","State")

So I am able to select NewYork, Texas, Florida by passing through the Datasheet but not able to select Massachusetts.(1) I checked that Massachusetts is present in the drop down of the object.(2)Checked the spelling and the Case of text. As of now I am using If statement to bypass it. Write if you have any suggestions for this prob.
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
You may want to check if an Datatable entry has extra space at end of text. The Weblist selection does a character to character comparison on text so a space would matter. Hope this helps.
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi ,

U try in two ways :

1st way :
Give trim functions for value retrieved from datatable as given below.(This will eliminates any trailing or leading blank spaces & return the string alone)

Code:
Browser("abc").Page("xyz").Weblist("state").Select trim(Datatable("Global","State"))

2nd Way:
Just perform Recording for the selection of "Massachusetts" value from Weblist.
script will be generated as :
Code:
Browser("abc").Page("xyz").Weblist("state").Select "Massachusetts"

Just Copy the Massachusetts Value & paste into the datatable sheet & Save the script.

Now try to re-execute. I hope it will be able to select the required value from datatable.
Reply
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
Thanks guys it was the empty blank space in the Datatable cell that was causing this problem it is solved now
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Webtable objects recognise as weblist in UFT 12.5 Sharad Kumar 0 1,185 12-06-2018, 04:57 PM
Last Post: Sharad Kumar
  Searching for and selecting row in Datawindow zsl0009 0 2,839 08-04-2015, 01:02 AM
Last Post: zsl0009
  Problem selecting in a dropdown menu during playback. qemls29 9 13,162 07-28-2015, 05:44 PM
Last Post: Sharan
  Selecting Link Magad 1 2,853 11-07-2014, 03:56 AM
Last Post: PrateepKaraval
  selecting values from the dropdown webelement poojaarora014 3 18,054 04-22-2014, 12:12 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)