Skip to content

Instantly share code, notes, and snippets.

@limingzju
Created December 20, 2016 01:59
Show Gist options
  • Save limingzju/1ca63ededd09fac73696a15285b7ff9a to your computer and use it in GitHub Desktop.
Save limingzju/1ca63ededd09fac73696a15285b7ff9a to your computer and use it in GitHub Desktop.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
profile = webdriver.FirefoxProfile()
profile.accept_untrusted_certs = True
driver = webdriver.Firefox(firefox_profile=profile)
#driver.get("https://10.240.129.198:8443/")
#elem = driver.find_element_by_id("viewer")
#elem.click()
for i in range(10):
print i
driver.find_element_by_tag_name('body').send_keys(Keys.COMMAND + 't')
driver.get("https://10.240.129.198:8443/")
elem = driver.find_element_by_id("viewer")
elem.click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment