コード例 #1
0
 def test_1_register(self):
     self.driver = webdriver.PhantomJS()
     self.driver.get(TestHelper.server2)
     HomePage = TestHelper.HomePage(self.driver)
     HomePage.search()
     while True:
         try:
             signUpSearch = TestHelper.SearchPage(self.driver)
             signUpSearch.signUpSearch()
         except WebDriverException:
             print "Register button is not loaded, wait"
         else:
             break
     sign_up = TestHelper.LoginPage(self.driver)
     sign_up.signUp_test_full()
     sign_up.registerClick()
     if TestHelper.error1 in self.driver.page_source:
         sign_up.signUp_else()
         sign_up.registerClick()
         print "User " + TestHelper.testemail2 + " registered"
     else:
         print "User " + TestHelper.testemail + " registered"
     print self.driver.current_url
     url = self.driver.current_url
     if url == "https://pvg-838-invalid-redirect-on-sign-in.dev.vipoutlet.com/shop/?s=":
         print "PVG 838 is Done"
     else:
         print "PVG 838 is Failed"
コード例 #2
0
 def test_walmart_checkout_1(self):
     self.driver = webdriver.Firefox()
     self.driver.get(wm.wmserver)
     wmcheckout = TestHelper.WalmartPage(self.driver)
     wmcheckout.walmart_checkout()
     wmlogin = TestHelper.LoginPage(self.driver)
     wmlogin.signUp_test_full()
     register = self.driver.find_element_by_name(TestHelper.registerId)
     register.click()
     if TestHelper.error1 in self.driver.page_source:
         wmlogin.signUp_else()
         register = self.driver.find_element_by_name(TestHelper.registerId)
         register.click()
         print "User " + TestHelper.testemail2 + " registered"
     else:
         print "User " + TestHelper.testemail + " registered"
コード例 #3
0
 def test_valid_password(self):
     self.driver = webdriver.Firefox()
     self.driver.get(server)
     self.driver.find_element_by_css_selector(singUpId).click()
     sign_up = TestHelper.LoginPage(self.driver)
     sign_up.signUp_test()
     email = self.driver.find_element_by_css_selector(emailId)
     email.clear()
     email.send_keys(testemail)
     terms = self.driver.find_element_by_css_selector(termsId)
     terms.click()
     register = self.driver.find_element_by_name(registerId)
     register.click()
     if error3 in self.driver.page_source:
         print "Case " + error3 + "- Pass"
     else:
         print "Case" + error3 + "- false"
     self.driver.close()
コード例 #4
0
 def test_valid_register(self):
     self.driver = webdriver.Firefox()
     self.driver.get(server)
     self.driver.find_element_by_css_selector(singUpId).click()
     sign_up = TestHelper.LoginPage(self.driver)
     sign_up.signUp_test()
     email = self.driver.find_element_by_css_selector(emailId)
     email.send_keys(existerEmail)
     password = self.driver.find_element_by_name(passwordId)
     password.clear()
     password.send_keys("test")
     register = self.driver.find_element_by_name(registerId)
     register.click()
     if error1 in self.driver.page_source:
         print "Case" + error1 + "-pass"
     else:
         print "Case" + error1 + " - false"
     self.driver.close()
コード例 #5
0
 def test_1_register(self):
     HomePage = TestHelper.HomePage(self.driver)
     HomePage.signUpClick()
     sign_up = TestHelper.LoginPage(self.driver)
     sign_up.signUp_test_full()
     while True:
         try:
             sign_up.registerClick()
         except WebDriverException:
             print "Button is not available"
         else:
             break
     if TestHelper.error1 in self.driver.page_source:
         sign_up.signUp_else()
         sign_up.registerClick()
         print "User " + TestHelper.testemail2 + " registered"
     else:
         print "User " + TestHelper.testemail + " registered"
     print self.driver.current_url
     url = self.driver.current_url
     if url == "https://uat.vipoutlet.com/":
         print "PVG 838 is Done - After Login on version page redirect to My Account, should on Home Page"
     else:
         print "PVG 838 is Failed"