Creating driver with custom dynamic user agent #3574
Unanswered
dmooney-wyn
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have logic setup that creates the webdriver with a custom user agent if a tag exists in the cucumber scenario in a particular format.
The issue I'm encountering is any scenario after the first first one fails at the same point during the test with
If I run the test on its own its absolutely fine so it seems that at some point during the test the session ID becomes null only on scnearios after the first one
At various points throughout the test I get the driver session id and it's fine even in the @after step. It is unique to that test
I'm using @Managed
WebDriver driver;
Creating DesiredCapabilities with chrome options.
The exact step it fails on is waiting for an element to be present using webelementfacade. Interestingly when I changed to using webelement it seemed to work fine
Is there something I'm missing or is there more straightforward way of simply adding a user agent dynamically to the driver
Beta Was this translation helpful? Give feedback.
All reactions