當前位置: 首頁>>代碼示例>>Python>>正文


Python ContainerPage.wait_for_element_presence方法代碼示例

本文整理匯總了Python中common.test.acceptance.pages.studio.container.ContainerPage.wait_for_element_presence方法的典型用法代碼示例。如果您正苦於以下問題:Python ContainerPage.wait_for_element_presence方法的具體用法?Python ContainerPage.wait_for_element_presence怎麽用?Python ContainerPage.wait_for_element_presence使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在common.test.acceptance.pages.studio.container.ContainerPage的用法示例。


在下文中一共展示了ContainerPage.wait_for_element_presence方法的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_presence [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)
開發者ID:digitalsatori,項目名稱:edx-platform,代碼行數:21,代碼來源:test_lms_dashboard_search.py

示例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_presence [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)
開發者ID:digitalsatori,項目名稱:edx-platform,代碼行數:23,代碼來源:test_lms_courseware_search.py


注:本文中的common.test.acceptance.pages.studio.container.ContainerPage.wait_for_element_presence方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。