Пример #1
0
 def get_current_leave_balance(self, strip_text):
     driver = self.driver
     leave_balance_before = UtilitiesScript(driver)
     leave_1 = leave_balance_before.strip_texts(strip_text)
     current_leave = float(leave_1)
     time.sleep(1)
     return current_leave
 def test_01_login(self):
     target_page = UtilitiesScript(self.driver)
     target_page.launch_target_page1(TestData.login_url, TestData.login_browser_title)
     login = LoginPage(self.driver)
     login.enter_username(TestData.admin_username)
     login.enter_password(TestData.admin_password)
     login.click_login()
     time.sleep(1)
Пример #3
0
 def test__04_Login_incorrect_password(self):
     driver = self.driver
     driver.get(TestData.login_url)
     login = LoginPage(driver)
     login.enter_username(TestData.admin_username)
     login.enter_password(TestData.admin_password_invalid)
     login.click_login()
     target_page = UtilitiesScript(driver)
     target_page.launch_target_page2(TestData.invalid_credential_url)
     login.check_invalid_password_message()
     time.sleep(2)
Пример #4
0
    def test_02_Login_valid_username(self):
        driver = self.driver

        driver.get(TestData.login_url)
        login = LoginPage(driver)
        login.enter_username(TestData.admin_username)
        login.enter_password(TestData.admin_password)
        login.click_login()

        homepage = HomePage(driver)
        homepage.click_welcome()
        homepage.click_logout()
        target_page = UtilitiesScript(driver)
        target_page.launch_target_page2(TestData.logout_url)
        time.sleep(2)
Пример #5
0
 def test_01_Launch_login_page(self):
     target_page = UtilitiesScript (self.driver)
     target_page.launch_target_page1(TestData.login_url,TestData.login_browser_title)
Пример #6
0
 def entitlement_leave_type(self, select, value):
     driver = self.driver
     entitlementType = UtilitiesScript(driver)
     entitlementType.selectDropdown(select, value)
 def entitlement_add_leave_period(self,select,  value):
     driver = self.driver
     entitlementPeriod = UtilitiesScript(driver)
     entitlementPeriod.selectDropdown(select,  value)
 def entitlement_add_emp_name(self, entitlement_emp_name):
     target_page = UtilitiesScript(self.driver)
     target_page.launch_target_page2(TestData.add_entitlement)
     self.driver.find_element_by_id(Locators.entitlement_leave_empname_input_id).send_keys(entitlement_emp_name)
     self.driver.find_element_by_id(Locators.entitlement_leave_empname_input_id).send_keys(Keys.ENTER)