Skip to content

Instantly share code, notes, and snippets.

@aaltat
Created October 3, 2017 06:54
Show Gist options
  • Save aaltat/5625296ad81a1083161141c6a98e0553 to your computer and use it in GitHub Desktop.
Save aaltat/5625296ad81a1083161141c6a98e0553 to your computer and use it in GitHub Desktop.
import time
from glance_dom import GlanceDom
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://github.com/robotframework/SeleniumLibrary')
glance = GlanceDom(driver)
issues = glance.get_element('SeleniumLibrary > Issues')
issues.click()
while not glance.get_elements('input ^ js-issues-search#id'):
time.sleep(1)
search = glance.get_element('input ^ js-issues-search#id')
search.send_keys('Tatu\n')
time.sleep(5)
driver.get_screenshot_as_file('C:/foo.png')
driver.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment