from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from time import sleep
driver = webdriver.Firefox()
driver.get('http://192.168.54.213:9038/#/')
driver.maximize_window()
sleep(2)
driver.find_element_by_xpath("//input[@id='loginName']").send_keys('font1')
driver.find_element_by_xpath("//input[@id='password']").send_keys('111111')
driver.find_element_by_xpath("//button[@class='el-button btn btn-primary btn-lg btn-block el-button--primary']").click()
sleep(2)
driver.find_element_by_xpath("//i[@class='btn fa fa-edit fa-fw el-tooltip item']").click()
sleep(5)
driver.find_element_by_xpath("//i[contains(@class,'fa fa-gamepad el-tooltip item')]").click()
sleep(5)
driver.find_element_by_xpath("//img[@alt='打地鼠']").click()
sleep(5)
dianji=driver.find_element_by_xpath('html/body/div[2]/canvas')
ActionChains(driver).double_click(dianji).perform()
# sleep(1)
# ActionChains(driver).double_click(dianji).perform()
# sleep(1)
# ActionChains(driver).double_click(dianji).perform()
# sleep(1)
# ActionChains(driver).double_click(dianji).perform()
# sleep(1)
# ActionChains(driver).double_click(dianji).perform()
# sleep(1)
# ActionChains(driver).double_click(dianji).perform()
# sleep(1)
# ActionChains(driver).double_click(dianji).perform()
sleep(3)
driver.back()
driver.quit()


