From dc04a8d70b838b15d396fa0fd31c062024c5fde9 Mon Sep 17 00:00:00 2001 From: 1letter <1letter@gmx.de> Date: Wed, 9 Oct 2024 09:10:58 +0200 Subject: [PATCH 1/2] port robot tests to playwright based test, use browser library --- .../robot/{keywords.txt => keywords.robot} | 67 +++++++---------- .../test_collection_creator_criterion.robot | 33 +++------ .../test_collection_location_criterion.robot | 53 +++++--------- ...st_collection_review_state_criterion.robot | 31 +++----- ...test_collection_short_name_criterion.robot | 43 ++++++----- .../test_collection_type_criterion.robot | 33 +++------ .../tests/robot/test_folderlisting.robot | 71 +++++++++---------- 7 files changed, 124 insertions(+), 207 deletions(-) rename plone/app/contenttypes/tests/robot/{keywords.txt => keywords.robot} (55%) diff --git a/plone/app/contenttypes/tests/robot/keywords.txt b/plone/app/contenttypes/tests/robot/keywords.robot similarity index 55% rename from plone/app/contenttypes/tests/robot/keywords.txt rename to plone/app/contenttypes/tests/robot/keywords.robot index 2f204e59..db9d3726 100644 --- a/plone/app/contenttypes/tests/robot/keywords.txt +++ b/plone/app/contenttypes/tests/robot/keywords.robot @@ -34,11 +34,10 @@ a event a file [Arguments] ${title} Go to ${PLONE_URL}/++add++File - Wait until page contains Add File - Input text name=form.widgets.title ${title} + Fill text name=form.widgets.title ${title} Choose File name=form.widgets.file ${PATH_TO_TEST_FILES}/file.pdf - Wait For Then Click Element css=#form-buttons-save - Wait until page contains Item created + Click css=#form-buttons-save + Get text body contains Item created a folder [Arguments] ${title} @@ -48,11 +47,10 @@ a folder a image [Arguments] ${title} Go to ${PLONE_URL}/++add++Image - Wait until page contains Add Image - Input text name=form.widgets.title ${title} + Fill text name=form.widgets.title ${title} Choose File name=form.widgets.image ${PATH_TO_TEST_FILES}/image.png - Wait For Then Click Element css=#form-buttons-save - Wait until page contains Item created error=Image could not be created. + Click css=#form-buttons-save + Get text body contains Item created a link [Arguments] ${title} @@ -63,10 +61,9 @@ a link a news item [Arguments] ${title} Go to ${PLONE_URL}/++add++News Item - Wait until page contains Add News Item - Input text name=form.widgets.IDublinCore.title ${title} - Wait For Then Click Element css=#form-buttons-save - Wait until page contains Item created + Fill text css=[name="form.widgets.IDublinCore.title"] ${title} + Click css=#form-buttons-save + Get text body contains Item created # ---------------------------------------------------------------------------- @@ -75,17 +72,15 @@ a news item the content area should contain [Arguments] ${text} - Element Should Contain id=content ${text} + Get text id=content contains ${text} the content area should not contain [Arguments] ${text} - Element Should Not Contain id=content ${text} + Get Text id=content != ${text} the collection should contain [Arguments] ${title} - Wait until page contains element xpath=//*[@id='content-core'] - Page should contain element //*[@id='content-core']//article//a[contains(text(), '${title}')] limit=1 - + Get Element //*[@id='content-core']//article//a[contains(text(), '${title}')] the collection should not contain [Arguments] ${title} @@ -101,34 +96,22 @@ fill date field Click Element xpath=//div[@data-fieldname="${fieldid}"]//div[contains(@class, 'picker__day')][contains(text(), "${day}")] I set the criteria ${type} in row ${number} to the option '${label}' - [Documentation] A couple of times we shift the focus so the input sticks, and wait a bit, - ... to make the test more stable. ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(${number}) - Wait until page contains element css=${criteria_row} .querystring-criteria-${type} .select2-choice - Click Element css=${criteria_row} .querystring-criteria-${type} .select2-choice - Sleep 1.5 - Set Focus To Element css=body - Wait until element is visible css=#select2-drop input - Input Text css=#select2-drop input ${label} - Sleep 1.5 - Set Focus To Element css=body - Wait until element is visible css=#select2-drop .select2-match - Click Element css=#select2-drop .select2-match - Sleep 1.5 - Set Focus To Element css=body + Click css=${criteria_row} .querystring-criteria-${type} .select2-choice + Fill Text css=#select2-drop input ${label} + Click xpath=//*[@id="select2-drop"]//*[@class="select2-match"] I set the criteria ${type} in row ${number} to the options '${label}' - ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(${number}) - Wait until page contains element css=${criteria_row} .querystring-criteria-${type} .select2-choices - Click Element css=${criteria_row} .querystring-criteria-${type} .select2-choices - Wait until page contains element css=.select2-input.select2-focused - Input text css=.select2-input.select2-focused ${label}\n -# Click Element xpath=//div[@class='select2-result-label']/descendant-or-self::*[contains(text(), '${label}')] + ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(1) + Click css=${criteria_row} .querystring-criteria-value .select2-choices + Fill text css=.select2-input.select2-focused ${label}\n + Click css=.select2-highlighted + Get text css=${criteria_row} .select2-search-choice contains ${label} + [Documentation] Chrome needs some more time + Sleep .1s I set the criteria ${type} in row ${number} to the text '${label}' ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(${number}) - Input text css=${criteria_row} .querystring-criteria-value input ${label}\t - [Documentation] Shift the focus so the input sticks, and wait a bit - Sleep 1.5 - Set Focus To Element css=.querystring-sortreverse - Sleep 1.5 + Fill text css=${criteria_row} .querystring-criteria-value input ${label} + Click css=.autotoc-level-1.active + Sleep 1s \ No newline at end of file diff --git a/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot index b957e869..4b6863ea 100644 --- a/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot +++ b/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot @@ -1,27 +1,15 @@ -# ============================================================================ -# Tests for the Collection Creator Criterion -# ============================================================================ -# -# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING -# -# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot -# -# ============================================================================ - -*** Settings ***************************************************************** - -Resource plone/app/robotframework/keywords.robot -Resource plone/app/robotframework/saucelabs.robot -Resource plone/app/robotframework/selenium.robot -Resource keywords.txt +*** Settings *** + +Resource plone/app/robotframework/browser.robot +Resource plone/app/robotframework/user.robot +Resource keywords.robot Library Remote ${PLONE_URL}/RobotRemote Test Setup Run Keywords Plone test setup Test Teardown Run keywords Plone test teardown - -*** Test cases *************************************************************** +*** Test cases *** Scenario: Test Creator Criterions Given a site owner document Site Owner Document @@ -33,7 +21,7 @@ Scenario: Test Creator Criterions And the collection should contain Site Owner Document -*** Keywords ***************************************************************** +*** Keywords *** a site owner document [Arguments] ${title} @@ -49,11 +37,10 @@ a test user document I set the collection's creator criterion to the current logged in user Go to ${PLONE_URL}/my-collection/edit - Wait until page contains Edit Collection + Get Text body contains Edit Collection I set the criteria index in row 1 to the option 'Creator' I set the criteria operator in row 1 to the option 'Current' - Sleep 1 - Click Button Save - Wait until page contains Changes saved + Click "Save" + Get Text body contains Changes saved \ No newline at end of file diff --git a/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot index eb2dc752..c98cdb16 100644 --- a/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot +++ b/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot @@ -1,19 +1,7 @@ -# ============================================================================ -# Tests for the Collection Location Criterion -# ============================================================================ -# -# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING -# -# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot -# -# ============================================================================ - -*** Settings ***************************************************************** - -Resource plone/app/robotframework/keywords.robot -Resource plone/app/robotframework/saucelabs.robot -Resource plone/app/robotframework/selenium.robot -Resource keywords.txt +*** Settings *** + +Resource plone/app/robotframework/browser.robot +Resource keywords.robot Variables variables.py @@ -21,11 +9,9 @@ Test Setup Run Keywords Plone test setup Test Teardown Run keywords Plone test teardown -*** Test cases *************************************************************** +*** Test cases *** Scenario: Test Relative Location Criterion - [Documentation] This sometimes fails with: - ... Element locator 'css=#select2-drop input' did not match any elements after 30 seconds Given I am logged in as site owner And a document Document outside Folder And a folder 'my-folder' with a document 'Document within Folder' @@ -36,9 +22,6 @@ Scenario: Test Relative Location Criterion Scenario: Test Absolute Location Criterion - [Documentation] This sometimes fails with: - ... Element locator 'css=#select2-drop input' did not match any elements after 30 seconds - ... Or with: Element 'id=content' should not contain text 'Document outside Folder' but it did. Given I am logged in as site owner And a document Document outside Folder And a folder 'my-folder' with a document 'Document within Folder' @@ -52,14 +35,14 @@ Scenario: Test Absolute Location Criterion a folder '${folder-id}' with a document '${document-title}' Go to ${PLONE_URL}/++add++Folder - Wait until page contains element name=form.widgets.IDublinCore.title - Input text name=form.widgets.IDublinCore.title ${folder-id} - Click Button Save + # Wait until page contains element name=form.widgets.IDublinCore.title + Fill text xpath=//*[@name="form.widgets.IDublinCore.title"] ${folder-id} + Click "Save" Go to ${PLONE_URL}/${folder-id}/++add++Document - Wait until page contains element name=form.widgets.IDublinCore.title - Input text name=form.widgets.IDublinCore.title ${document-title} - Click Button Save - Wait until page contains Item created + # Wait until page contains element name=form.widgets.IDublinCore.title + Fill text xpath=//*[@name="form.widgets.IDublinCore.title"] ${document-title} + Click "Save" + # Wait until page contains Item created I set the collection's location criterion to Advanced Mode I set the criteria operator in row 1 to the option 'Advanced Mode' @@ -67,7 +50,7 @@ I set the collection's location criterion to Advanced Mode I set the collection's relative location criterion to [Arguments] ${criterion} Go to ${PLONE_URL}/my-collection/edit - Wait until page contains Edit Collection + # Wait until page contains Edit Collection I set the criteria index in row 1 to the option 'Location' @@ -76,13 +59,13 @@ I set the collection's relative location criterion to I set the criteria operator in row 1 to the option 'Relative path' I set the criteria value in row 1 to the text '${criterion}' - Click Button Save - Wait until page contains Changes saved + Click "Save" + # Wait until page contains Changes saved I set the collection's absolute location criterion to [Arguments] ${criterion} Go to ${PLONE_URL}/my-collection/edit - Wait until page contains Edit Collection + # Wait until page contains Edit Collection I set the criteria index in row 1 to the option 'Location' @@ -91,5 +74,5 @@ I set the collection's absolute location criterion to I set the criteria operator in row 1 to the option 'Absolute path' I set the criteria value in row 1 to the text '${criterion}' - Click Button Save - Wait until page contains Changes saved + Click "Save" + # Wait until page contains Changes saved \ No newline at end of file diff --git a/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot index 719d7f97..52735972 100644 --- a/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot +++ b/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot @@ -1,25 +1,15 @@ -# ============================================================================ -# Tests for the Collection Type Criterion -# ============================================================================ -# -# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING -# -# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot -# -# ============================================================================ - -*** Settings ***************************************************************** - -Resource plone/app/robotframework/keywords.robot -Resource plone/app/robotframework/saucelabs.robot -Resource plone/app/robotframework/selenium.robot -Resource keywords.txt +*** Settings *** + +Resource plone/app/robotframework/browser.robot +Resource keywords.robot + +Variables variables.py Test Setup Run Keywords Plone test setup Test Teardown Run keywords Plone test teardown -*** Test cases *************************************************************** +*** Test cases *** Scenario: Test Review state Criterion Given I am logged in as site owner @@ -31,7 +21,7 @@ Scenario: Test Review state Criterion And the collection should not contain Published Document -*** Keywords ***************************************************************** +*** Keywords *** a published document [Arguments] ${title} @@ -45,12 +35,9 @@ a private document I set the collection's review state criterion to [Arguments] ${criterion} Go to ${PLONE_URL}/my-collection/edit - Wait until page contains Edit Collection I set the criteria index in row 1 to the option 'Review state' I set the criteria operator in row 1 to the option 'Any' I set the criteria value in row 1 to the options '${criterion}' - Sleep 1 - Click Button Save - Wait until page contains Changes saved + Click "Save" \ No newline at end of file diff --git a/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot index cf09f277..f9bc1c88 100644 --- a/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot +++ b/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot @@ -1,25 +1,15 @@ -# ============================================================================ -# Tests for the Collection Short Name Criterion -# ============================================================================ -# -# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING -# -# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot -# -# ============================================================================ - -*** Settings ***************************************************************** - -Resource plone/app/robotframework/keywords.robot -Resource plone/app/robotframework/saucelabs.robot -Resource plone/app/robotframework/selenium.robot -Resource keywords.txt +*** Settings *** + +Resource plone/app/robotframework/browser.robot +Resource keywords.robot + +Variables variables.py Test Setup Run Keywords Plone test setup Test Teardown Run keywords Plone test teardown -*** Test cases *************************************************************** +*** Test cases *** Test Short name (id) Criterion Given I am logged in as site owner @@ -31,17 +21,24 @@ Test Short name (id) Criterion And the collection should not contain Second Document -*** Keywords ***************************************************************** +*** Keywords *** I set the collection short name (id) criterion to [Arguments] ${criterion} Go to ${PLONE_URL}/my-collection/edit - Wait until page contains Edit Collection I set the criteria index in row 1 to the option 'Short name' - I set the criteria operator in row 1 to the option 'Is' + #I set the criteria operator in row 1 to the option 'Is' + + ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(1) + Click css=${criteria_row} .querystring-criteria-operator .select2-choice + Fill Text css=#select2-drop input Is + Click css=.select2-highlighted + + I set the criteria value in row 1 to the text '${criterion}' + [Documentation] Chrome needs some more time + Sleep .1s - Sleep 1 - Click Button Save - Wait until page contains Changes saved + Click "Save" + Get text body contains Changes saved \ No newline at end of file diff --git a/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot index d7a2bbf6..60d53bb8 100644 --- a/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot +++ b/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot @@ -1,25 +1,14 @@ -# ============================================================================ -# Tests for the Collection Type Criterion -# ============================================================================ -# -# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING -# -# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot -# -# ============================================================================ - -*** Settings ***************************************************************** - -Resource plone/app/robotframework/keywords.robot -Resource plone/app/robotframework/saucelabs.robot -Resource plone/app/robotframework/selenium.robot -Resource keywords.txt +*** Settings *** + +Resource plone/app/robotframework/browser.robot +Resource keywords.robot + +Variables variables.py Test Setup Run Keywords Plone test setup Test Teardown Run keywords Plone test teardown - -*** Test cases *************************************************************** +*** Test cases *** Test Type Criterion Given I am logged in as site owner @@ -31,17 +20,15 @@ Test Type Criterion And the collection should not contain Test Document -*** Keywords ***************************************************************** +*** Keywords *** I set the collection's type criterion to [Arguments] ${criterion} Go to ${PLONE_URL}/my-collection/edit - Wait until page contains Edit Collection I set the criteria index in row 1 to the option 'Type' I set the criteria operator in row 1 to the option 'Any' I set the criteria value in row 1 to the options '${criterion}' - Sleep 1 - Click Button Save - Wait until page contains Changes saved + Click "Save" + Get text body contains Changes saved \ No newline at end of file diff --git a/plone/app/contenttypes/tests/robot/test_folderlisting.robot b/plone/app/contenttypes/tests/robot/test_folderlisting.robot index a64f535d..feb83513 100644 --- a/plone/app/contenttypes/tests/robot/test_folderlisting.robot +++ b/plone/app/contenttypes/tests/robot/test_folderlisting.robot @@ -1,18 +1,13 @@ *** Settings *** -Resource plone/app/robotframework/keywords.robot -Resource plone/app/robotframework/saucelabs.robot -Resource plone/app/robotframework/selenium.robot -Resource keywords.txt +Resource plone/app/robotframework/browser.robot +Resource keywords.robot Variables variables.py - Test Setup Run Keywords Setup Testcontent Plone test setup Test Teardown Run keywords Plone test teardown -*** Variables *** - *** Test cases *** Scenario: Test folder listing view @@ -101,7 +96,7 @@ Listing should list contained content in detail the content area should contain this is a test document the content area should contain Test News Item the content area should contain this is a test news item - Page Should Contain Element //img[@title="Test News Item"] 2 + Get Element Count //img[@title="Test News Item"] == 2 the content area should contain Test Event the content area should contain this is a test event the content area should contain Test Collection @@ -111,29 +106,29 @@ Listing should list contained content in detail the content area should contain Test File the content area should contain file.pdf the content area should contain Test Image - Page Should Contain Element //img[@title="Test Image"] 3 + Get Element Count //img[@title="Test Image"] == 2 the content area should contain Test Album the content area should contain Test Album Image 1 - Page Should Contain Element //img[@title="Test Album Image 1"] 2 + Get Element Count //img[@title="Test Album Image 1"] == 2 the content area should contain Test Album Image 2 - Page Should Contain Element //img[@title="Test Album Image 2"] 2 + Get Element Count //img[@title="Test Album Image 2"] == 2 the content area should contain Test Album Image 3 - Page Should Contain Element //img[@title="Test Album Image 3"] 2 + Get Element Count //img[@title="Test Album Image 3"] == 2 the content area should contain Test Sub Album the content area should contain Test Sub Album Image 1 - Page Should Contain Element //img[@title="Test Sub Album Image 1"] 1 + Get Element Count //img[@title="Test Sub Album Image 1"] == 1 the content area should contain Test Sub Album Image 2 - Page Should Contain Element //img[@title="Test Sub Album Image 2"] 1 + Get Element Count //img[@title="Test Sub Album Image 2"] == 1 the content area should contain Test Sub Album Image 3 - Page Should Contain Element //img[@title="Test Sub Album Image 3"] 1 + Get Element Count //img[@title="Test Sub Album Image 3"] == 1 Album should list contained images and albums the content area should contain Test Album Image 1 - Page Should Contain Element //img[@title="Test Album Image 1"] 2 + Get Element Count //img[@title="Test Album Image 1"] == 1 the content area should contain Test Album Image 2 - Page Should Contain Element //img[@title="Test Album Image 2"] 2 + Get Element Count //img[@title="Test Album Image 2"] == 1 the content area should contain Test Album Image 3 - Page Should Contain Element //img[@title="Test Album Image 3"] 2 + Get Element Count //img[@title="Test Album Image 3"] == 1 the content area should contain Test Sub Album @@ -159,7 +154,7 @@ Listing should list all content in detail the content area should contain this is a test document the content area should contain Test News Item the content area should contain this is a test news item - Page Should Contain Element //img[@title="Test News Item"] 2 + Get Element Count //img[@title="Test News Item"] == 2 the content area should contain Test Event the content area should contain this is a test event the content area should contain Test Collection @@ -169,39 +164,39 @@ Listing should list all content in detail the content area should contain Test File the content area should contain file.pdf the content area should contain Test Image - Page Should Contain Element //img[@title="Test Image"] 3 + Get Element Count //img[@title="Test Image"] == 2 the content area should contain Test Album the content area should contain Test Album Image 1 - Page Should Contain Element //img[@title="Test Album Image 1"] 2 + Get Element Count //img[@title="Test Album Image 1"] == 2 the content area should contain Test Album Image 2 - Page Should Contain Element //img[@title="Test Album Image 2"] 2 + Get Element Count //img[@title="Test Album Image 2"] == 2 the content area should contain Test Album Image 3 - Page Should Contain Element //img[@title="Test Album Image 3"] 2 + Get Element Count //img[@title="Test Album Image 3"] == 2 the content area should contain Test Sub Album the content area should contain Test Sub Album Image 1 - Page Should Contain Element //img[@title="Test Sub Album Image 1"] 2 + Get Element Count //img[@title="Test Sub Album Image 1"] == 2 the content area should contain Test Sub Album Image 2 - Page Should Contain Element //img[@title="Test Sub Album Image 2"] 2 + Get Element Count //img[@title="Test Sub Album Image 2"] == 2 the content area should contain Test Sub Album Image 3 - Page Should Contain Element //img[@title="Test Sub Album Image 3"] 2 + Get Element Count //img[@title="Test Sub Album Image 3"] == 2 Album should list all images and albums the content area should contain Test Image - Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Image"] 1 + Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Image"] == 1 the content area should contain Test News Item - Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test News Item"] 1 + Get Element Count //div[contains(@class, "card-image")]//img[@title="Test News Item"] == 1 the content area should contain Test Album Image 1 - Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Album Image 1"] 1 + Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Album Image 1"] == 1 the content area should contain Test Album Image 2 - Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Album Image 2"] 1 + Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Album Image 2"] == 1 the content area should contain Test Album Image 3 - Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Album Image 3"] 1 + Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Album Image 3"] == 1 the content area should contain Test Sub Album Image 1 - Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 1"] 1 + Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 1"] == 1 the content area should contain Test Sub Album Image 2 - Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 2"] 1 + Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 2"] == 1 the content area should contain Test Sub Album Image 3 - Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 3"] 1 + Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 3"] == 1 the content area should contain Test Album the content area should contain Test Sub Album @@ -230,8 +225,6 @@ I go to I disable dropdown navigation Go to ${PLONE_URL}/@@navigation-controlpanel - Input Text name=form.widgets.navigation_depth 1 - Set Focus To Element css=#form-buttons-save - Wait Until Element Is Visible css=#form-buttons-save - Click Button Save - Wait until page contains Changes saved + Fill Text css=[name="form.widgets.navigation_depth"] 1 + Click "Save" + Get Text body contains Changes saved \ No newline at end of file From 73fbf4dddb1ffaf505f50ff753a2f705e6d44065 Mon Sep 17 00:00:00 2001 From: 1letter <1letter@gmx.de> Date: Wed, 9 Oct 2024 09:11:05 +0200 Subject: [PATCH 2/2] add news --- news/698.tests | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/698.tests diff --git a/news/698.tests b/news/698.tests new file mode 100644 index 00000000..f4e29c7b --- /dev/null +++ b/news/698.tests @@ -0,0 +1 @@ +port robot tests [1letter] \ No newline at end of file