Skip to content

Conversation

@Amirmahdikahdouii
Copy link

Fix not changing navigator.userAgent property on headless mode

Problem

The problem was that by setting headless=True, navigator.webdriver is equal to False so the changes on navigator.userAgent couldn't commit due to it is under the condition that navigator.webdriver should return True.

Solution

I separated the modification part of navigator.userAgent and put it in a separated method and then call it at top of configure headless method.

Note

My Chrome version is 134.0.0 and I'm using Python 3.12

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.

1 participant