def test_login(self): driver = self.driver login = LoginPage(driver) login.launch_url(cs.URL) login.enter_un(cs.UN) login.enter_pwd(cs.PWD) login.click_login_btn() # driver.find_element_by_id("username").send_keys("admin") # driver.find_element_by_name("pwd").send_keys("manager") # driver.find_element_by_id("loginButton").click() time.sleep(5)
from selenium import webdriver from testdata.data import * from pages.loginpage import LoginPage from pages.homepage import HomePage import time driver=webdriver.Chrome(executable_path="C:/Users/Dell/PycharmProjects/Framework_POM/drivers/chromedriver.exe") driver.get(URL) driver.implicitly_wait(10) driver.maximize_window() # lp=LoginPage(driver) lp.enter_un() time.sleep(5) lp.enter_pwd() time.sleep(5) lp.click_login() # driver.find_element_by_name("pwd").send_keys(PWD) # driver.find_element_by_xpath("//*[text()='Login ']").click() hp=HomePage(driver) time.sleep(5) hp.logout_acti() driver.quit()
def test_login(self): driver = self.driver lp = LoginPage(driver) lp.enter_UN() lp.enter_pwd() lp.enter_login()
def test_login(self, test_setup): driver = self.driver lp = LoginPage(driver) lp.enter_un() lp.enter_pwd() lp.click_on_login_btn()
def test_login(self, test_setup): lp = LoginPage() lp.enter_un() lp.enter_pwd() lp.click_on_login_btn()
def test_login(self): driver = self.driver lp = LoginPage(driver) lp.enter_un(data.UN) lp.enter_pwd(data.PWD) lp.click_login()