Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'watir'
- #start = new + goto
- b = Watir::Browser.start 'http://www.designious.com/t-shirt-designs?limit=90&mode=list'
- counts = 1
- while counts <= 90
- #find and click on newtab
- btns = b.elements css: '.product-name a'
- btns.first.click(:control)
- #use newtab
- b.windows.last.use
- #search and click buttons
- btns = b.elements css: '.button.btn-cart'
- btns.first.click
- #cloes new window
- b.windows.last.close
- counts+=1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement