def test_sign_in_button(self): print "\n" + str(test_cases(3)) page = LoginPage(self.driver) #loginPage = page.click_sign_in_button() page.enter_email("valid_user") page.enter_password("valid_user") page.click_login_button() self.assertIn("UpCityAdmin/Dashboard/Index", page.get_url())
def test_sign_up_button(self): print ("\n" + str(test_cases(2))) page = MainPage(self.driver) signUpPage = page.click_sign_up_button() self.assertIn("ap/register", signUpPage.get_url())
def test_search_item(self): print ("\n" + str(test_cases(1))) page = MainPage(self.driver) search_result = page.search_item("Nexus 5") self.assertIn("Nexus 5", search_result)
def test_page_load(self): print ("\n" + str(test_cases(0))) page = MainPage(self.driver) self.assertTrue(page.check_page_loaded())
def test_all_companies_on_home_page(self): print("\n" + str(test_cases(1))) page = HomePage(self.driver) self.assertTrue(page.check_all_companies_on_page())
def test_sign_in_with_demo_user(self): print("\n" + str(test_cases(4))) mainPage = MainPage(self.driver) result = mainPage.login_with_valid_user("demo") time.sleep(5)
def test_login_in_button(self): print("\n" + str(test_cases(1))) page = MainPage(self.driver) mainpage = page.click_login_button()
def test_sign_in_with_in_valid_user(self): print ("\n" + str(test_cases(5))) mainPage = MainPage(self.driver) loginPage = mainPage.click_sign_in_button() result = loginPage.login_with_in_valid_user("invalid_user") self.assertIn("There was a problem with your request", result)
def test_search_item(self): print("\n" + str(test_cases(1))) page = MainPage(self.driver) search_result = page.search_item("Nexus 5") self.assertIn("Nexus 5", search_result)
def test_sign_in_with_in_valid_user(self): print ("\n" + str(test_cases(5))) mainPage = MainPage(self.driver) loginPage = mainPage.sign_in() result = loginPage.login(email = '*****@*****.**', password = '******') self.assertIn("Wrong password or the account is disabled, or does not exist", result)
def test_sign_in_with_valid_user(self): print ("\n" + str(test_cases(4))) mainPage = MainPage(self.driver) loginPage = mainPage.sign_in() result = loginPage.login(email = '*****@*****.**', password = '******') self.assertIn("You are now logged in", result)
def test_sign_up_button(self): print ("\n" + str(test_cases(2))) page = MainPage(self.driver) signUpPage = page.click_sign_up_button() self.assertIn("create_account", signUpPage.get_url())
def test_page_load(self): print "\n" + str(test_cases(0)) page = MainPage(self.driver) self.assertTrue(page.check_page_loaded())
def test_employee_login_with_valid_pin(self): print("\n" + str(test_cases(7))) self.test_sign_in_with_valid_user() time.sleep(4) page = loginPage(self.driver) result = page.employee_login1('akanksha')
def test_filter_company_name(self): print("\n" + str(test_cases(2))) page = HomePage(self.driver) res = page.filter_company_name('app') self.assertEqual(len(res), 1) self.assertEqual(res[0].get_name(), 'Apple')
def test_sign_in_button(self): print ("\n" + str(test_cases(3))) page = MainPage(self.driver) loginPage = page.click_sign_in_button() self.assertIn("ap/signin", loginPage.get_url())
def test_sign_in_with_valid_user(self): print ("\n" + str(test_cases(4))) mainPage = MainPage(self.driver) loginPage = mainPage.click_sign_in_button() result = loginPage.login_with_valid_user("valid_user") self.assertIn("yourstore/home", result.get_url())
def test_sign_in_button(self): print("\n" + str(test_cases(3))) page = MainPage(self.driver) loginPage = page.click_sign_in_button() self.assertIn("ap/signin", loginPage.get_url())
def test_page_load(self): print ("\n" + str(test_cases(0))) # print("\n" + str(test_cases(0)['Blocker'][0])) page = MainPage(self.driver) self.assertTrue(page.check_page_loaded())
def test_sign_in_with_valid_user(self): print("\n" + str(test_cases(4))) mainPage = MainPage(self.driver) loginPage = mainPage.click_sign_in_button() result = loginPage.login_with_valid_user("valid_user") self.assertIn("yourstore/home", result.get_url())
def test_sign_in_with_valid_user(self): print("\n" + str(test_cases(2))) page = MainPage(self.driver) result = page.login_with_valid_user("valid_user")
def test_sign_in_with_in_valid_user(self): print("\n" + str(test_cases(5))) mainPage = MainPage(self.driver) loginPage = mainPage.click_sign_in_button() result = loginPage.login_with_in_valid_user("invalid_user") self.assertIn("There was a problem with your request", result)
def test_unregister_select_accept(self): print("\n" + str(test_cases(5))) self.test_sign_in_with_valid_user() page= loginPage(self.driver) result = page.unregister_and_accept_alert() time.sleep(5)
def test_remove_questions(self): print("\n" + str(test_cases(5))) page = HomePage(self.driver) res = page.remove_questions() self.assertEqual(len(res), 0)