Hi Sohail, I would treat it as a input.
@browser.input(:value=>"Add New Customer").click Or any of the above. Joe On Mon, Feb 4, 2013 at 8:20 AM, Sohail Mirza <[email protected]> wrote: > Oscar, > > if i am not wrong, the following URL tells to record it as a button. > > http://wiki.openqa.org/display/WTR/HTML+Elements+Supported+by+Watir > > Am i missing some important point here? > Thanks > > > On Mon, Feb 4, 2013 at 5:18 PM, Oscar Rieken <[email protected]> wrote: >> >> well its an image and you are telling watir to look for a button >> >> http://rdoc.info/github/jarib/watir-webdriver/master/Watir/Element >> >> >> On Mon, Feb 4, 2013 at 8:15 AM, Sohail Mirza <[email protected]> wrote: >>> >>> Hi, >>> >>> i have following html code for input type "image" >>> >>> <input type="image" src="/MyTestDemo/Images/add.png" value="Add New >>> Customer" data-bind="visible: IsAddAllowed,click: $root.AddNewCustomer" >>> class="ui-button"> >>> >>> How can i perform click event on above? >>> i am trying the following but failing >>> >>> @browser.button(:src,"/MyTestDemo/Images/add/").click >>> @browser.button(:class => "ui-button").click >>> >>> Please >>> >>> Thanks >>> >>> -- >>> -- >>> 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] >>> >>> --- >>> You received this message because you are subscribed to the Google Groups >>> "Watir General" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >> >> >> -- >> -- >> 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] >> >> --- >> You received this message because you are subscribed to the Google Groups >> "Watir General" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > > -- > -- > 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] > > --- > You received this message because you are subscribed to the Google Groups > "Watir General" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- 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] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
