Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'selenium-webdriver'
- browser = Selenium::WebDriver.for :firefox
- browser.get 'https://www.youtube.com/user/russianstandup'
- count = 0
- while true
- begin
- button = browser.find_element(:class, "primary-header-actions")
- count = count + 1
- button.click
- puts "click #{count}"
- sleep 1
- rescue
- puts "wait"
- sleep 5
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment