Launching the Firefox browser using the Watir gem



require 'watir'
driver  = Selenium::WebDriver.for :firefox

browser =

browser.driver.manage.timeouts.page_load = 30
browser.window.resize_to(1000, 600)
browser.window.move_to(0, 0)

## Observation

You should now observe a new Firefox browser window open at the top left hand corner of the screen.

Note: If you see the error message Selenium::WebDriver::Error::WebDriverError (unable to connect to Mozilla geckodriver exit from the IRB session and try again.