Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix statuschecker testing #4068

Merged
merged 4 commits into from
Feb 11, 2025
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: 0 additions & 2 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ jobs:
pip install uv
uv pip install wheel --python ${{ matrix.python-version }} --system
uv pip install -r Browser/dev-requirements.txt --python ${{ matrix.python-version }} --system
uv pip install robotframework==7.1.1 --python ${{ matrix.python-version }} --system
- name: Build Protos and check with tsc
run: |
inv node-build
Expand Down Expand Up @@ -278,7 +277,6 @@ jobs:
rfbrowser init
uv pip install wheel --python ${{ matrix.python-version }} --system
uv pip install -r Browser/dev-requirements.txt --python ${{ matrix.python-version }} --system
uv pip install robotframework==7.1.1 --python ${{ matrix.python-version }} --system
- name: Test on unix-like os - serial mode
if: matrix.os == 'ubuntu-latest'
env:
Expand Down
2 changes: 1 addition & 1 deletion Browser/dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ruff>=0.2.1
wheel>=0.40.0
robotframework-pabot >= 4.0.0
twine >= 4.0.2
robotstatuschecker >= 3.0.1
robotstatuschecker >= 4.1.1
rellu >= 0.7
approvaltests == 14.3.0
pytest-mock==3.14.0
Expand Down
24 changes: 12 additions & 12 deletions atest/test/01_Browser_Management/no_httpCredentials_logging.robot
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Test Teardown Close Context
*** Test Cases ***
New Context No Mask For HttpCredentials When Not Defined
[Documentation] ...
... LOG 1:2 INFO REGEXP: ^((?!httpCredentials).)*$
... LOG 1:2 INFO REGEXP: .*ignoreHTTPSErrors.*
... LOG 1:4 INFO REGEXP: ^((?!httpCredentials).)*$
... LOG 1:4 INFO REGEXP: .*ignoreHTTPSErrors.*
... LOG 2:2 INFO REGEXP: ^((?!httpCredentials).)*$
... LOG 2:2 INFO REGEXP: .*ignoreHTTPSErrors.*
... LOG 2:4 INFO REGEXP: ^((?!httpCredentials).)*$
... LOG 2:4 INFO REGEXP: .*ignoreHTTPSErrors.*
[Tags] no-mac-support
New Context

Expand All @@ -24,21 +24,21 @@ New Context Mask For HttpCredentials When Defined

New Context HttpCredentials Resolved
[Documentation] ...
... LOG 3:2 INFO REGEXP: .*"httpCredentials": "XXX".*
... LOG 3:2 INFO REGEXP: .*ignoreHTTPSErrors.*
... LOG 3:4 INFO REGEXP: .*httpCredentials(\"|'):\\s(\"|')XXX(\"|').*
... LOG 3:4 INFO REGEXP: .*ignoreHTTPSErrors.*
... LOG 4:2 INFO REGEXP: .*"httpCredentials": "XXX".*
... LOG 4:2 INFO REGEXP: .*ignoreHTTPSErrors.*
... LOG 4:4 INFO REGEXP: .*httpCredentials(\"|'):\\s(\"|')XXX(\"|').*
... LOG 4:4 INFO REGEXP: .*ignoreHTTPSErrors.*
[Tags] no-mac-support
${pwd} = Set Variable pwd
${username} = Set Variable name
New Context httpCredentials={'username': '$username', 'password': '$pwd'}

New Context HttpCredentials Resolved As Dict
[Documentation] ...
... LOG 4:2 INFO REGEXP: .*"httpCredentials": "XXX".*
... LOG 4:2 INFO REGEXP: .*ignoreHTTPSErrors.*
... LOG 4:4 INFO REGEXP: .*httpCredentials(\"|'):\\s(\"|')XXX(\"|').*
... LOG 4:4 INFO REGEXP: .*ignoreHTTPSErrors.*
... LOG 5:2 INFO REGEXP: .*"httpCredentials": "XXX".*
... LOG 5:2 INFO REGEXP: .*ignoreHTTPSErrors.*
... LOG 5:4 INFO REGEXP: .*httpCredentials(\"|'):\\s(\"|')XXX(\"|').*
... LOG 5:4 INFO REGEXP: .*ignoreHTTPSErrors.*
[Tags] no-mac-support
${pwd} = Set Variable pwd
${username} = Set Variable name
Expand Down
30 changes: 14 additions & 16 deletions atest/test/01_Browser_Management/playwright_state.robot
Original file line number Diff line number Diff line change
Expand Up @@ -264,33 +264,31 @@ New Context With DefaultBrowserType Chromium

When Context Without Browser Is Created This Is Logged For User
[Documentation]
... LOG 1:5 INFO No browser was open. New browser was automatically opened when this context is created.
... LOG 1:7 NONE
... LOG 2:6 NONE
[Tags] slow
... LOG 2:5 INFO No browser was open. New browser was automatically opened when this context is created.
... LOG 2:7 NONE
... LOG 3:6 NONE
[Setup] Close Browser ALL
New Context
New Context

When Page Without Browser Is Created This Is Logged For User
[Documentation]
... LOG 1:3 INFO No browser and context was open. New browser and context was automatically opened when page is created.
... LOG 1:4 DEBUG Video is not enabled.
... LOG 1:5 NONE
... LOG 2:3 DEBUG Video is not enabled.
... LOG 2:4 NONE
[Tags] slow
... LOG 2:3 INFO No browser and context was open. New browser and context was automatically opened when page is created.
... LOG 2:4 DEBUG Video is not enabled.
... LOG 2:5 NONE
... LOG 3:3 DEBUG Video is not enabled.
... LOG 3:4 NONE
[Setup] Close Browser ALL
New Page
New Page

When Page Without Context Is Created This Is Logged For User
[Documentation]
... LOG 2:3 INFO No context was open. New context was automatically opened when this page is created.
... LOG 2:4 DEBUG Video is not enabled.
... LOG 2:5 NONE
... LOG 3:3 DEBUG Video is not enabled.
... LOG 3:4 NONE
... LOG 3:3 INFO No context was open. New context was automatically opened when this page is created.
... LOG 3:4 DEBUG Video is not enabled.
... LOG 3:5 NONE
... LOG 4:3 DEBUG Video is not enabled.
... LOG 4:4 NONE
[Tags] slow
[Setup] Close Browser ALL
New Browser headless=${HEADLESS} reuse_existing=False
Expand Down Expand Up @@ -412,7 +410,7 @@ Launch Browser Server CLI

Launch Browser Server CLI With Video
[Documentation]
... LOG 5:3 DEBUG Video is not enabled.
... LOG 6:3 DEBUG Video is not enabled.
${wsEndpoint} = Launch Browser Server chromium headless=${HEADLESS} port=8271 wsPath=server1
Should Be Equal ${wsEndpoint} ws://localhost:8271/server1
${browser} = Connect To Browser ws://localhost:8271/server1
Expand Down
4 changes: 2 additions & 2 deletions atest/test/01_Browser_Management/run_on_failure.robot
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ Register User Keyword

Register Get Page Source
[Documentation]
... LOG 3.1:4 DEBUG Page source obtained successfully.
... LOG 3.1:5 INFO GLOB: *playwright-log.txt for additional details.
... LOG 4.1:4 DEBUG Page source obtained successfully.
... LOG 4.1:5 INFO GLOB: *playwright-log.txt for additional details.
[Tags] no-iframe
${prev} = Register Keyword To Run On Failure Get Page Source
Type Text css=input#username_field username
Expand Down
2 changes: 1 addition & 1 deletion atest/test/01_Browser_Management/timeout.robot
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Set Browser Timeout Should Fail With Invalid Value And Not Change Existing Value

Calling Set Browser Timeout Without Open Contex Should Not Fail
[Documentation]
... LOG 1:2 INFO GLOB: No context open.
... LOG 2:2 INFO GLOB: No context open.
Set Browser Timeout 1s
Close Browser ALL
Set Browser Timeout 1s
Expand Down
10 changes: 5 additions & 5 deletions atest/test/01_Browser_Management/video.robot
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Suite Setup Video Setup
*** Test Cases ***
Create Video With Full Path
[Documentation]
... LOG 5:3 INFO GLOB: *video width="1280" height="720" controls*src="video*.webm"*
... LOG 6:3 INFO GLOB: *video width="1280" height="720" controls*src="video*.webm"*
${files} = Glob Files Count ${OUTPUT_DIR}/video
Should Be Equal ${0} ${files}
${record_video} = Create Dictionary dir ${OUTPUT_DIR}/video
Expand All @@ -19,7 +19,7 @@ Create Video With Full Path

Create Video With Relative Path
[Documentation]
... LOG 5:3 INFO GLOB: *video width="1280" height="720" controls*src="browser/video/my_video*.webm"*
... LOG 6:3 INFO GLOB: *video width="1280" height="720" controls*src="browser/video/my_video*.webm"*
${files} = Glob Files Count ${{pathlib.Path("${OUTPUT_DIR}/browser/video/my_video")}}
Should Be Equal ${0} ${files}
${record_video} = Create Dictionary dir my_video
Expand Down Expand Up @@ -62,7 +62,7 @@ Create Video With Relative Path And Persistent Context

Create Video With VideoSize
[Documentation]
... LOG 4:3 INFO GLOB: *width="300" height="200"*.webm"*
... LOG 5:3 INFO GLOB: *width="300" height="200"*.webm"*
${size} = Create Dictionary width 300 height ${200}
${record_video} = Create Dictionary size ${size}
New Context recordVideo=${record_video}
Expand All @@ -77,7 +77,7 @@ Create Video With VideoSize

Create Video With Viewport
[Documentation]
... LOG 4:3 INFO GLOB: *width="400" height="250"*.webm"*
... LOG 5:3 INFO GLOB: *width="400" height="250"*.webm"*
${size} = Create Dictionary width 400 height 250
${record_video} = Create Dictionary dir ${OUTPUT_DIR}/video
New Context recordVideo=${record_video} viewport=${size}
Expand All @@ -91,7 +91,7 @@ Create Video With Viewport

No Video
[Documentation]
... LOG 2:3 DEBUG Video is not enabled.
... LOG 3:3 DEBUG Video is not enabled.
New Context
New Page ${LOGIN_URL}
Get Browser Catalog
Expand Down
2 changes: 1 addition & 1 deletion atest/test/02_Content_Keywords/assertions.robot
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Equal With Lambda Formatter:

Get Attribute Names Does Not Support Formatter2:
[Documentation]
... LOG 1:* DEBUG GLOB: Assertion polling statistics:*
... LOG 2:* DEBUG GLOB: Assertion polling statistics:*
[Setup] Go To ${SPACES_URL}
Get Attribute Names id=two == id
[Teardown] Formatter TearDown
Expand Down
6 changes: 3 additions & 3 deletions atest/test/02_Content_Keywords/checkbox.robot
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Get Checkbox State Custom Error

Check Checkbox
[Documentation]
... LOG 3:* DEBUG REGEXP: Checked checkbox: .*?\\[name=can_send_sms\\] with force: false
... LOG 4:* DEBUG REGEXP: Checked checkbox: .*?\\[name=can_send_sms\\] with force: false
${state} = Get Checkbox State [name=can_send_sms] == off
Should Not Be True ${state}
Check Checkbox [name=can_send_sms]
Expand All @@ -43,7 +43,7 @@ Check Checkbox

Check Checkbox With Force
[Documentation]
... LOG 1:* DEBUG REGEXP: Checked checkbox: .*?\\[name=can_send_sms\\] with force: true
... LOG 2:* DEBUG REGEXP: Checked checkbox: .*?\\[name=can_send_sms\\] with force: true
Check Checkbox [name=can_send_sms] True
${state} = Get Checkbox State [name=can_send_sms] == on

Expand All @@ -62,7 +62,7 @@ Uncheck Checkbox

Uncheck Checkbox With Force
[Documentation]
... LOG 1:* DEBUG REGEXP: Unchecked checkbox: .*?\\[name=can_send_email\\] with force: true
... LOG 2:* DEBUG REGEXP: Unchecked checkbox: .*?\\[name=can_send_email\\] with force: true
Uncheck Checkbox [name=can_send_email] True
Get Checkbox State [name=can_send_email] == ${False}

Expand Down
8 changes: 4 additions & 4 deletions atest/test/02_Content_Keywords/screenshot.robot
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ Screenshotting Without Path

Screenshot Filename Incrementation
[Documentation]
... LOG 1:3 </td></tr><tr><td colspan="3"><a href="test_screenshot_1.png" target="_blank"><img src="test_screenshot_1.png" width="800px"/></a>
... LOG 2:3 </td></tr><tr><td colspan="3"><a href="test_screenshot_2.png" target="_blank"><img src="test_screenshot_2.png" width="800px"/></a>
... LOG 2:3 </td></tr><tr><td colspan="3"><a href="test_screenshot_1.png" target="_blank"><img src="test_screenshot_1.png" width="800px"/></a>
... LOG 3:3 </td></tr><tr><td colspan="3"><a href="test_screenshot_2.png" target="_blank"><img src="test_screenshot_2.png" width="800px"/></a>
Take Screenshot ${TestScreenshot}_{index}
Take Screenshot ${TestScreenshot}_{index}
File Should Exist ${TestScreenshot}_1.png
Expand All @@ -112,14 +112,14 @@ Screenshot Filename Incrementation

Embed ScreenShot To Log.html File
[Documentation]
... LOG 1:4 STARTS: </td></tr><tr><td colspan="3"><img alt="screenshot" class="robot-seleniumlibrary-screenshot" src="data:image/png;base64
... LOG 2:4 STARTS: </td></tr><tr><td colspan="3"><img alt="screenshot" class="robot-seleniumlibrary-screenshot" src="data:image/png;base64
${path} = Take Screenshot EMBED
Should Not Exist ${OUTPUT_DIR}/EMBED*
Should Be Equal ${path} EMBED

Embed Element Picture To Log.html File
[Documentation]
... LOG 1:* STARTS: </td></tr><tr><td colspan="3"><img alt="screenshot" class="robot-seleniumlibrary-screenshot" src="data:image/png;base64
... LOG 2:* STARTS: </td></tr><tr><td colspan="3"><img alt="screenshot" class="robot-seleniumlibrary-screenshot" src="data:image/png;base64
${path} = Take Screenshot EMbeD selector=\#username_field
Should Not Exist ${OUTPUT_DIR}/EM??D*
Should Be Equal ${path} EMBED
Expand Down
10 changes: 5 additions & 5 deletions atest/test/02_Content_Keywords/text_keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ Type Secret With Strict

Fill Secret Placeholder-env-var
[Documentation] ...
... LOG 2:2 NONE
... LOG 4:2 NONE
... LOG 3:2 NONE
... LOG 5:2 NONE
[Tags] no-iframe
Set Environment Variable PH_ENV_VAR password11
Type Secret css=input#username_field %PH_ENV_VAR ${0.02} ${TRUE}
Expand Down Expand Up @@ -158,8 +158,8 @@ Fill Secret Robot-env-var Mixed2

Fill Secret Placeholder-robot-var
[Documentation]
... LOG 2:2 NONE
... LOG 4:2 NONE
... LOG 3:2 NONE
... LOG 5:2 NONE
[Tags] no-iframe
${var} = Set Variable password123
Type Secret css=input#username_field $var
Expand Down Expand Up @@ -262,7 +262,7 @@ Type Secret Env

Type Secret Local
[Documentation]
... LOG 2:2 NONE
... LOG 3:2 NONE
[Tags] no-iframe
${var} = Set Variable password321
Type Secret css=input#password_field $var
Expand Down
12 changes: 6 additions & 6 deletions atest/test/09_Plugins/plugin.robot
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,25 @@ Pluging Keyword Example Location

Check Plugin Suite Scope Setting 1
[Documentation]
... LOG 1:3 INFO Suite Level Message
... LOG 2:3 INFO Suite Level Message
... LOG 3:3 INFO Suite Level Message
Log Test
Log Hello

Set And Check Plugin Scope Setting
[Documentation]
... LOG 1:2 INFO Hello World
... LOG 2:2 INFO Test
... LOG 2:3 INFO Hello World
... LOG 3:2 INFO Hello
... LOG 2:2 INFO Hello World
... LOG 3:2 INFO Test
... LOG 3:3 INFO Hello World
... LOG 4:2 INFO Hello
... LOG 4:3 INFO Hello World
Set Last Log Message Hello World scope=Test
Log Test
Log Hello

Check Plugin Suite Scope Setting 2
[Documentation]
... LOG 1:3 INFO Suite Level Message
... LOG 2:3 INFO Suite Level Message
... LOG 3:3 INFO Suite Level Message
Log Test
Log Hello
4 changes: 2 additions & 2 deletions atest/test/10_retest/Browser_New_Context_Test.robot
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Create New Context With RecordVideo.Dir As Path And Validate That RecordVideo.Di
[Arguments] ${path}
${dir_type} = Create Context With Path Type RecordVideodir And Get Type Of RecordVideo Dir ${path}
Log Type of recordVideo.dir with given value (${path}) is ${dir_type}
Should Match Regexp ${dir_type} <class 'pathlib.\\w+Path'>
Should Match Regexp ${dir_type} <class 'pathlib.+Path'> # Python 3.13 need mode wired regex

Create New Persistent Context With RecordVideo.Dir As String And Validate That RecordVideo.Dir After New Context Call Is Of Type String
[Arguments] ${path}
Expand All @@ -93,4 +93,4 @@ Create New Persistent Context With RecordVideo.Dir As Path And Validate That Rec
[Arguments] ${path}
${dir_type} = Create Persistent Context With Path Type RecordVideodir And Get Type Of RecordVideo Dir ${path}
Log Type of recordVideo.dir with given value (${path}) is ${dir_type}
Should Match Regexp ${dir_type} <class 'pathlib.\\w+Path'>
Should Match Regexp ${dir_type} <class 'pathlib.+Path'> # Python 3.13 need mode wired regex