Ejemplo n.º 1
0
 def lognin(self):
     change = By.CSS_SELECTOR, '.link_1'
     input_user = By.NAME, 'txtLoginName'
     input_pwd = By.NAME, 'txtPassword'
     enter = By.CSS_SELECTOR, '#ibnLogin'
     lo = LoginPage()
     lo.click_button(change)
     lo.send_button(input_user, 'p_lxwenliu')
     lo.send_button(input_pwd, 'Morenpwd@159')
     lo.click_button(enter)
     lo.quit()
     print('成功了')
Ejemplo n.º 2
0
    def test_login(self, driver, url):

        change = By.CSS_SELECTOR, '.link_1'
        input_user = By.NAME, 'txtLoginName'
        input_pwd = By.NAME, 'txtPassword'
        enter = By.CSS_SELECTOR, '#ibnLogin'

        lo = LoginPage(driver)
        lo.get_new_link(url)
        lo.click_button(change)
        lo.send_button(input_user, '')
        lo.send_button(input_pwd, '')
        lo.click_button(enter)
        lo.get_new_link(
            'http://tapd.oa.com//oppohuaweiui/sparrow/test_plan/plan_list')
Ejemplo n.º 3
0
    def test_validation_nsm_users_gui(self):
        driver = self.driver
        driver.get("https://cloud.sonicwall.com")
        login = LoginPage(driver)
        login.enter_username(
            "*****@*****.**"
        )  # Not provided actual username here for security reasons but script works seamlessly.
        login.click_button("nextButton")
        login.enter_password(
            "P******"
        )  # Not provided actual password here for security reasons but script works seamlessly..
        login_button = driver.find_element_by_id("loginButton")
        driver.execute_script("arguments[0].click()", login_button)
        time.sleep(12)

        tenant_page = TenantPage(driver, "Ravi_Sprint28")
        tenant_page.select_tenant()
        tenant_page.click_UTM()

        nsm_page = HomePage(driver)
        nsm_page.click_on_tab("CSC Users", False)
        nsm_page.click_on_tab("Users", True)
        time.sleep(5)
        print(nsm_page.get_column_info())
        row_data = nsm_page.get_results()
        print(row_data)
        print(nsm_page.get_user(row_data))
        user_from_nsm = nsm_page.get_user(row_data)
        expected_users = [
            'Ravi Guruprasad', 'Raja Rock', 'Ravi Guru', 'Tom Harry'
        ]

        if nsm_page.validate_users(user_from_nsm, expected_users):
            print("Users from NSM Page matches with expected Result:",
                  "Testcase PASSED")
        else:
            print("Users from NSM Page doesn't match with expected Result:",
                  "Testcase FAILED")