*1.
*control = browser.text_field(:id, "Cars")
control.lis.each do |li|
  li.flash
  li(:text, 'Toyota').link(:index, 1).attribute_value("href")
  # li(:text, 'Toyota').link(:index, 1).click
end

*2.*
list.ole_methods if list.ole_object != nil

*3.*
http://www.w3schools.com/xpath/default.asp

Best regards,
Sergii

2011/3/14 Girish <girish.bha...@gmail.com>

> Hey All,
>
> Here is a piece of html
> <ul id="Cars">
>           <li class="selected"><a href="/landing/toyota" ><span>Toyota</
> span></a></li>
>           <li><a href="/landing/honda"><span>Honda</span></a></li>
>           <li><a href="/landing/nissan" ><span>Nissan</span></a></li>
>  </ul>
>
> I have 3 questions:
> 1. How would i iterate over all the li elements and get reference of
> the href element and click on it?
> 2. I tried  list=ie.elements_by_xpath("//ul[@id='channelnames']/li")
>   when i try to print  values of list, i get #<WIN32OLE:0x3225e40>.
>   Where can i get properties for WIN32OLE?
> 3. Where can i get more documentation on accessing elements by XPATH?
>
> Can anyone guide me ?
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com<http://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com>
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to