python chrome selenium

#coding=utf-8
from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument("--start-maximized")
options.add_argument("disable-infobars")

driver = webdriver.Chrome(chrome_options=options);
driver.implicitly_wait(30)
#driver.maximize_window()
driver.get("http://192.168.1.12")


driver.find_element_by_id("txtName").send_keys("test")
driver.find_element_by_id("txtPassword").send_keys("123")
driver.find_element_by_id("BtnLogin").click()


driver.find_element_by_link_text("data").click()
driver.find_element_by_link_text("bak").click()

 
      

#driver.quit()

 

posted @ 2018-01-23 11:03  Ender.Lu  阅读(142)  评论(0编辑  收藏  举报