Re: [wtr-general] input type=image

2013-02-06 Thread Alex Shtayer

Input is a parent class for all inputs (like buttons, checkboxes, 
text_fields and etc), so if you can't use any sub-class of elements due you 
input is a special one (like *input type=image*), you can use just 
browser.input and watir will look for all inputs (buttons, checkboxes, 
unusual and etc) through whole DOM till it match provided attribute 
(:value=Add New Customer)

On Monday, February 4, 2013 3:30:24 PM UTC+2, mc060200778 wrote:

 Perfect Joe, its amazingly working now.
 Now my question is: *how do you know to user @browser.input?*

 The following page does not tells anything to use image as an input
 http://wiki.openqa.org/display/WTR/HTML+Elements+Supported+by+Watir


 Thanks,



 On Mon, Feb 4, 2013 at 5:24 PM, Joe Fleck joefl...@gmail.comjavascript:
  wrote:

 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 mrz...@gmail.comjavascript: 
 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 
  bis...@gmail.comjavascript: 
 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 
  mrz...@gmail.comjavascript: 
 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.
 
  watir-...@googlegroups.com javascript:
  http://groups.google.com/group/watir-general
  watir-genera...@googlegroups.com javascript:
 
  ---
  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 watir-genera...@googlegroups.com javascript:.
  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.
 
  watir-...@googlegroups.com javascript:
  http://groups.google.com/group/watir-general
  watir-genera...@googlegroups.com javascript:
 
  ---
  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 watir-genera...@googlegroups.com javascript:.
  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.
 
  watir-...@googlegroups.com javascript:
  http://groups.google.com/group/watir-general
  watir-genera...@googlegroups.com javascript:
 
  ---
  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 watir-genera...@googlegroups.com javascript:.
  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.

 watir-...@googlegroups.com javascript:
 http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-generalwatir-general+unsubscr...@googlegroups.com

 ---
 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 watir-genera...@googlegroups.com javascript:.
 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.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] input type=image

2013-02-04 Thread Sohail Mirza
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.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [wtr-general] input type=image

2013-02-04 Thread Joe Fleck
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 mrz...@gmail.com 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 bis...@gmail.com 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 mrz...@gmail.com 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.

 watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.com

 ---
 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 watir-general+unsubscr...@googlegroups.com.
 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.

 watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.com

 ---
 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 watir-general+unsubscr...@googlegroups.com.
 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.

 watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.com

 ---
 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 watir-general+unsubscr...@googlegroups.com.
 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.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.