def __init__(self,
              driver,
              project_key=None,
              repo_slug=None,
              pull_request_key=None):
     BasePage.__init__(self, driver)
     url_manager = UrlManager(project_key=project_key,
                              repo_slug=repo_slug,
                              pull_request_key=pull_request_key)
     self.page_url = url_manager.pull_request_overview()
     self.diff_url = url_manager.pull_request_diff()
     self.commits_url = url_manager.pull_request_commits()
Ejemplo n.º 2
0
class LoginPage(BasePage):
    page_url = UrlManager().login_url()

    def fill_username(self, username):
        self.get_element(LoginPageLocators.username_textfield).send_keys(username)

    def fill_password(self, password):
        self.get_element(LoginPageLocators.password_textfield).send_keys(password)

    def submit_login(self):
        self.wait_until_visible(LoginPageLocators.submit_button).click()

    def set_credentials(self, username, password):
        self.fill_username(username)
        self.fill_password(password)

    def get_app_version(self):
        el = self.get_element(LoginPageLocators.application_version)
        return ''.join([i for i in el.text.split('.')[0] if i.isdigit()])
 def __init__(self, driver, project_key):
     BasePage.__init__(self, driver)
     self.project_key = project_key
     url_manager = UrlManager(project_key=project_key)
     self.page_url = url_manager.project_url()
 def __init__(self, driver, project_key, repo_slug):
     BasePage.__init__(self, driver)
     url_manager = UrlManager(project_key=project_key, repo_slug=repo_slug)
     self.page_url = url_manager.commits_url()
 def __init__(self, driver, user):
     BasePage.__init__(self, driver)
     url_manager = UrlManager(user=user)
     self.page_url = url_manager.user_settings_url()
 def __init__(self, driver, user, repo_slug):
     BasePage.__init__(self, driver)
     url_manager = UrlManager(user=user, repo_slug=repo_slug)
     self.page_url = url_manager.fork_repo_url()
 def __init__(self, driver, project_key, repo_slug):
     BasePage.__init__(self, driver)
     self.url_manager = UrlManager(project_key=project_key,
                                   repo_slug=repo_slug)
     self.page_url = self.url_manager.repo_branches()