Željko Filipin's Blog on Software and Testing

Test like you do not need the money.

Find Element by XPath

without comments

p6090033.jpg

I had to click a h4 headline.

<h4 id="addproject">Create a new project</h4>

This did not work.

browser.h4(:id, "addproject").click

I posted a question to wtr-general mailing list and Angrez Singh was kind enough to help.

This will click h4 headline.

browser.element_by_xpath("//h4[@id='addproject']").click

Written by Željko Filipin

July 3rd, 2007 at 4:18 pm

Posted in Watir

Tagged with

Leave a Reply