Exemplo n.º 1
0
 def setUp(self):
     self.driver = Pyse('chrome')
     self.driver.open(get_url("home_page"))
     # 登录点击第一个商品
     self.driver.login()
     self.driver.click(get_element("productDetail_page", "firstLineName"))
     time.sleep(1)
 def setUp(self):
     self.url = "addressManger_page"
     self.driver = Pyse('chrome')
     self.driver.open(get_url("home_page"))
     #登录
     self.driver.login()
     self.driver.click(get_element("home_page", "member_href_loc"))
     self.driver.click(get_element("member_page",
                                   "addressManager_href_loc"))
Exemplo n.º 3
0
 def setUp(self):
     self.driver = Pyse('firefox')
     self.driver.open(get_url("home_page"))
     self.driver.click(get_element("login_page", "switch_button_loc"))
     current_handle = self.driver.switch_window()
     self.driver.send_keys(get_element("login_page", "username_input_loc"), "15881122294")
     self.driver.send_keys(get_element("login_page", "password_input_loc"), "Xian1016")
     self.driver.send_keys(get_element("login_page", "verifyCode_input_loc"), "8888")
     self.driver.click(get_element("login_page", "login_button_loc"))
     time.sleep(2)
     result_handle = self.driver.all_window_handles()
     self.assertNotIn(current_handle, result_handle, "登录失败,登录窗口未关闭!")
     self.driver.switch_to_single_window()
     self.driver.click(get_element("home_page", "product_href_loc"))
     time.sleep(2)
Exemplo n.º 4
0
 def setUp(self):
     self.driver = Pyse('chrome')
     self.driver.open(get_url("shopDetail_page"))
     #登录
     self.driver.login()
     time.sleep(2)
Exemplo n.º 5
0
 def setUp(self):
     self.page_name = "login_page"
     self.login = Pyse('chrome')
     self.login.open(get_url("home_page"))