0
votes
<tr class="even_row">
    <td colspan="1" rowspan="1">
        <button type="button" onclick="doSubmit('_eventId_addToHouseholdFromOther')">
            <span>
                <i class="icon-arrow-left"></i>
            </span>
        </button>
    </td>
    <td colspan="1" rowspan="1"> … </td>
    <td colspan="1" rowspan="1"> … </td>
    <td colspan="1" rowspan="1"> … </td>
</tr>

Does anybody know, how I can click on this button using watir webdriver?

1
Is the problem with locating the button? Is the button unique (ie is there only one left arrow button) or how do you, as a user, know which button to click?Justin Ko
Yes, it is unique, but it does not have any id, so I don't find any method how I can click on it. I tried this, but it does not work. f.button.div(:id, 'householdToHouseholdDialog').tables(:index => 1).span(:class => 'icon-arrow-left').clickSeda

1 Answers

2
votes

Assuming that the <i class="icon-arrow-left"> element is unique (ie no other i element with the same class exists), you can do:

browser.i(:class => 'icon-arrow-left').click