Ejemplo n.º 1
0
 def test_login_user(self):
     login = LoginPage(self.driver)
     login.click_login()
     login.enter_username(UserDetails.USERNAME)
     login.enter_password(UserDetails.PASSWORD)
     self.save_screenshot()
     login.login_user()
 def test_login(self):
     driver = self.driver
     driver.get(util.URL)
     login = LoginPage(driver)
     login.enter_username(util.USERNAME)
     login.enter_password(util.PASSWORD)
     login.click_login()
 def test_lgin(self):
     driver = self.driver
     LP = LoginPage(driver)
     LP.click_on_signin_button()
     LP.enter_username()
     LP.enter_password()
     LP.click_log_in()
Ejemplo n.º 4
0
 def test_login(self):
     driver = self.driver
     driver.get(util.URL)
     time.sleep(30)
     login = LoginPage(driver)
     login.enter_username(util.Username)
     login.enter_password(util.Password)
     login.click_login()
 def test_login(self, test_setup):
     #driver.get("https://opensource-demo.orangehrmlive.com")
     driver.get(utils.URL)
     login = LoginPage(driver)
     #login.enter_username("Admin")
     login.enter_username(utils.USERNAME)
     #login.enter_password("admin123")
     login.enter_password(utils.PASSWORD)
     login.clickonLogin()
Ejemplo n.º 6
0
    def test_login(self):  #previously we have def test_login(self, test_setup)
        driver = self.driver
        driver.get(utils.URL)

        login = LoginPage(driver)
        login.enter_username(utils.USERNAME)
        login.enter_password(utils.PASSWORD)
        login.click_login()
        '''
Ejemplo n.º 7
0
    def test_Valid_Login(self):
        driver = self.driver
        self.driver.get("http://facebook.com")
        Log_in = LoginPage(driver)

        Log_in.enter_username("*****@*****.**")
        Log_in.enter_password("01120090020k")
        Log_in.click_login()

        Log_out = HomePage(driver)

        Log_out.click_navigator()
        Log_out.click_logout()
Ejemplo n.º 8
0
    def test_login(self):
        driver=self.driver
        driver.get(util.URL)
        time.sleep(10)

        loginpage=LoginPage(driver)
        loginpage.enter_username(util.Username)
        loginpage.enter_password(util.Password)
        loginpage.login_button()

        # driver.find_element_by_id("username").send_keys("Anurag.Sharma")
        # driver.find_element_by_id("password").send_keys("P@ssword123")
        # driver.find_element_by_xpath("//button[@type='submit']").click()
        time.sleep(5)
    def setUp(self):
        login = LoginPage(self.driver)

        login.enter_username(
            self.lib.get_data_from_properties(PROP_FILE_PATH,
                                              'username').strip())
        self.logger.info("Entered '" + self.lib.get_data_from_properties(
            PROP_FILE_PATH, 'username').strip() +
                         "' into the 'Username' textbox")

        login.enter_password(
            self.lib.get_data_from_properties(PROP_FILE_PATH,
                                              'password').strip())
        self.logger.info("Entered '" + self.lib.get_data_from_properties(
            PROP_FILE_PATH, 'password').strip() +
                         "' into the 'Password' textbox")

        login.click_login()
        self.logger.info("Clicked on the 'Login' button")
        time.sleep(5)
Ejemplo n.º 10
0
class McK_login(unittest.TestCase):
    def setUp(self):
        self.driver = webdriver.Chrome(
            "C:/Drivers/chromedriver_win32/chromedriver.exe")
        self.login = LoginPage(self.driver)
        self.register = Registrer(self.driver)
        self.dashboard = Dashboard(self.driver)
        self.driver.maximize_window()

    def test_login(self):
        self.driver.get("")
        self.assertTrue(self.login.is_browser_on_the_hpage())
        self.driver.find_element_by_link_text('Sign In').click()

        #Page login
        self.assertTrue(self.login.is_browser_on_the_loginpage())
        self.login.enter_username('')
        self.login.enter_password('')
        self.login.submit_button()
        self.assertTrue(self.dashboard.is_browser_on_the_page())
        self.login.logout()

        self.assertTrue(self.register.is_browser_on_the_hpage())

        # Page Register
        self.driver.find_element_by_link_text('Register').click()
        self.assertTrue(self.register.is_browser_on_the_regpage())
        self.register.regemail('')
        self.register.regname('')
        self.register.regusername('')
        self.register.regpassword('')
        self.register.regcountry('')
        self.register.submitButton()
        self.assertTrue(self.dashboard.is_browser_on_the_page())
        self.register.logout()
        self.assertTrue(self.register.is_browser_on_the_hpage())

    def tearDown(self):
        self.driver.close()
 def test_login(self,test_setup):
     driver.get(utils.URL)
     login_obj= LoginPage(driver)
     login_obj.enter_username(utils.USERNAME)
     login_obj.enter_password(utils.PASSWORD)
     login_obj.click_Login()