当前位置: 首页>>代码示例>>Python>>正文


Python IndexPage.click_sign_up方法代码示例

本文整理汇总了Python中common.test.acceptance.pages.studio.index.IndexPage.click_sign_up方法的典型用法代码示例。如果您正苦于以下问题:Python IndexPage.click_sign_up方法的具体用法?Python IndexPage.click_sign_up怎么用?Python IndexPage.click_sign_up使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在common.test.acceptance.pages.studio.index.IndexPage的用法示例。


在下文中一共展示了IndexPage.click_sign_up方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: SignUpHelpTest

# 需要导入模块: from common.test.acceptance.pages.studio.index import IndexPage [as 别名]
# 或者: from common.test.acceptance.pages.studio.index.IndexPage import click_sign_up [as 别名]
class SignUpHelpTest(AcceptanceTest):
    """
    Tests help links on 'Sign Up' page.
    """
    def setUp(self):
        super(SignUpHelpTest, self).setUp()
        self.index_page = IndexPage(self.browser)
        self.index_page.visit()

    def test_sign_up_nav_help(self):
        """
        Scenario: Help link in navigation bar is working on 'Sign Up' page.
        Given that I am on the 'Sign Up" page.
        And I want help about the sign up
        And I click the 'Help' in the navigation bar
        Then Help link should open.
        And help url should end with 'getting_started/get_started.html'
        """
        sign_up_page = self.index_page.click_sign_up()
        # The href we want to see in anchor help element.
        href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/' \
               'en/open-release-ficus.master/getting_started/get_started.html'

        # Assert that help link is correct.
        assert_nav_help_link(
            test=self,
            page=sign_up_page,
            href=href,
            signed_in=False
        )
开发者ID:caesar2164,项目名称:edx-platform,代码行数:32,代码来源:test_studio_help.py

示例2: test_sign_up_with_bad_password

# 需要导入模块: from common.test.acceptance.pages.studio.index import IndexPage [as 别名]
# 或者: from common.test.acceptance.pages.studio.index.IndexPage import click_sign_up [as 别名]
    def test_sign_up_with_bad_password(self):
        """
        Scenario: Sign up from the homepage
        Given I visit the Studio homepage
        When I click the link with the text "Sign Up"
        And I fill in the registration form
        When I enter an insufficient password and focus out
        I should see an error message
        """
        index_page = IndexPage(self.browser)
        index_page.visit()
        index_page.click_sign_up()

        password_input = self.sign_up_page.input_password('a')  # Arbitrary short password that will fail
        password_input.send_keys(Keys.TAB)  # Focus out of the element
        index_page.wait_for_element_visibility('#password_error', 'Password Error Message')
        self.assertIsNotNone(index_page.q(css='#password_error').text)  # Make sure there is an error message
开发者ID:luisvasq,项目名称:edx-platform,代码行数:19,代码来源:test_studio_general.py

示例3: test_sign_up_from_home

# 需要导入模块: from common.test.acceptance.pages.studio.index import IndexPage [as 别名]
# 或者: from common.test.acceptance.pages.studio.index.IndexPage import click_sign_up [as 别名]
    def test_sign_up_from_home(self):
        """
        Scenario: Sign up from the homepage
        Given I visit the Studio homepage
        When I click the link with the text "Sign Up"
        And I fill in the registration form
        And I press the Create My Account button on the registration form
        Then I should see an email verification prompt
        """
        index_page = IndexPage(self.browser)
        index_page.visit()
        index_page.click_sign_up()

        # Register the user.
        unique_number = uuid.uuid4().hex[:4]
        self.sign_up_page.sign_up_user(
            '{}[email protected]'.format(unique_number),
            '{}-name'.format(unique_number),
            '{}-username'.format(unique_number),
            '{}-password'.format(unique_number),
        )
        home = HomePage(self.browser)
        home.wait_for_page()
开发者ID:digitalsatori,项目名称:edx-platform,代码行数:25,代码来源:test_studio_general.py


注:本文中的common.test.acceptance.pages.studio.index.IndexPage.click_sign_up方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。