Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
robot
--outputdir results/playground
--variable BROWSER:headlesschrome
tests/_diagnostic.robot
tests/playground

- name: Upload playground test results
if: always()
Expand Down
23 changes: 10 additions & 13 deletions resources/pages/playground_page.resource
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ${CLASS_ATTRIBUTE_TARGET_BUTTON} css:.btn-primary

# Hidden Layers
${HIDING_BUTTON} css:#greenButton
${HIDDEN_BLUE_BUTTON} css:#blueButton

# Load Delay
${LOAD_DELAY_BUTTON} css:.btn.btn-primary
Expand Down Expand Up @@ -75,7 +76,7 @@ ${SAMPLE_APP_STATUS_MESSAGE} css:#loginstatus
${SAMPLE_APP_VALID_PASSWORD} pwd

# Mouse Over
${MOUSE_OVER_LINK} xpath://a[@class="text-primary" and text()="Click me"]
${MOUSE_OVER_LINK} xpath://a[text()="Click me"]
${MOUSE_OVER_CLICK_COUNT} css:#clickCount
${MOUSE_OVER_BUTTON_LINK} xpath://a[@class="text-primary" and text()="Link Button"]
${MOUSE_OVER_BUTTON_CLICK_COUNT} css:#clickButtonCount
Expand All @@ -86,6 +87,7 @@ ${NBSP_BUTTON_EXACT_TEXT} xpath://button[text()="My Button"]

# Overlapped Element
${OVERLAPPED_NAME_FIELD} css:#name
${OVERLAPPED_NAME_FIELD_SELECTOR} input#name

# Shadow DOM
${SHADOW_HOST} guid-generator
Expand Down Expand Up @@ -203,18 +205,13 @@ Wait Until Animation Stops
Fail Element '${locator}' never stopped moving.

Set Value Via Javascript
[Documentation] Sets an input's value directly through JavaScript and dispatches an
... input event so the page's own listeners see the change. Used for the
... Overlapped Element challenge, where the field is covered by another
... element and native Selenium keystrokes never register.
[Arguments] ${locator} ${value}
${element}= Get WebElement ${locator}
Execute Javascript
... arguments[0].value = arguments[1];
... arguments[0].dispatchEvent(new Event('input', {bubbles: true}));
... ARGUMENTS
... ${element}
... ${value}
[Documentation] Sets an input's value directly through JavaScript. Used for the
... Overlapped Element challenge, where a permanently positioned
... covering element blocks native Selenium clicks and keystrokes; the
... field carries no input/change listeners, so a plain property
... assignment (confirmed against the live page) is sufficient.
[Arguments] ${selector} ${value}
Execute Javascript document.querySelector('${selector}').value = '${value}';

Get Row Cell Values
[Documentation] Reads the ARIA role="row" elements of the Dynamic Table challenge
Expand Down
62 changes: 0 additions & 62 deletions tests/_diagnostic.robot

This file was deleted.

21 changes: 10 additions & 11 deletions tests/playground/ui_testing_playground.robot
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,14 @@ Class Attribute Target Button Should Be Clicked By Its Unique Class
${alert_message}= Handle Alert action=ACCEPT
Should Be Equal ${alert_message} Primary button pressed

Clicking The Green Button Should Swap In A Different Layer
[Documentation] The button under #spa is replaced by a different element after the
... first click, demonstrating a DOM-caching pitfall: a second click against a
... previously located WebElement reference would silently hit a stale layer.
Clicking The Green Button Should Add A Covering Layer On Top
[Documentation] Clicking the green button doesn't remove it -- it stacks a second,
... higher z-index layer with a blue button directly on top, so a second click at
... the same coordinates would silently hit the new layer instead.
Go To Playground Page hiddenlayers
Wait Until Element Is Visible ${HIDING_BUTTON}
Click Element ${HIDING_BUTTON}
${new_id}= Execute Javascript return document.querySelector('#spa button').id;
Should Not Be Equal ${new_id} greenButton
... msg=Hidden Layers should swap in a different button after the first click.
Page Should Contain Element ${HIDDEN_BLUE_BUTTON}

Button Appearing After Delay Should Eventually Become Clickable
[Documentation] The button doesn't exist in a clickable state until the server
Expand Down Expand Up @@ -163,6 +161,7 @@ Sample App Should Log In With The Valid Password And Reject An Invalid One
Input Text ${SAMPLE_APP_PASSWORD_FIELD} wrong-password
Click Button ${SAMPLE_APP_LOGIN_BUTTON}
Element Text Should Be ${SAMPLE_APP_STATUS_MESSAGE} Invalid username/password
Input Text ${SAMPLE_APP_USERNAME_FIELD} Michelle
Input Text ${SAMPLE_APP_PASSWORD_FIELD} ${SAMPLE_APP_VALID_PASSWORD}
Click Button ${SAMPLE_APP_LOGIN_BUTTON}
Element Text Should Be ${SAMPLE_APP_STATUS_MESSAGE} Welcome, Michelle!
Expand All @@ -187,11 +186,11 @@ Non Breaking Space Button Should Not Match An Exact Text Locator
Click Button ${NBSP_BUTTON}

Overlapped Name Field Should Accept Text Set Through Javascript
[Documentation] The field is covered by another element, so native Selenium
... keystrokes never register; setting the value directly through JavaScript and
... dispatching an input event is the documented workaround.
[Documentation] A permanently positioned element covers the field, so native
... Selenium clicks and keystrokes are intercepted; setting the value directly
... through JavaScript is the workaround.
Go To Playground Page overlapped
Set Value Via Javascript ${OVERLAPPED_NAME_FIELD} Michelle Austria
Set Value Via Javascript ${OVERLAPPED_NAME_FIELD_SELECTOR} Michelle Austria
${value}= Get Element Attribute ${OVERLAPPED_NAME_FIELD} value
Should Be Equal ${value} Michelle Austria

Expand Down
Loading