Skip to content

Instantly share code, notes, and snippets.

@shoesCodeFor
Last active April 24, 2019 16:14
Show Gist options
  • Select an option

  • Save shoesCodeFor/5512803d4f859fd56a0b55fb44d4f185 to your computer and use it in GitHub Desktop.

Select an option

Save shoesCodeFor/5512803d4f859fd56a0b55fb44d4f185 to your computer and use it in GitHub Desktop.

Revisions

  1. shoesCodeFor revised this gist Apr 24, 2019. No changes.
  2. shoesCodeFor renamed this gist Apr 24, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. shoesCodeFor created this gist Apr 24, 2019.
    14 changes: 14 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    require "selenium-webdriver"

    driver = Selenium::WebDriver.for :chrome
    wait = Selenium::WebDriver::Wait.new(:timeout => 18)
    driver.navigate.to "https://someloginsite.web"
    sleep 2
    element = driver.find_element(:class, "username")
    element.send_keys "[email protected]"
    pwd = driver.find_element(:class, "password")
    pwd.send_keys "MyPasswords"
    submit_btn = $driver.find_element(name: "submit")
    submit_btn.click
    sleep 3
    puts $driver.title