The button only occupies the left portion of the EM that holds it. The down
arrow icon next to it is part of the container holding the button, so if
you are clicking the little down arrow icon you are clicking on the EM or
maybe the div/cell that holds the EM tag.. Maybe try clicking that instead
of the button and see what happens?
That could be a little tricky however since normally em is just a text
formatting tag ('emphasis') and is not an element watir supports since this
particular usage is well um er lets just say 'creative'. So you might have
to identify it as a generic element and use the class or ID to select it.
You could also try clicking on the cell and see if that does anything for
you.
If neither of those work then it might be time to talk to the ExtJS folks
and ask them how to automate this darned control (I'm pretty sure sikuli
could do it if nothing else works)
On Wednesday, April 25, 2012 11:55:31 AM UTC-7, mndude wrote:
>
> I have a "split button" that when clicked in the middle or left side will
> perform a default action on that page. But if clicked on the right side it
> will drop down a menu to select from a set of actions. I can't get Watir
> webdriver to click and drop down the menu. It only is able to click and
> perform the default action in the page.
>
> There is a similar item at
> http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/kitchensink/index.html#basic-toolbar
>
> Try the Menu Button drop down
>
> The html of my button is somewhat similar to the link above and I'm having
> the same problem getting Watir webdriver to click on the right side and
> drop down the menu:
>
> <td class="x-btn-mc">
> <em id="ext-gen49" class="x-btn-split" unselectable="on"
> style="background-color: transparent;">
> <button id="ext-gen22" class=" x-btn-text"
> type="button">Add</button>
> </em>
> </td>
>
>
> Is there a way to get Watir webdriver to click somewhere besides the
> middle of an object? I wonder if I could click a few pixels to the right
> of center if the menu would appear.
>
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]