Monday, January 25, 2010

Regular expression in Watir method

We can make usage of regular expression in Watir to easily access the dynamic object, for example:
you want to pick a option in select_list which id is : hello_12345, 12345 is dynamic number, so you can write like this:

cframe.select_list(:id, /hello_\d+/).select("Select one option");

No comments:

Post a Comment