Launching browser in Selenium Ruby

We can start firefox browser using below script. Save below script in a file called test.rb

To execute below file fire below command in command prompt.

Ruby test.rb

require "selenium-webdriver"

#start the firefox browser
driver = Selenium::WebDriver.for :firefox
driver.navigate.to "https://www.softpost.org"
driver.manage.window.maximize

driver.quit

You may also like...