Exemplo n.º 1
0
 def setUp(self):
     print("开始登陆")
     global browser,denglu
     browser=webdriver.Firefox()
     denglu=method()
     denglu.login(browser)
     print("登录结束")
Exemplo n.º 2
0
 def setUp(self):
     print("开始登陆")
     global browser, hh
     browser = webdriver.Firefox()
     hh = method()
     hh.login(browser)
     print("登录结束")
Exemplo n.º 3
0
 def setUp(self):
     print("开始登陆")
     global browser, nn
     browser = webdriver.Firefox()
     nn = method()
     nn.login(browser)
     print("登陆结束")
Exemplo n.º 4
0
 def setUp(self):
     global browser,xx
     browser =webdriver.Chrome()
     xx=method()
     xx.login(browser)
     print("登录结束")
     username=browser.find_element_by_xpath("/html/body/div[5]/div[3]/div[1]/div/div[1]/div[2]/p[1]").text
     if username =="meizhengyi1":
         print("OK")
     # browser.get("http://172.16.4.120/5kcrm/index.php?m=user&a=login")
     # browser.find_element_by_name("name").send_keys(u"梅正义")
     # browser.find_element_by_name("password").send_keys("meizhengyi")
     # browser.find_element_by_name("submit").click()
     time.sleep(2)
Exemplo n.º 5
0
 def tearDown(self):
     mm=method()
     mm.login(browser)
     print("退出登录")
     browser.quit()
Exemplo n.º 6
0
 def setUp(self):
     global browser, hhh
     print("开始登陆")
     browser = webdriver.Firefox()
     hhh = method()
     hhh.login(browser)
Exemplo n.º 7
0
 def setUp(self):
     print("开始登陆")
     global browser,hhh
     browser = webdriver.Chrome()
     hhh=method()
     hhh.login(browser)