本文整理匯總了Python中common.test.acceptance.pages.studio.container.ContainerPage.wait_for_element_visibility方法的典型用法代碼示例。如果您正苦於以下問題:Python ContainerPage.wait_for_element_visibility方法的具體用法?Python ContainerPage.wait_for_element_visibility怎麽用?Python ContainerPage.wait_for_element_visibility使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類common.test.acceptance.pages.studio.container.ContainerPage
的用法示例。
在下文中一共展示了ContainerPage.wait_for_element_visibility方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _studio_add_content
# 需要導入模塊: from common.test.acceptance.pages.studio.container import ContainerPage [as 別名]
# 或者: from common.test.acceptance.pages.studio.container.ContainerPage import wait_for_element_visibility [as 別名]
def _studio_add_content(self, studio_course_outline, html_content):
"""
Add content to first section on studio course page.
"""
# create a unit in course outline
studio_course_outline.visit()
subsection = studio_course_outline.section_at(0).subsection_at(0)
subsection.expand_subsection()
subsection.add_unit()
# got to unit and create an HTML component and save (not publish)
unit_page = ContainerPage(self.browser, None)
unit_page.wait_for_page()
add_html_component(unit_page, 0)
unit_page.wait_for_element_presence('.edit-button', 'Edit button is visible')
click_css(unit_page, '.edit-button', 0, require_notification=False)
unit_page.wait_for_element_visibility('.modal-editor', 'Modal editor is visible')
type_in_codemirror(unit_page, 0, html_content)
click_css(unit_page, '.action-save', 0)
示例2: _studio_add_content
# 需要導入模塊: from common.test.acceptance.pages.studio.container import ContainerPage [as 別名]
# 或者: from common.test.acceptance.pages.studio.container.ContainerPage import wait_for_element_visibility [as 別名]
def _studio_add_content(self, section_index):
"""
Add content on studio course page under specified section
"""
self._auto_auth(self.STAFF_USERNAME, self.STAFF_EMAIL, True)
# create a unit in course outline
self.studio_course_outline.visit()
subsection = self.studio_course_outline.section_at(section_index).subsection_at(0)
subsection.expand_subsection()
subsection.add_unit()
# got to unit and create an HTML component and save (not publish)
unit_page = ContainerPage(self.browser, None)
unit_page.wait_for_page()
add_html_component(unit_page, 0)
unit_page.wait_for_element_presence('.edit-button', 'Edit button is visible')
click_css(unit_page, '.edit-button', 0, require_notification=False)
unit_page.wait_for_element_visibility('.modal-editor', 'Modal editor is visible')
type_in_codemirror(unit_page, 0, self.HTML_CONTENT)
click_css(unit_page, '.action-save', 0)