本文整理匯總了Python中common.test.acceptance.pages.studio.index.IndexPage.q方法的典型用法代碼示例。如果您正苦於以下問題:Python IndexPage.q方法的具體用法?Python IndexPage.q怎麽用?Python IndexPage.q使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類common.test.acceptance.pages.studio.index.IndexPage
的用法示例。
在下文中一共展示了IndexPage.q方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: 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 q [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