def test_log_in(self): find_and_click(self.driver, ".inner___1T3DW > a:nth-child(12)") input_text(self.driver, "#login-email", "*****@*****.**") input_text(self.driver, "#login-password", "change1313") find_and_click( self.driver, "div.gl-vspace-bpall-small:nth-child(6) > button:nth-child(1)")
def test_check_order(self): # click "check the order" find_and_click(self.driver, ".inner___1T3DW > a:nth-child(6)") # input data input_text(self.driver, "div.field___22seD:nth-child(2) > input:nth-child(1)", "AD012345678") input_text(self.driver, "div.field___22seD:nth-child(3) > input:nth-child(1)", "*****@*****.**") # find order find_and_click(self.driver, "button.gl-cta:nth-child(4)")
def test_login_scenario(self): for scenario in scenarios: find_and_click(self.driver, ".inner___1T3DW > a:nth-child(12)") email = self.driver.find_element_by_css_selector("#login-email").clear() input_text(self.driver, "#login-email", scenario['login']) password = self.driver.find_element_by_css_selector('#login-password').clear() input_text(self.driver, "#login-password", scenario['password']) find_and_click(self.driver, "div.gl-vspace-bpall-small:nth-child(6) > button:nth-child(1)") self.assertIn(scenario['error_message'], self.driver.page_source)
def test_forgot_password(self): find_and_click(self.driver, ".inner___1T3DW > a:nth-child(12)") find_and_click( self.driver, "div.col-l-10:nth-child(1) > form:nth-child(2) > a:nth-child(1)") input_text(self.driver, ".field__input___3eT4b", "*****@*****.**") find_and_click( self.driver, "div.gl-vspace-bpall-medium:nth-child(1) > button:nth-child(1)")
def test_join_club(self): find_and_click( self.driver, ".inner___1T3DW > div:nth-child(8) > em:nth-child(1) > a:nth-child(1)" ) input_text(self.driver, "#registration-email-field", "*****@*****.**") input_text(self.driver, "#registration-password-field", "change1313") find_and_click(self.driver, ".gl-form-item--inline") find_and_click(self.driver, "button.gl-cta:nth-child(8)")