This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ask message, answer = /.*/, add_options_string = answer == /.*/ ? false : true | |
message = message + ' (' + answer.source + ')' if add_options_string | |
begin | |
print message | |
input = STDIN.gets.chomp | |
end while input !~ /^#{answer}$/ | |
input | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assert_have_xpath("//table[@id='items']/tr[@id='item_row_#{id}' and position()=#{position}]") |
NewerOlder