当前位置: 首页>>代码示例>>Python>>正文


Python WindmillTestClient.editor方法代码示例

本文整理汇总了Python中windmill.authoring.WindmillTestClient.editor方法的典型用法代码示例。如果您正苦于以下问题:Python WindmillTestClient.editor方法的具体用法?Python WindmillTestClient.editor怎么用?Python WindmillTestClient.editor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在windmill.authoring.WindmillTestClient的用法示例。


在下文中一共展示了WindmillTestClient.editor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_Tutorial

# 需要导入模块: from windmill.authoring import WindmillTestClient [as 别名]
# 或者: from windmill.authoring.WindmillTestClient import editor [as 别名]
def test_Tutorial():
    client = WindmillTestClient(__name__)

    client.highlight(descStep=u'<p>Folders are one of the most fundamental content types in Plone. You can use a folder to organize your documents much like you already do on your desktop computer. You can also use folders to create new sections of your website.</p>', nameStep=u'Create_a_new_folder', url=u'http://localhost:8080/Plone', titleTut=u'Add publish page&folder', locators=u'', description=u"If you don't want to perform the indicated step yourself, just click the '>>' link and it will be automatically done by your browser.")
    client.click(xpath=u"//dl[@id='plone-contentmenu-factories']/dt/a/span[1]", nameStep=u'Create_a_new_folder', description=u'Click the [Add new...] drop-down menu.')
    client.click(xpath=u"//a[@id='folder']/span", nameStep=u'Create_a_new_folder', description=u'Select [Folder] from the menu.')
    client.waits.forPageLoad(nameStep=u'Create_a_new_folder', timeout=u'20000', description=u'')
    client.type(descStep=u'', nameStep=u'Fill_out_the_fields', url=u'http://localhost:8080/Plone/portal_factory/Folder/folder.2010-06-11.9668720453/edit', text=u'new folder', titleTut=u'Add publish page&folder', id=u'title', description=u"In the [Title] field, type 'new folder'.")
    client.type(text=u'a folder', description=u"In the [Description] field, type 'a folder'.", nameStep=u'Fill_out_the_fields', id=u'description')
    client.click(description=u'Now click the [Save] button at the bottom of the page to save your new folder.', nameStep=u'Fill_out_the_fields', name=u'form.button.save')
    client.waits.forPageLoad(nameStep=u'Fill_out_the_fields', timeout=u'20000', description=u'')
    client.click(xpath=u"//dl[@id='plone-contentmenu-workflow']/dt/a/span[2]", descStep=u'<p>You have now created a Folder for your Plone website. Before this folder can be viewed by anonymous site visitors, you must publish it.</p>', nameStep=u'publish_folder', url=u'http://localhost:8080/Plone/new-folder/', titleTut=u'Add publish page&folder', description=u'Click the [State] drop-down menu.')
    client.click(description=u'Select [Publish] from the menu.', nameStep=u'publish_folder', id=u'workflow-transition-publish')
    client.waits.forPageLoad(nameStep=u'publish_folder', timeout=u'20000', description=u'')
    client.highlight(descStep=u'<p>You now have a folder on your Plone website.</p>', nameStep=u'folder_create', url=u'http://localhost:8080/Plone/new-folder/', titleTut=u'Add publish page&folder', locators=u'', description=u'')
    client.waits.forPageLoad(nameStep=u'folder_create', timeout=u'20000', description=u'')
    client.click(xpath=u"//dl[@id='plone-contentmenu-factories']/dt/a/span[1]", descStep=u"<p>Now you'll create a new Page and publish it on your Plone-powered website.</p>", nameStep=u'Add_and_publish_a_Page', url=u'http://localhost:8080/Plone/new-folder/', titleTut=u'Add publish page&folder', description=u'Click the [Add new...] drop-down menu.')
    client.click(xpath=u"//a[@id='document']/span", nameStep=u'Add_and_publish_a_Page', description=u'Select [Page] from the menu.')
    client.waits.forPageLoad(nameStep=u'Add_and_publish_a_Page', timeout=u'20000', description=u'')
    client.type(descStep=u'<p>Now that you selected the Page content type, you need to supply some information about it.</p>', nameStep=u'Add_a_Page', url=u'http://localhost:8080/Plone/new-folder/portal_factory/Document/document.2010-06-11.0514121006/edit', text=u'new page', titleTut=u'Add publish page&folder', id=u'title', description=u'Provide a [Title]: New page.')
    client.type(text=u'a page', description=u'Provide a [Description]: a page.', nameStep=u'Add_a_Page', id=u'description')
    client.waits.forElement(description=u'', nameStep=u'Add_a_Page', timeout=u'40000', id=u'text')
    client.editor(nameStep=u'Add_a_Page', description=u'Add some page content in the [Body Text] field ', editor=u'<p>body text</p>', id=u'text')
    client.editorSelect(nameStep=u'Add_a_Page', description=u"highlight 'body'", bookmark=u'{"start":0,"end":4,"scrollX":0,"scrollY":0,"beg":true}', text=u'body', id=u'text')
    client.click(description=u'click the [bold button]', nameStep=u'Add_a_Page', id=u'text_bold')
    client.click(description=u'[Save] the page.', nameStep=u'Add_a_Page', name=u'form.button.save')
    client.waits.forPageLoad(nameStep=u'Add_a_Page', timeout=u'20000', description=u'')
    client.click(xpath=u"//dl[@id='plone-contentmenu-workflow']/dt/a", descStep=u'<p>You have now created a Page for your Plone website. Before this page can be viewed by anonymous site visitors, you must publish it.</p>', nameStep=u'Publish_the_page', url=u'http://localhost:8080/Plone/new-folder/new-page', titleTut=u'Add publish page&folder', description=u'Click the [State] drop-down menu.')
    client.click(description=u'Select [Publish] from the menu.', nameStep=u'Publish_the_page', id=u'workflow-transition-publish')
开发者ID:collective,项目名称:collective.amberjack.windmill,代码行数:31,代码来源:Tutorial.py


注:本文中的windmill.authoring.WindmillTestClient.editor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。