Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to select a webelement
#6
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi ,
No need to add them into the repository.
try to use the array and descriptive programing:
keep the unique property like 'innertext' in the array.
Code:
list_items = array("item1" , "item2" ,......"item8")

browser().page().webelement("arrow").click

for i = 0 to ubound(list_items)
if browser().page().webelement("class:=use class" , "innertext:=" & list_items(i)).exist then

print "pass"
else
print "fail"
end if
next


Note: use the identification property like 'class' , 'html id' with the use of regular expression to identify the list items , and 'innertext' to make them unique.
Reply


Messages In This Thread
How to select a webelement - by silpavinod - 10-09-2012, 12:13 PM
RE: How to select a webelement - by ssvali - 10-09-2012, 02:40 PM
RE: How to select a webelement - by silpavinod - 10-10-2012, 12:14 PM
RE: How to select a webelement - by harishshenoy - 10-11-2012, 10:11 AM
RE: How to select a webelement - by silpavinod - 10-11-2012, 02:59 PM
RE: How to select a webelement - by harishshenoy - 10-11-2012, 06:50 PM
RE: How to select a webelement - by silpavinod - 10-12-2012, 03:55 PM
RE: How to select a webelement - by mshivnath - 07-13-2014, 10:50 PM
RE: How to select a webelement - by spchan - 01-05-2016, 09:01 PM
RE: How to select a webelement - by vinod123 - 01-06-2016, 09:47 AM
RE: How to select a webelement - by vinod123 - 01-06-2016, 10:13 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation WebElement("WebElement").Click is not working sia sharma 7 23,959 09-28-2016, 08:58 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)