This is just a reminder to myself and anyone else using Watir for Web Application Testing. Nearly any method supports using Regular Expressions within. Brian Vallelunga reminded me of this.
For example:
ie.text_field(:id, /myTextBoxName$/).set("Hello World")
That finds any control that ends with "myTextBoxName" and sets its value
Here is an example using the link method to click a hyperlink using the url attribute:
ie.link(:url, /shtml/).click
This will click the link that matches shtml. RTM!
Now playing: Living On Earth - Living on Earth: February 10, 2006
Ads by The Lounge