Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to check if a value is selected in weblist
#1
Solved: 11 Years, 5 Months ago
HI, i need some help on how to check if a value existed in weblist.

ie. i need to enter mulitple address for a company, i want the script can be flexible, by checking if certain address already exists then don't add. the address code is a weblist value. Please attachment


Attached Files
.doc   How to script this.doc (Size: 58 KB / Downloads: 90)
Reply
#2
Solved: 11 Years, 5 Months ago
Hi Jenny
You mean if the address type "home address" already exists in the maintenance screen then don't add, else add address for home address.
If this is the case then, check the index value for each previous address types and take the index for looping:
Code:
i=0
flag=0
do While (Browser().Page().WebList("index:="&i).Exist(1))
'ObjExcelSheet.Cells(x,y).value -> is for address type
If (StrComp(Browser().Page().WebList("index:="&i).getROProperty("value"),"home address"=0) Then
' Dont add the address
flag=1
Exit do
End If
If flag=0 Then
' add the address for address type "home address"
Browser().Page().WebList("index:="&i).Select "home address"
End If
Reply
#3
Solved: 11 Years, 5 Months ago
thank you, i will try this
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  WEBLIST shayk1985 3 5,659 05-17-2018, 11:49 AM
Last Post: Ankur
  DataGrid: double click on selected row robertosalemi 0 4,470 05-12-2016, 03:00 PM
Last Post: robertosalemi
  Weblist selection diya 11 21,502 06-16-2015, 08:27 PM
Last Post: rajpradeep32
  Comparing webtable data with weblist and webelements in other webpage arnav 1 5,878 04-18-2014, 10:01 PM
Last Post: Parke
  Unable to select value on weblist ShekharUlli 3 5,724 09-26-2013, 08:58 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)