id Attribute
This is the Watir code you need to click a button that will submit a form using the id attribute:ie.button(:id, "one").click
Forms With No Buttons
There may be input fields on a web page, but no button to submit. Instead, they will allow you to hit Enter/Return on your keyboard. When there is no button to submit the data, we can just submit the form itself.Watir can submit a form by looking at the attributes available in the
id Attribute
Watir code to submit the form using the id attribute:ie.form(:id, "one").submit
name Attribute
Watir code to submit the form using the name attribute:ie.form(:name, "loginform").submit
action Attribute
Watir code to submit the form using the action attribute:ie.form(:action, "login").submit
method Attribute
Watir code to submit the form using the method attribute:ie.form(:method, "get").submit
No comments:
Post a Comment