Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to check if a value is selected in weblist
#1
Solved: 10 Years, 9 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: 76)
Reply
#2
Solved: 10 Years, 9 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: 10 Years, 9 Months ago
thank you, i will try this
Reply


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

Forum Jump:


Users browsing this thread: 1 Guest(s)