Skip to content

TEST: Adjusting unit tests #121

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

Merged
merged 4 commits into from
Aug 12, 2025
Merged

TEST: Adjusting unit tests #121

merged 4 commits into from
Aug 12, 2025

Conversation

joao-voltarelli
Copy link
Contributor

@joao-voltarelli joao-voltarelli commented Aug 12, 2025

Main changes

Edge

There was a change in the webdriver download URL:

A fix has been made to the Selenium package, but a new release has not been made yet.

On the webdriver-manager side, it still uses the old URL, so for now, I think the solution would be to specify the new URL via parameters in the EdgeChromiumDriverManager class.

Undetected Chrome

Most of the failures in Windows were throwing:

<selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x00000162CF375D50> response = {'status': 500, 'value': '{"value":{"error":"timeout","message":"timeout\\nfrom aborted by navigation: Not attached to...[0x0x75bb67f9+25]\\n\\tRtlGetFullPathName_UEx [0x0x771b7f4d+173]\\n\\tRtlGetFullPathName_UEx [0x0x771b7f1b+123]\\n"}}'}

From my investigation, it was always when executing the CDP command: self.driver.execute_cdp_cmd("Page.setDownloadBehavior", params) when starting the browser. It seems that at the time Selenium was sending the command, the tab was no longer attached.

Since the tests worked normally locally, I suspect that because execution via GitHub Actions was slower, the behavior of Undetected Chrome of opening/reopening tabs at the beginning could be causing this, where it tried to send the CDP command to a tab that had already been replaced.

Possible solution

As an initial solution, I tried forcing a navigation to about:blank before running the CDP command to ensure that the command would be executed in a valid tab.

At first, it seems to have resolved the issue, and the tests are running normally again on Windows.

@hhslepicka @kayqueGovetri , Do you think this is a valid solution? Do you have any other thoughts on this point?

@joao-voltarelli joao-voltarelli marked this pull request as draft August 12, 2025 17:20
@joao-voltarelli joao-voltarelli marked this pull request as ready for review August 12, 2025 19:16
Copy link
Contributor

@kayqueGovetri kayqueGovetri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hhslepicka
Copy link
Contributor

The proposed solution is fine. Let's open a new issue and add the reference to monitor the new Selenium release so we can later on remove our local patch!
Great work @joao-voltarelli

@hhslepicka hhslepicka merged commit dd87c7b into main Aug 12, 2025
13 checks passed
@hhslepicka hhslepicka deleted the test/adjusting-browsers-setup branch August 12, 2025 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants