Example #1
0
 def passwordObj(self):
     try:
         elementObj = getElement(self.driver, "xpath",
                                 "//input[@name='password']")
         return elementObj
     except Exception as err:
         raise err
Example #2
0
 def userNameObj(self):
     try:
         elementObj = getElement(self.driver, "xpath",
                                 "//input[@name='email']")
         return elementObj
     except Exception as err:
         raise err
Example #3
0
 def switchToFrame(self):
     try:
         iframe = getElement(self.driver, "xpath",
                             "//iframe[contains(@id,'x-URS-iframe')]")
         #切进相应的页面
         self.driver.switch_to.frame(iframe)
     except Exception as err:
         raise err
Example #4
0
 def loginButton(self):
     try:
         elementObj = getElement(self.driver, "id", "dologin")
         return elementObj
     except Exception as err:
         raise err
Example #5
0
 def passwd_login_link(self):
     try:
         elementObj = getElement(self.driver, "id", "switchAccountLogin")
         return elementObj
     except Exception as err:
         raise err