def test_enter_password(): driver = InitiateDriver.startBrowser() driver.find_element_by_name( ConfigReader.fetchElementLocators('Registration', 'password')).send_keys('abc') time.sleep(3) InitiateDriver.closeBrowser()
def test_ValidateRegistration(data): driver = InitiateDriver.startBrowser() Register = RegistrationPage.Registration(driver) Register.enter_Username(data[0]) Register.enter_email(data[1]) Register.enter_Dob(data[2]) InitiateDriver.closeBrowser()
def test_third(): driver = InitiateDriver.startBrowser() driver.maximize_window() print("page title is :: " + driver.title) print("*******************************************") print("page URl is :: " + driver.current_url) print("*******************************************") print(driver.page_source) InitiateDriver.closeBrowser()
def test_222(): '''driver = webdriver.Chrome(executable_path='C:/pychWork/Practise/driver/chromedriver.exe') import time driver.get("https://www.thetestingworld.com/testings/")''' driver = InitiateDriver.startBrowser() driver.maximize_window() print("Text on link is :: " +driver.find_element_by_class_name("displayPopup").text) print("value of :: "+driver.find_element_by_xpath("//input[@type='submit']").get_attribute("type")) InitiateDriver.closeBrowser()
def test_fourth(): driver = InitiateDriver.startBrowser() driver.maximize_window() #driver.find_element_by_xpath("//input[@name='fld_username']").send_keys("Hello") time.sleep(5) act = ActionChains(driver) #act.click(driver.find_element_by_xpath("//input[@name='fld_username']")).perform() act.context_click( driver.find_element_by_xpath( "//input[@name='fld_username']").send_keys("abc")).perform() InitiateDriver.closeBrowser()
def test_sixth(): driver = InitiateDriver.startBrowser() driver.maximize_window() driver.find_element_by_xpath("//input[@name='fld_username']").send_keys( "Hello") act = ActionChains(driver) # act.send_keys(Keys.TAB).perform() #act.key_down(Keys.CONTROL).send_keys('a').perform() act.key_down(Keys.CONTROL).send_keys('a').key_down( Keys.CONTROL).send_keys('c').perform() time.sleep(5) driver.find_element_by_xpath( "//input[contains(@placeholder,'*****@*****.**')]").send_keys( "scenario 5") #act.send_keys(Keys.CONTROL).key_down(Keys.ALT).send_keys(Keys.DELETE).perform() #time.sleep(10) InitiateDriver.closeBrowser()
def test_TC002(): print("inside TC002 method") InitiateDriver.closeBrowser()