I am constantly amazed that Watir and Ruby make software testing a web application so easy.
For example finding all the links in a table based on their text starting with a string.
stub = "0 Text"
browser.table(:id,"myTable").links(:text,/#{stub}/).each { |link| puts link.text }
This will return all the links in the table "myTable" with text starting with "0 Text"
Doodle's Geek Monkey by Alastair Montgomery
For example finding all the links in a table based on their text starting with a string.
stub = "0 Text"
browser.table(:id,"myTable").links(:text,/#{stub}/).each { |link| puts link.text }
This will return all the links in the table "myTable" with text starting with "0 Text"
Doodle's Geek Monkey by Alastair Montgomery


0 comments:
Post a Comment