Skip to content

Instantly share code, notes, and snippets.

@KarambaKG
Created February 19, 2018 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KarambaKG/23ac3a08582feb5effed51469f023ad4 to your computer and use it in GitHub Desktop.
Save KarambaKG/23ac3a08582feb5effed51469f023ad4 to your computer and use it in GitHub Desktop.
gem 'selenium-webdriver', '2.53.4'
require 'selenium-webdriver'
driver = Selenium::WebDriver.for :firefox
driver.navigate.to 'https://mail.ru'
sleep 2
element = driver.find_element(id: 'mailbox__login')
element.send_keys 'test_test_1901@mail.ru'
element = driver.find_element(id: 'mailbox__password')
element.send_keys '123456qwer'
element = driver.find_element(id: 'mailbox__auth__button')
element.click
sleep 6
element = driver.find_element(class: 'b-nav__link')
element_class_attribute = element.attribute('title')
puts element_class_attribute
driver.quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment