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