require "selenium-webdriver" driver = Selenium::WebDriver.for :chrome driver.execute_script("alert('running javascript');")