TEST: Adjusting unit tests #121
                
     Merged
            
            
          
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
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
EdgeChromiumDriverManagerclass.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:blankbefore 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?