How to put list

11 views
Skip to first unread message

rocky

unread,
Jun 16, 2015, 7:27:34 AM6/16/15
to watir-...@googlegroups.com
Hi 

how to put list in watir webdriver

Please find the attachment screenshot before reading below points.

1)i have to click "M K" link and then "teley"

2)in selenium we can put list based on index we can click but in watir unable to do more over how to write xpath to put in list

Advance thanks

---Siddu.
helpme.png

Velraj Prabhu

unread,
Jun 17, 2015, 1:35:50 AM6/17/15
to watir-...@googlegroups.com
Hi Siddhu,

Try the below mentioned code

customer_list = browser.div(:id,"customer-list-item").divs(:class,"customer")

customer_list.each do |list_name|

    if list_name.div(:class,"customer-info").link(:text,"M K").a.exists?

             list_name.div(:class,"customer-info").link(:text,"M K").a.click

    end

end

-- 
Regards,
Velurajprabhu.B

sridhar ..

unread,
Jun 17, 2015, 6:43:58 AM6/17/15
to watir-...@googlegroups.com
no luck prahu...below error i am getting

 unable to locate element, using {:id=>"customer-list-item", :tag_name=>"div"} (Watir::Exception::UnknownObjectException)


--
--
Before posting, please read http://watir.com/support. In short: search before you ask, be nice.
 
watir-...@googlegroups.com
http://groups.google.com/group/watir-general
watir-genera...@googlegroups.com

---
You received this message because you are subscribed to a topic in the Google Groups "Watir General" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/watir-general/o9rIEX_CDJw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to watir-genera...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages