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()
Ejemplo n.º 2
0
def test_validate_registration(data):
    driver = InitiateDriver.startBrowser()
    register = RegisterPage.Register(driver)
    register.enter_username(data[0])
    register.enter_pass(data[1])
    time.sleep(1)
    driver.close()
Ejemplo n.º 3
0
def test_enter_password():
    driver = InitiateDriver.startBrowser()
    driver.find_element_by_name(
        ConfigReader.fetchElementLocators('Registration',
                                          'password')).send_keys('abc')
    time.sleep(3)
    InitiateDriver.closeBrowser()
Ejemplo n.º 4
0
def test_validate_registration():
    driver = InitiateDriver.startBrowser()
    register = RegisterPage.Register(driver)
    register.enter_username('Sachin')
    register.enter_pass("tendulkar")
    time.sleep(3)
    driver.close()
def loginWebsite(data):
    driver1 = InitiateDriver.startBrowser()
    login = loginPage.loginPageClass(driver1)
    login.loginLink()
    login.emailId(data[0])
    login.password(data[1])
    login.loginBut()
    driver1.close()
Ejemplo n.º 6
0
def login(data):
    global driver1
    driver1 = InitiateDriver.startBrowser()
    log = loginPage.loginPageClass(driver1)
    log.loginLink()
    log.emailId(data[0])
    log.password(data[1])
    log.loginBut()
def addItemsToCart():
    driver1 = InitiateDriver.startBrowser()
    driver1.execute_script("window.scrollTo(0, 200);")
    shopcart = addtoshoppincartPage.addToCartClass(driver1)
    shopcart.bookLink()
    shopcart.additems()
    driver1.execute_script("window.scrollTo(0, 0);")
    shopcart.moveToCart()
    driver1.close()
Ejemplo n.º 8
0
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()
Ejemplo n.º 9
0
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()
Ejemplo n.º 10
0
def ValidateRegistration(data):
    driver1 = InitiateDriver.startBrowser()
    register = registrationPage.registrationPageClass(driver1)
    register.registerLink()
    register.enterGender()
    register.enterFirstName(data[0])
    register.lastName(data[1])
    register.emailId(data[2])
    register.password(data[3])
    register.confirmPass(data[4])
    register.registerButton()
Ejemplo n.º 11
0
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()
Ejemplo n.º 12
0
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()
Ejemplo n.º 13
0
def test_LoginValidation(data):
    driver = InitiateDriver.startBrowser()
    login = LoginPage.LoginClass(driver)
    login.enter_username(data[0])
    login.enter_password(data[1])
    driver.close()
def test_LoginInvalidation():
    driver = InitiateDriver.startBrowser()
    login = LoginPage.LoginClass(driver)
    login.enter_email("*****@*****.**")
    driver.close()
Ejemplo n.º 15
0
def test_Login():
    driver = InitiateDriver.startBrowser()
    #Logging in
    login = Login_Page.LoginClass(driver)
    login.enter_email('*****@*****.**')
    login.enter_password('PyTestPass')
    login.click_login_button()

    #Navigating Left Hand Nav
    nav = Navigation.NavigationClass(driver)
    time.sleep(3)
    nav.click_Home()
    nav.click_Calendar()
    nav.click_Contacts()
    nav.click_Companies()
    nav.click_Deals()
    nav.click_Tasks()
    nav.click_Cases()
    nav.click_Calls()
    nav.click_Documents()
    nav.click_Email()
    nav.click_Campaigns()
    nav.click_Forms()

    #Creating Form
    form = Create_Form.Create_Form_Class(driver)
    form.click_New_button()
    form.enter_name('Mr. PyTest')
    form.enter_intro_text('Nice to meet you!')
    form.enter_completion_text('See you next time!')
    form.click_Save_button()
    time.sleep(3)
    #form.click_Submit_button()

    # Logging out
    login = Login_Page.LoginClass(driver)
    login.click_settings_button()
    time.sleep(3)
    login.click_logout_button()


#  def test_Navigation():
#      driver = InitiateDriver.startBrowser()
#     nav = Navigation.NavigationClass(driver)
#     time.sleep(5)
#     nav.click_Home()
#     nav.click_Calendar()
#     nav.click_Companies()
#     nav.click_Deals()

# def test_Valid_login():
#     driver = InitiateDriver.startBrowser()
#     driver.find_element_by_name(Config_Reader.fetchElementLocators("Login","email_name")).send_keys("*****@*****.**")
#     driver.find_element_by_name(Config_Reader.fetchElementLocators("Login","password_name")).send_keys("PyTestPass")
#     driver.find_element_by_xpath("//div[contains(text(),'Login')]").click()
#     time.sleep(3)
#     assert driver.title == "Cogmento CRM"
#     driver.close()

# @pytest.fixture(scope="module")
# def env_test_setup():
# global driver
# path = "/Users/Naveed/Downloads/chromedriver"
# driver = Chrome(executable_path=path)
# driver.get("https://ui. cogmento.com/")
# driver.maximize_window()
#
# def test_valid_login_credentials():
#     driver.find_element_by_name("email").send_keys("*****@*****.**")
#     driver.find_element_by_name("password").send_keys("PyTestPass")
#     driver.find_element_by_xpath("//div[contains(text(),'Login')]").click()
#     time.sleep(3)
#     assert driver.title == "Cogmento CRM"
#
# def test_invalid_login_credentials():
#     driver.find_element_by_name("email").send_keys("*****@*****.**")
#     driver.find_element_by_name("password").send_keys("FakePass")
#     driver.find_element_by_xpath("//div[contains(text(),'Login')]").click()
#     assert driver.find_element_by_name("email").is_displayed()
#
# time.sleep(5)
def test_InvalidDataRegistration():
    driver = InitiateDriver.startBrowser()
    register = RegistrationPage.RegistrationClass(driver)
    register.enter_email("*****@*****.**")
    driver.close()
Ejemplo n.º 17
0
def test_ValidateRegistration():
    print("inside validate method")
    drv = InitiateDriver.startBrowser()
    print(drv)
    reg = RegistrationPage.registrationclass(drv)
    reg.enter_kwsearch()
Ejemplo n.º 18
0
def test_Registration_Invalid_data():
    driver = InitiateDriver.startBrowser()

    driver.close()
def test_ValidateRegistration(data):
    driver = InitiateDriver.startBrowser()
    register = RegistrationPage.RegistrationClass(driver)
    register.enter_username(data[0])
    register.enter_password(data[1])
    driver.close()
Ejemplo n.º 20
0
def test_ValidataRegistration():
    driver = InitiateDriver.startBrowser()
    driver.find_element_by_name('fld_username').send_keys('hellow')
    driver.close()
Ejemplo n.º 21
0
def test_registration_invalid_data():
    driver = InitiateDriver.startBrowser()