本文整理匯總了Python中common.test.acceptance.pages.studio.index.HomePage.wait_for_page方法的典型用法代碼示例。如果您正苦於以下問題:Python HomePage.wait_for_page方法的具體用法?Python HomePage.wait_for_page怎麽用?Python HomePage.wait_for_page使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類common.test.acceptance.pages.studio.index.HomePage
的用法示例。
在下文中一共展示了HomePage.wait_for_page方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_login_with_invalid_redirect
# 需要導入模塊: from common.test.acceptance.pages.studio.index import HomePage [as 別名]
# 或者: from common.test.acceptance.pages.studio.index.HomePage import wait_for_page [as 別名]
def test_login_with_invalid_redirect(self):
"""
Scenario: Login with an invalid redirect
Given I have opened a new course in Studio
And I am not logged in
And I visit the url "/signin?next=http://www.google.com/"
When I fill in and submit the signin form
Then I should see that the path is "/home/"
"""
self.install_course_fixture()
# Visit course
self.course_outline_sign_in_redirect_page.visit()
# Change redirect url
self.browser.get(self.browser.current_url.split('=')[0] + '=http://www.google.com')
# Login
self.course_outline_sign_in_redirect_page.login(self.user['email'], self.user['password'])
home = HomePage(self.browser)
home.wait_for_page()
self.assertEqual(self.browser.current_url, home.url)
示例2: test_sign_up_from_home
# 需要導入模塊: from common.test.acceptance.pages.studio.index import HomePage [as 別名]
# 或者: from common.test.acceptance.pages.studio.index.HomePage import wait_for_page [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()