def start_survey():
    get_driver = Browser_Factory(one_time_browser_setup)
    driver = get_driver.select_browser()
    lg = Login(driver)
    lg.startlogin(username, password)
    cs = CreateSurvey(driver)
    cs.start_create_survey(first_survey_name)
    return driver
def test_validLogin(select_driver):
    print("Valid Login Stared")
    lp = Login(select_driver)
    lp.startlogin(username, password)
    result = lp.login_successful()
    print("Result: " + str(result))

    assert result == True
    def start_app(self):

        log = Login(self.driver)
        log.startlogin(username, password)
        cre_survey = CreateSurvey(self.driver)
        cre_survey.start_create_survey(first_survey_name)

        sur_operation = StartSurvey(self.driver)
        sur_operation.start_survey_operation(new_survey_title, new_page_title)

        enter_questions = AskQuestion(self.driver)
        enter_questions.first_question(first_question_enter)
        enter_questions.second_question(second_question_enter)
        enter_questions.third_question(third_question_enter)
        enter_questions.four_question(four_question_enter)
Exemple #4
0
class TestLoginDemo(unittest.TestCase):
    log = cl.customLogger(logging.DEBUG)

    @pytest.fixture(autouse=True)
    def objectSetup(self, one_time_browser_setup):
        self.login_start = Login(one_time_browser_setup)

    # @pytest.mark.run(order=1)
    # def test_Failed_Valid(self):
    #     print("InvalidLogin")
    #     self.login_start.startlogin(usernamefaili, password)
    #     result = self.login_start.login_failed()
    #     assert result == True

    @pytest.mark.run(order=1)
    def test_Login_Valid(self):
        print("valid login started")
        self.login_start.startlogin(username, password)
        result = self.login_start.login_successful()
        assert result == True
 def setup(self, browser):
     manager = Manager(browser)
     global driver
     driver = manager.get_driver()
     open_hiway = OpenHiwayUrl(driver)
     login_page = Login(driver,
                        constants.primary_user_email_timesheet_tests,
                        constants.primary_user_password_timesheet_tests)
     startapp_page = StartApp(driver)
     dashboard = Dashboard(driver)
     open_hiway.open()
     login_page.enter_email_and_click_next()
     login_page.enter_password_and_click_next()
     startapp_page.go_to_dashboard()
     dashboard.go_to_timesheeet()
     yield
     manager.close_browser()
Exemple #6
0
 def objectSetup(self, one_time_browser_setup):
     self.login_start = Login(one_time_browser_setup)
 def test_valid_login(self, username, password):
     login_page = Login(driver, username, password)
     startapp_page = StartApp(driver)
     login_page.enter_email_and_click_next()
     login_page.enter_password_and_click_next()
     assert username in startapp_page.get_username_from_startapp_page()
Exemple #8
0
def test_login_admin(driver):
    login_page = Login(driver)
    if (login_page.isLogin()):
        login_page.signOut()
    login_page.load(config.BASE_URL)
    login_page.enter_username(config.ADMIN_EMAIL)
    login_page.enter_password(config.ADMIN_PASSOWRD)
    login_page.click_btn_login()
def start_login():
    get_driver = Browser_Factory(one_time_browser_setup)
    driver = get_driver.select_browser()
    lg = Login(driver)
    lg.startlogin(username, password)
    return driver
Exemple #10
0
 def test_login(self):              # Passed self as parameter, after declaring under class
     driver=self.driver             # Accessing web driver instance with self.driver      #### 5 #####
     lp=Login(driver)               # Need to pass driver inside Login()
     lp.login_cms(USERNAME,PASSWORD)