3
<span class="titleBar-link">
<a href="javascript:void(0)" data-click-handler="openBYOTView,omnitureClickHandler"     data-omniture-rfrr="ROUNDTRIP">
<span data-icon="roundtrip"></span>See Roundtrip Combinations
</a>
</span>

From the above HTML code, I want to click on element <span class="titleBar-link">, for that I used the following code

Browser. span(:class => 'titleBar-link').click

When I am running this code with IE(Watir-Classic), this step was executed but really it didn’t click on that element. It worked well with Watir-Webdriver.

Any help is appreciated.

4

2 回答 2

2

尝试点击链接?

browser.span(:class => 'titleBar-link').link.click
于 2012-10-13T02:32:28.633 回答
-1

你也可以使用

browser.link(:xpath => "//span[@class='titleBar-link']/a[0]").click
于 2012-10-20T00:48:29.860 回答