Skip to content

Commit

Permalink
Fix rest of the test to expect correct error message
Browse files Browse the repository at this point in the history
  • Loading branch information
aaltat committed Dec 1, 2022
1 parent 5c93c1e commit 16e931f
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 21 deletions.
4 changes: 3 additions & 1 deletion atest/test/02_Content_Keywords/basic_getters.robot
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ Get Text Assert Validate
Get Text With Nonmatching Selector
[Tags] no-iframe
Set Browser Timeout 50ms
Run Keyword And Expect Error *Timeout 50ms exceeded.*waiting for selector "notamatch"* Get Text notamatch
Run Keyword And Expect Error
... *TimeoutError: locator.elementHandle: Timeout 50ms exceeded.*waiting for locator('notamatch')*
... Get Text notamatch
[Teardown] Set Browser Timeout ${PLAYWRIGHT_TIMEOUT}

Get Property And Assert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,9 @@ Get Property Custom Error
Get Property With Nonmatching Selector
[Tags] no-iframe
[Setup] Set Browser Timeout 50ms
Run Keyword And Expect Error *Timeout 50ms exceeded.*waiting for selector "notamatch"* Get Property
... notamatch attributeName
Run Keyword And Expect Error
... *TimeoutError: locator.elementHandle: Timeout 50ms exceeded.*waiting for locator('notamatch')*
... Get Property notamatch attributeName
[Teardown] Set Browser Timeout ${PLAYWRIGHT_TIMEOUT}

Get Attribute With Strict
Expand Down
3 changes: 2 additions & 1 deletion atest/test/02_Content_Keywords/checkbox.robot
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ Uncheck Checkbox With Strict
Get Checkbox State With Nonmatching Selector
[Tags] no-iframe
Set Browser Timeout 50ms
Run Keyword And Expect Error *Timeout 50ms exceeded.*waiting for selector "xpath=//notamatch"*
Run Keyword And Expect Error
... *TimeoutError: locator.elementHandle: Timeout 50ms exceeded.*waiting for locator('xpath=//notamatch')*
... Get Checkbox State xpath=//notamatch
[Teardown] Set Browser Timeout ${PLAYWRIGHT_TIMEOUT}

Expand Down
5 changes: 3 additions & 2 deletions atest/test/02_Content_Keywords/click.robot
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Click Button
Click Nonmatching Selector
[Tags] no-iframe
${originaltimeout} = Set Browser Timeout 50ms
Run Keyword And Expect Error *Timeout 50ms exceeded.*waiting for selector "css=notamatch"* Click
... css=notamatch
Run Keyword And Expect Error
... *TimeoutError: locator.click: Timeout 50ms exceeded.*waiting for locator('notamatch')*
... Click css=notamatch
[Teardown] Set Browser Timeout ${originaltimeout}

Click With Invalid Selector
Expand Down
5 changes: 3 additions & 2 deletions atest/test/02_Content_Keywords/keypress.robot
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Press Keys Combination Of Keystrokes In Select List
Press Keys With Nonmatching Selector
[Tags] no-iframe
Set Browser Timeout 50ms
Run Keyword And Expect Error *Timeout 50ms exceeded.*waiting for selector "css=notamatch"* Press Keys
... css=notamatch F
Run Keyword And Expect Error
... *TimeoutError: locator.press: Timeout 50ms exceeded.*waiting for locator('notamatch')*
... Press Keys css=notamatch F
[Teardown] Set Browser Timeout ${PLAYWRIGHT_TIMEOUT}
5 changes: 2 additions & 3 deletions atest/test/02_Content_Keywords/screenshot.robot
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ Screenshotting With Jpeg Extension And Quality Borders
If Element Not Found Screenshot Should Fail
${timeout} = Set Browser Timeout 200ms
Run Keyword And Expect Error
... TimeoutError: locator.screenshot: Timeout 200ms exceeded.*waiting for selector "${SELECTOR_PREFIX_WAITING}#not_there"*
... Take Screenshot
... selector=\#not_there
... *TimeoutError: locator.screenshot: Timeout 200ms exceeded.*waiting for locator('#not_there')*
... Take Screenshot selector=\#not_there
Set Browser Timeout ${timeout}
[Teardown] Remove File ${OUTPUT_DIR}/*.png

Expand Down
13 changes: 8 additions & 5 deletions atest/test/02_Content_Keywords/select_lists.robot
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ Get Selected Options With Xpath
Get Selected Options With Nonmatching Selector
[Tags] no-iframe
Set Browser Timeout 50ms
Run Keyword And Expect Error *Timeout 50ms exceeded.*waiting for selector "notamatch"* Get Selected Options
... notamatch
Run Keyword And Expect Error
... *TimeoutError: locator.elementHandle: Timeout 50ms exceeded.*waiting for locator('notamatch')*
... Get Selected Options notamatch
[Teardown] Set Browser Timeout ${PLAYWRIGHT_TIMEOUT}

Select Option By Label
Expand All @@ -98,7 +99,8 @@ Select Options By Text
Select Options By With Nonmatching Selector
[Tags] no-iframe
Set Browser Timeout 50ms
Run Keyword And Expect Error *Timeout 50ms exceeded.*waiting for selector "notamatch"*
Run Keyword And Expect Error
... *TimeoutError: locator.selectOption: Timeout 50ms exceeded.*waiting for locator('notamatch')*
... Select Options By
... notamatch label False Label
[Teardown] Set Browser Timeout ${PLAYWRIGHT_TIMEOUT}
Expand Down Expand Up @@ -158,8 +160,9 @@ Deselect Options With Strict
Deselect Options With Nonmatching Selector
[Tags] no-iframe
Set Browser Timeout 50ms
Run Keyword And Expect Error *Timeout 50ms exceeded.*waiting for selector "notamatch"* Deselect Options
... notamatch
Run Keyword And Expect Error
... *TimeoutError: locator.selectOption: Timeout 50ms exceeded.*waiting for locator('notamatch')*
... Deselect Options notamatch
[Teardown] Set Browser Timeout ${PLAYWRIGHT_TIMEOUT}

*** Keywords ***
Expand Down
11 changes: 6 additions & 5 deletions atest/test/02_Content_Keywords/text_keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Type Text With Nonmatching Selector
[Tags] no-iframe
Set Browser Timeout 50ms
Run Keyword And Expect Error
... *Timeout 50ms exceeded.*waiting for selector "notamatch"*
... * TimeoutError: locator.fill: Timeout 50ms exceeded.*waiting For Locator('notamatch')*
... Type Text notamatch text
[Teardown] Set Browser Timeout ${PLAYWRIGHT_TIMEOUT}

Expand All @@ -40,7 +40,7 @@ Clear Text With Nonmatching Selector
[Tags] no-iframe
Set Browser Timeout 50ms
Run Keyword And Expect Error
... *Timeout 50ms exceeded.*waiting for selector "notamatch"*
... *TimeoutError: locator.fill: Timeout 50ms exceeded.*waiting for locator('notamatch')*
... Clear Text notamatch
[Teardown] Set Browser Timeout ${PLAYWRIGHT_TIMEOUT}

Expand All @@ -56,7 +56,7 @@ Fill Text With Nonmatching Selector
[Tags] no-iframe
Set Browser Timeout 50ms
Run Keyword And Expect Error
... *Timeout 50ms exceeded.*waiting for selector "notamatch"*
... *TimeoutError: locator.fill: Timeout 50ms exceeded.*waiting for locator('notamatch')*
... Fill Text notamatch text
[Teardown] Set Browser Timeout ${PLAYWRIGHT_TIMEOUT}

Expand Down Expand Up @@ -221,8 +221,9 @@ Fill Secret With Nonmatching Selector
[Tags] no-iframe
Set Environment Variable MY_RFBROWSER_SECRET secret
Set Browser Timeout 50ms
Run Keyword And Expect Error *Timeout 50ms exceeded.*waiting for selector "notamatch"* Fill Secret
... notamatch %MY_RFBROWSER_SECRET
Run Keyword And Expect Error
... *TimeoutError: locator.fill: Timeout 50ms exceeded.*waiting for locator('notamatch')*
... Fill Secret notamatch %MY_RFBROWSER_SECRET
[Teardown] Set Browser Timeout ${PLAYWRIGHT_TIMEOUT}

Type Text With Delay
Expand Down

0 comments on commit 16e931f

Please sign in to comment.