Selenium WebDriver for Ruby

# encoding: utf-8 require 'selenium-webdriver' driver = Selenium::WebDriver.for :phantomjs driver.manage.timeouts.implicit_wait = 10 driver.manage.window.resize_to 1920, 1080 driver.get 'https://www.google.com' element = driver.first :css, 'input[name="q"]' element.send_keys 'Google' # some code

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.