Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.
Sean Gregory edited this page Oct 9, 2021 · 3 revisions

Welcome to the webdriver wiki!

navigation

browser = Webdriver::Browser.new :chrome
browser.goto "http://www.google.com"
browser.goto "http://www.yahoo.com"
browser.back
browser.forward
browser.refresh
File.open("test.png", "w") do |f|
  f << Base64.decode_string(browser.screenshot)
end

scripts

browser.execute_script("alert('hello world')")
browser.alert # hello world
browser.dismiss_alert
Clone this wiki locally