def __init__(self, web_driver: WebDriver):
     # Initialize web driver
     self.web_driver = web_driver
     self.username_field = TextField(self.web_driver, GitHubLoginPageLocators.USERNAME_FIELD_LOCATOR.arguments)
     self.password_field = TextField(self.web_driver, GitHubLoginPageLocators.PASSWORD_FIELD_LOCATOR.arguments)
     self.login_button = Button(self.web_driver, GitHubLoginPageLocators.PASSWORD_FIELD_LOCATOR.arguments)
     self.signup_button = Button(self.web_driver, GitHubLoginPageLocators.PASSWORD_FIELD_LOCATOR.arguments)
Exemplo n.º 2
0
 def __init__(self, web_driver: WebDriver):
     # Initialize web driver
     self.web_driver = web_driver
     self.stackoverflow_logo = Image(
         self.web_driver,
         CommonLocators.STACKOVERFLOW_LOGO_LOCATOR.arguments)
     self.google_login_button = Button(
         self.web_driver,
         CommonLocators.GOOGLE_LOGIN_BUTTON_LOCATOR.arguments)
     self.facebook_login_button = Button(
         self.web_driver, CommonLocators.FACEBOOK_BUTTON_LOCATOR.arguments)
     self.github_login_button = Button(
         self.web_driver, SignupPageLocators.GITHUB_SIGNUP_BUTTON.arguments)
     self.display_name = Header(
         self.web_driver, SignupPageLocators.DISPLAY_NAME_LOCATOR.arguments)
     self.product_updates = Header(
         self.web_driver,
         SignupPageLocators.PRODUCT_UPDATES_LOCATOR.arguments)
     self.username_field = TextField(
         self.web_driver,
         SignupPageLocators.USERNAME_FIELD_LOCATOR.arguments)
     self.password_field = TextField(
         self.web_driver,
         SignupPageLocators.PASSWORD_FIELD_LOCATOR.arguments)
     self.signup_button = Button(
         self.web_driver, SignupPageLocators.GITHUB_SIGNUP_BUTTON.arguments)
Exemplo n.º 3
0
    def __init__(self, web_driver: WebDriver):
        # Initialize web driver
        self.web_driver = web_driver

        self.stackoverflow_logo = Image(self.web_driver, CommonLocators.STACKOVERFLOW_LOGO_LOCATOR.arguments)
        self.google_login_button = Button(self.web_driver, CommonLocators.GOOGLE_LOGIN_BUTTON_LOCATOR.arguments)
        self.facebook_login_button = Button(self.web_driver, CommonLocators.FACEBOOK_BUTTON_LOCATOR.arguments)
        self.username_field = TextField(self.web_driver, LoginPageLocators.USERNAME_FIELD_LOCATOR.arguments)
        self.password_field = TextField(self.web_driver, LoginPageLocators.PASSWORD_FIELD_LOCATOR.arguments)
        self.login_button = Button(self.web_driver, LoginPageLocators.LOGIN_BUTTON_LOCATOR.arguments)
Exemplo n.º 4
0
    def __init__(self, web_driver: WebDriver):
        # Initialize web driver
        self.web_driver = web_driver
        try:
            self.web_driver.maximize_window()
        except WebDriverException:
            pass
        self.web_driver.get("https://stackoverflow.com")

        # Instantiating web elements
        self.stackoverflow_logo = Image(
            self.web_driver,
            CommonLocators.STACKOVERFLOW_LOGO_LOCATOR.arguments)
        self.login_link = Link(self.web_driver,
                               MainPageLocators.LOGIN_LINK_LOCATOR.arguments)
        self.sign_up_button = Button(
            self.web_driver, MainPageLocators.SGNUP_BUTTON_LOCATOR.arguments)
    def __init__(self, web_driver: WebDriver):
        # Initialize web driver
        self.web_driver = web_driver

        self.profile_button = Button(
            self.web_driver,
            UserWorkspaceLocators.PROFILE_BUTTON_LOCATOR.arguments,
            expected_condition=expected_conditions.
            visibility_of_element_located)
        self.stackoverflow_logo = Image(
            self.web_driver,
            CommonLocators.STACKOVERFLOW_LOGO_LOCATOR.arguments)
        self.inbox_button = Button(
            self.web_driver,
            UserWorkspaceLocators.INBOX_BUTTON_LOCATOR.arguments)
        self.achivements_button = Button(
            self.web_driver,
            UserWorkspaceLocators.ACHIVEMENTS_BUTTON_LOCATOR.arguments)
        self.help_button = Button(
            self.web_driver,
            UserWorkspaceLocators.HELP_BUTTON_LOCATOR.arguments)
        self.user_menu = Button(
            self.web_driver,
            UserWorkspaceLocators.USER_MENU_BUTTON_LOCATOR.arguments)
        self.search_field = TextField(
            self.web_driver,
            UserWorkspaceLocators.SEARCH_FIELD_LOCATOR.arguments)
        self.search_button_mobile = Button(
            self.web_driver,
            UserWorkspaceLocators.SEARCH_BUTTON_MOBILE_LOCATOR.arguments)
        self.found_items_mobile = QueryItems(
            self.web_driver,
            UserWorkspaceLocators.FOUND_ITEMS_MOBILE_LOCATOR.arguments)
        self.found_items = QueryItems(
            self.web_driver,
            UserWorkspaceLocators.FOUND_ITEMS_LOCATOR.arguments)