def test_valid_login(self): url = "https://courses.letskodeit.com" driver = webdriver.Chrome() driver.maximize_window() driver.get(url=url) lp = HomePage(driver) lp.login("*****@*****.**", "brownwindow*03") # sign_in_link = driver.find_element(By.XPATH, "//a[text()='Sign In']") # sign_in_link.click() # # email_id = driver.find_element(By.ID, "email") # email_id.send_keys("*****@*****.**") # # password = driver.find_element(By.ID, "password") # password.send_keys("brownwindow*03") # # login_button = driver.find_element(By.XPATH, "//input[@value='Login']") # login_button.click() image_home = driver.find_element(By.XPATH, "//img[@class='img-fluid']") if image_home is not None: print("test successful") else: print("test failed")
def test_validHomePage(self): baseURL = "https://jonathanopperman.info/" driver = webdriver.Chrome() driver.maximize_window() driver.implicitly_wait(3) driver.get(baseURL) hp = HomePage(driver) hp.clickTwitterSocialLink()
def set_up(request, username, password): df = DriverFactory("Chrome") driver = df.launch_browser() if request.cls is not None: request.cls.driver = driver request.cls.bp = BasePage(driver) request.cls.lp = LoginPage(driver) request.cls.hp = HomePage(driver) request.cls.username = username request.cls.password = password yield driver driver.quit()
def one_time_setup(request, browser): print('Running one time setup') wdf = WebDriverFactory(browser) driver = wdf.get_webdriver_instance() home = HomePage(driver) home.log_in() if request.cls is not None: request.cls.driver = driver yield driver driver.quit() print('Running One time Teardown')
def test_validLogin(self): baseUrl = "https://twitter.com/login" driver = webdriver.Chrome("/usr/local/bin/chromedriver") driver.maximize_window() driver.implicitly_wait(3) driver.get(baseUrl) lp = LoginPage(driver) lp.login("*****@*****.**", "108stoosiem108") signupLink = driver.find_element(By.XPATH, "//*[@id='user-dropdown-toggle']") if signupLink is not None: print("Login Good") else: print("Login Bad") hp = HomePage(driver) hp.clicking() ap = LogAgain(driver) ap.againLogin("*****@*****.**", "dupa8")
def class_setup(self, module_setup_to_test_class): self.find_workshop_page = FindWorkshopPage(self.driver) self.home_page = HomePage(self.driver)
def class_setup(self): self.home_page = HomePage(self.driver)
def custom_setup(self): self.lp = LoginPage(self.driver) self.hp = HomePage(self.driver)
def classSetup(self): self.lp = LoginPage(self.driver) self.ts = TestStatus(self.driver) self.hp = HomePage(self.driver) self.ad = AddressPage(self.driver)
def classSetup(self, oneTimeSetUp): self.hp = HomePage(self.driver) self.ty = ThankYou(self.driver) self.ts = TestStatus(self.driver)
def class_setup(self, one_time_set_up): self.hp = HomePage(self.driver)
def class_setup(self, one_time_setup): self.add_first_product_from_woman_tops = HomePage(self.driver)
def custom_setup(self): self.rp = RegisterPage(self.driver) self.hp = HomePage(self.driver) self.st = Status(self.driver) yield self.rp.clear_register_form()
def __init__(self, driver): super().__init__(self) self.driver = driver self.checkout = CheckoutPage(self.driver) self.home = HomePage(self.driver)
def class_setup(self, one_time_setup): self.home_page = HomePage(self.driver) self.errors = ErrorStatus(self.driver) self.plp = ProductListingPage(self.driver) self.pdp = PDP(self.driver) self.checkout = CheckoutPage(self.driver)
def classSetup(self, oneTimeSetUp): self.lp = LoginPage(self.driver) self.ts = TestStatus(self.driver) self.hp = HomePage(self.driver)
def __init__(self, driver): super().__init__(driver) self.driver = driver self.home_page = HomePage(driver)
def player(context): player_name = "Bernie Kosar" hp = HomePage(context.driver) hp.player_search(player_name)
def class_set_up(self, one_time_setup): self.home = HomePage(self.driver) self.errors = ErrorStatus(self.driver) self.account = MyAccount(self.driver)
def login(self, oneTimeSetUp): self.home = HomePage(self.driver) self.login = LoginPage(self.driver) self.login.acceptEula() self.login.loginWith("blablaUser")
def __init__(self, driver): self.driver = driver super().__init__(driver) self.hp = HomePage(driver)