Commit 7a6ad467 authored by Sven Franck's avatar Sven Franck

erp5_corporate_identity: remove template zuite again as it fails in test environment

parent 4b73d897
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testAndUpdateTestBookTemplate</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test and Update Test Files for BOOK Template</title>
</head>
<body>
<!--
UPDATE comparison files for LIVE TESTS | DON'T RUN AUTOMATICALLY
(else tests will always pass...)
This Zuite updates all test files (diff-html, pdfs, bmps) used in the LiveTests
based on the example web pages included in this bt5. Run this zuite after making
changes to the bt5 which will alter their look to automatically update all files
(else you need to do it by hand). This also means: DON'T RUN THIS AUTOMATICALLY,
because it will also update all test files with any errors you make, causing
liveTests to always pass (comparing wrong rendering to wrong test file).
Help:
http://www.seleniumhq.org/docs/02_selenium_ide.jsp#selenium-commands-selenese
http://seleniummaster.com/sitecontent/index.php/introduction-to-selenium-automation/selenium-ide/114-selenium-ide-complete-list-of-commands
-->
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<!-- update 1st output - template_test_book_output_expected_001_en_html -->
<tr>
<td>echo</td>
<td>action => export</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>update => template_test_book_output_expected_001_en_html</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Book</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=3</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Book</td>
<td></td>
</tr>
<tr>
<td>uncheck</td>
<td>name=field_include_content_table</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>ISO 16016</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Book%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Book.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Book.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 2nd output - template_test_book_output_expected_002_en_html -->
<tr>
<td>echo</td>
<td>update => template_test_lealflet_book_expected_002_en_html</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Book</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- don't save once to set modification date for live tests, because this
will up revision and it's the second time this document is used, so
revision on prior tests using this web page will be off by 1
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
-->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=3</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Book</td>
<td></td>
</tr>
<!-- Base_callDialogMethod max 2000 chars for url_params_string fails here -->
<tr>
<td>type</td>
<td>name=field_override_logo_reference</td>
<td>Template.Test.Image.Erp5.Logo</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_history_table</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_content_table</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_reference_table</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_linked_content</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_report_content</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_description</td>
<td>foobar</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_title</td>
<td>Couscous</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_short_title</td>
<td>Cous</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_reference</td>
<td>P-XYZ-Foobar</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_organisation_title</td>
<td>Test Organisation</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_person_title</td>
<td>Test Sender</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_version</td>
<td>333</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>ISO 16016</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Book%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Book.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Book.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 3rd output - template_test_book_output_expected_003_de_html -->
<tr>
<td>echo</td>
<td>update => template_test_book_output_expected_003_de_html</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Book</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=3</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Book</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>ISO 16016</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Book%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>003</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Book.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Book.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 1st pdf documents - template_test_book_input_001_en_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_book_input_001_en_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Book</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=3</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Book</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>uncheck</td>
<td>name=field_include_content_table</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<tr>
<td>verifyTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't access pdf source inside iframe, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob"; xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice-->
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Book</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Book-001-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_book_input_page_4_001_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_book_input_page_4_001_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=4&amp;id=template_test_book_input_page_4_001_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- update 2nd pdf document - template_test_book_input_002_en_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_book_input_002_en_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Book</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=3</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Book</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_history_table</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_content_table</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_reference_table</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_linked_content</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_report_content</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_description</td>
<td>foobar</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_title</td>
<td>Couscous</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_short_title</td>
<td>Cous</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_reference</td>
<td>P-XYZ-Foobar</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_logo_reference</td>
<td>Template.Test.Image.Erp5.Logo</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_organisation_title</td>
<td>Test Organisation</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_person_title</td>
<td>Test Sender</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_version</td>
<td>333</td>
</tr>
<!-- update dialog fails if param-string is larger than 2000 chars (here) -->
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<tr>
<td>verifyTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch pdf source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice-->
<tr>
<td>pause</td>
<td>9000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Book</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "P-XYZ-Foobar-333-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate images -
template_test_book_input_page_4_002_en_bmp
template_test_book_input_page_5_002_en_bmp
template_test_book_input_page_9_002_en_bmp
-->
<tr>
<td>echo</td>
<td>update => template_test_book_input_page_4_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=4&amp;id=template_test_book_input_page_4_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=5&amp;id=template_test_book_input_page_5_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=10&amp;id=template_test_book_input_page_10_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- update 3rd pdf document - template_test_book_input_003_de_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_book_input_003_de_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Book</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=3</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Book</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<tr>
<td>verifyTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch pdf source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice-->
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>003</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Book</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Book-003-de.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_book_input_page_1_003_de_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_book_input_page_1_003_de_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=1&amp;id=template_test_book_input_page_1_003_de_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- make sure print exchange works -->
<tr>
<td>echo</td>
<td>action => print</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Book</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="print"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="print"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Print As Book</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=3</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Include History Table</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testAndUpdateTestLeafletTemplate</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test and Update Test Files for LEAFLET Template</title>
</head>
<body>
<!--
UPDATE comparison files for LIVE TESTS | DON'T RUN AUTOMATICALLY
(else tests will always pass...)
This Zuite updates all test files (diff-html, pdfs, bmps) used in the LiveTests
based on the example web pages included in this bt5. Run this zuite after making
changes to the bt5 which will alter their look to automatically update all files
(else you need to do it by hand). This also means: DON'T RUN THIS AUTOMATICALLY,
because it will also update all test files with any errors you make, causing
liveTests to always pass (comparing wrong rendering to wrong test file).
Help:
http://www.seleniumhq.org/docs/02_selenium_ide.jsp#selenium-commands-selenese
http://seleniummaster.com/sitecontent/index.php/introduction-to-selenium-automation/selenium-ide/114-selenium-ide-complete-list-of-commands
-->
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<!-- update 1st output - template_test_lealflet_output_expected_001_en_html -->
<tr>
<td>echo</td>
<td>action => export</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>update => template_test_lealflet_output_expected_001_en_html</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Leaflet</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=2</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Leaflet</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>©</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Leaflet%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Leaflet.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Leaflet.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 2nd output - template_test_leaflet_output_expected_002_en_html -->
<tr>
<td>echo</td>
<td>update => template_test_lealflet_output_expected_002_en_html</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Leaflet</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=2</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Leaflet</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_organisation_title</td>
<td>Test Association</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_person_title</td>
<td>Test Recipient</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_leaflet_header_title</td>
<td>Couscous</td>
</tr>
<tr>
<td>uncheck</td>
<td>name=field_display_side</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>©</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Leaflet%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Leaflet.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Leaflet.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 3rd output - template_test_leaflet_output_expected_003_de_html -->
<tr>
<td>echo</td>
<td>update => template_test_leaflet_output_expected_003_de_html</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Leaflet</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=2</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Leaflet</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>©</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Leaflet%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>003</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Leaflet.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Leaflet.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 1st pdf documents - template_test_leaflet_input_001_en_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_leaflet_input_001_en_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Leaflet</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=2</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Leaflet</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<tr>
<td>verifyTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't access pdf source inside iframe, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob"; xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice, 3000 not enough-->
<tr>
<td>pause</td>
<td>6000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Leaflet</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Leaflet-001-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_leaflet_input_page_1_001_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_leaflet_input_page_1_001_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=1&amp;id=template_test_leaflet_input_page_1_001_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- update 2nd pdf document - template_test_leaflet_input_002_en_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_leaflet_input_002_en_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Leaflet</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=2</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Leaflet</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_organisation_title</td>
<td>Test Association</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_person_title</td>
<td>Test Recipient</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_leaflet_header_title</td>
<td>Couscous</td>
</tr>
<tr>
<td>check</td>
<td>name=field_display_side</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<tr>
<td>verifyTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch pdf source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice-->
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Leaflet</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Leaflet-002-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_leaflet_input_page_0_002_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_leaflet_input_page_0_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;id=template_test_leaflet_input_page_0_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- update 3rd pdf document - template_test_leaflet_input_003_de_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_leaflet_input_003_de_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Leaflet</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=2</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Leaflet</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<tr>
<td>verifyTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch pdf source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice-->
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>003</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Leaflet</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Leaflet-003-de.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_leaflet_input_page_0_003_de_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_leaflet_input_page_0_003_de_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;id=template_test_leaflet_input_page_0_003_de_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- make sure print exchange works -->
<tr>
<td>echo</td>
<td>action => print</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Leaflet</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="print"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="print"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Print As Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=2</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Display Side Panel</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testAndUpdateTestLetterTemplate</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test and Update Test Files for LETTER Template</title>
</head>
<body>
<!--
UPDATE comparison files for LIVE TESTS | DON'T RUN AUTOMATICALLY
(else tests will always pass...)
This Zuite updates all test files (diff-html, pdfs, bmps) used in the LiveTests
based on the example web pages included in this bt5. Run this zuite after making
changes to the bt5 which will alter their look to automatically update all files
(else you need to do it by hand). This also means: DON'T RUN THIS AUTOMATICALLY,
because it will also update all test files with any errors you make, causing
liveTests to always pass (comparing wrong rendering to wrong test file).
Help:
http://www.seleniumhq.org/docs/02_selenium_ide.jsp#selenium-commands-selenese
http://seleniummaster.com/sitecontent/index.php/introduction-to-selenium-automation/selenium-ide/114-selenium-ide-complete-list-of-commands
-->
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<!-- update 1st output - template_test_letter_output_expected_001_en_html -->
<tr>
<td>echo</td>
<td>action => export</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>update => template_test_letter_output_expected_001_en_html</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=1</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Letter</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[contains(text(), 'IBAN')]</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Letter%</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Letter.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Letter.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 2nd output - template_test_letter_output_expected_002_en_html -->
<tr>
<td>echo</td>
<td>update => template_test_letter_output_expected_002_en_html</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=1</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Letter</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[contains(text(), 'IBAN')]</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Letter%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Letter.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Letter.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 3rd output - template_test_letter_output_expected_003_en_html -->
<tr>
<td>echo</td>
<td>update => template_test_letter_output_expected_003_en_html</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>003</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=1</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Letter</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_organisation_title</td>
<td>Test Association</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_person_title</td>
<td>Test Association Member</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_destination_organisation_title</td>
<td>Test Association</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_destination_person_title</td>
<td>Test Association Member</td>
</tr>
<tr>
<td>type</td>
<td>name=subfield_field_override_date_year</td>
<td>1999</td>
</tr>
<tr>
<td>type</td>
<td>name=subfield_field_override_date_month</td>
<td>12</td>
</tr>
<tr>
<td>type</td>
<td>subfield_field_override_date_day</td>
<td>31</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[contains(text(), 'IBAN')]</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Letter%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>003</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Letter.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Letter.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 4th output - template_test_letter_output_expected_004_de_html -->
<tr>
<td>echo</td>
<td>update => template_test_letter_output_expected_004_de_html</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>004</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=1</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Letter</td>
<td></td>
</tr>
<tr>
<td>uncheck</td>
<td>name=field_display_head</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[contains(text(), 'IBAN')]</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Letter%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>004</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Letter.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Letter.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 1st pdf documents - template_test_letter_input_001_en_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_letter_input_001_en_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=1</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Letter</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't access pdf source inside iframe, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob"; xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice, 3000 not enough -->
<tr>
<td>pause</td>
<td>6000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Letter-001-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_slideshow_input_slide_0_001_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_slide_0_001_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;id=template_test_letter_input_page_0_001_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- update 2nd pdf document - template_test_letter_input_002_en_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_letter_input_002_en_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=1</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Letter</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch pdf source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice, 3000 not enough-->
<tr>
<td>pause</td>
<td>6000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Letter-002-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_letter_input_page_0_002_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_letter_input_page_0_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;id=template_test_letter_input_page_0_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- update 3rd pdf document - template_test_letter_input_003_en_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_letter_input_003_en_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>003</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=1</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Letter</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_organisation_title</td>
<td>Test Association</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_person_title</td>
<td>Test Association Member</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_destination_organisation_title</td>
<td>Test Association</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_destination_person_title</td>
<td>Test Association Member</td>
</tr>
<tr>
<td>type</td>
<td>name=subfield_field_override_date_year</td>
<td>1999</td>
</tr>
<tr>
<td>type</td>
<td>name=subfield_field_override_date_month</td>
<td>12</td>
</tr>
<tr>
<td>type</td>
<td>subfield_field_override_date_day</td>
<td>31</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch pdf source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice, 3000 not enough-->
<tr>
<td>pause</td>
<td>6000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>003</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Letter-003-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_letter_input_page_0_003_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_letter_input_page_0_003_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?shot?frame=0&amp;id=template_test_letter_input_page_0_003_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- update 4th pdf document - template_test_slideshow_input_004_en_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_004_en_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>004</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=1</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Letter</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>uncheck</td>
<td>name=field_display_head</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch pdf source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice, not 3000-->
<tr>
<td>pause</td>
<td>6000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>004</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Letter-004-de.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_letter_input_page_1_004_de_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_letter_input_page_1_004_de_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=1&amp;id=template_test_letter_input_page_1_004_de_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- make sure print exchange works -->
<tr>
<td>echo</td>
<td>action => print</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="print"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="print"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Print As Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=1</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Display Letter Head</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testAndUpdateTestSlideTemplate</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test and Update Test Files for SLIDE Template</title>
</head>
<body>
<!--
UPDATE comparison files for LIVE TESTS | DON'T RUN AUTOMATICALLY
(else tests will always pass...)
This Zuite updates all test files (diff-html, pdfs, bmp) used in the LiveTests
based on the example web pages included in this bt5. Run this zuite after making
changes to the bt5 which will alter their look to automatically update all files
(else you need to do it by hand). This also means: DON'T RUN THIS AUTOMATICALLY,
because it will also update all test files with any berrors you make, causing
liveTests to always pass (comparing wrong rendering to wrong test file).
Help:
http://www.seleniumhq.org/docs/02_selenium_ide.jsp#selenium-commands-selenese
http://seleniummaster.com/sitecontent/index.php/introduction-to-selenium-automation/selenium-ide/114-selenium-ide-complete-list-of-commands
Note:
uses pause to wait for Cloudooo pdf rendering
-->
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<!-- update 1st output - template_test_slideshow_output_expected_001_en_html -->
<tr>
<td>echo</td>
<td>action => export</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>update => template_test_slideshow_output_expected_001_en_html</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//section[@class="ci-slideshow-intro present"]</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});}; ajax(storedVars["url"].split("#")[0] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Slide%</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Slideshow.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Slideshow.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 2nd output - template_test_slideshow_output_expected_002_en_html -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_output_expected_002_en_html</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_logo_reference</td>
<td>Template.Test.Image.Logo.Alternativ</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_organisation_title</td>
<td>Foobarbazbam</td>
</tr>
<tr>
<td>click</td>
<td>//input[@value="svg"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>name=field_display_svg</td>
<td>on</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//section[@class="ci-slideshow-intro present"]</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"].split("#")[0] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Slide%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Slideshow.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Slideshow.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 3rd output - template_test_slideshow_output_expected_003_en_html -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_output_expected_003_en_html</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//section[@class="ci-slideshow-intro present"]</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"].split("#")[0] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Slide%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>003</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Slideshow.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Slideshow.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 1st pdf documents - template_test_slideshow_input_001_en_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_001_en_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't access pdf source inside iframe, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob"; xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"].split("#")[0] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice-->
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Slideshow-001-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_slideshow_input_slide_0_001_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_slide_0_001_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;id=template_test_slideshow_input_slide_0_001_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- update 2nd pdf document - template_test_slideshow_input_004_en_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_004_en_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>check</td>
<td>name=field_display_note</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch pdf source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"].split("#")[0] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice-->
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>004</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Slideshow-004-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_slideshow_input_slide_13_004_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_slide_13_004_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=13&amp;id=template_test_slideshow_input_slide_13_004_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- update 3rd pdf document - template_test_slideshow_input_002_en_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_002_en_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch pdf source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"].split("#")[0] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice-->
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Slideshow-002-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_slideshow_input_slide_0_002_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_slide_0_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?shot?frame=0&amp;id=template_test_slideshow_input_slide_0_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- update 4th pdf document - template_test_slideshow_input_003_en_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_003_en_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_logo_reference</td>
<td>Template.Test.Image.Erp5.Logo</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_organisation_title</td>
<td>Couscous</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch pdf source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"].split("#")[0] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice, 3000 not long enough -->
<tr>
<td>pause</td>
<td>6000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>003</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Slideshow-003-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_slideshow_input_slide_0_003_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_slide_0_003_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;id=template_test_slideshow_input_slide_0_003_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- update 5th pdf document - template_test_slideshow_input_005_de_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_005_de_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>003</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>check</td>
<td>name=field_display_note</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch pdf source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"].split("#")[0] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice, 3000 not long enough-->
<tr>
<td>pause</td>
<td>6000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>005</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template_test_slideshow_005_de_pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_slideshow_input_slide_8_005_de_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_slide_8_005_de_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=8&amp;id=template_test_slideshow_input_slide_8_005_de_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- make sure print exchange works -->
<tr>
<td>echo</td>
<td>print dialog</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="print"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="print"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Print As Slideshow</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<!-- make sure action slideshow view works -->
<tr>
<td>echo</td>
<td>print dialog</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Slideshow</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Slideshow</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//img[@title="View As Slideshow"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//img[@title="View As Slideshow"]</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//section[@class="ci-slideshow-intro present"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
...@@ -6,5 +6,4 @@ organisation_module/template_test*/default** ...@@ -6,5 +6,4 @@ organisation_module/template_test*/default**
person_module/template_test* person_module/template_test*
person_module/template_test*/default** person_module/template_test*/default**
portal_preferences/default_site_preference/template_* portal_preferences/default_site_preference/template_*
portal_tests/template_zuite/testAndUpdateTest*
web_page_module/template_test_* web_page_module/template_test_*
\ No newline at end of file
...@@ -6,5 +6,4 @@ organisation_module/template_test*/default** ...@@ -6,5 +6,4 @@ organisation_module/template_test*/default**
person_module/template_test* person_module/template_test*
person_module/template_test*/default** person_module/template_test*/default**
portal_preferences/default_site_preference/template_* portal_preferences/default_site_preference/template_*
portal_tests/template_zuite/testAndUpdateTest*
web_page_module/template_test_* web_page_module/template_test_*
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment