Loop test page
We should be familiar with the different loops available in watir
write a script that will click on the button bellow 5 times
each time you click on the button, the page will refreshand a text will appear telling you how many times you have clicked on it
You will have to write 2 scripts, one using the .times method and the other using a while loop
# The first example will be done using a while loop
counter = 1
while(counter <= 5)
browser.button(:name, "submit").click
counter = counter + 1
end
# The second example will be done using the ruby function 'times'
5.times do |q|
browser.button(:name, "submit").click
end
Later, you can write a test that validates the message displayed on the page for the counts