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

If using multiple browser drivers in a failing test, the logs might display the wrong browser for the last page visited #871

Closed
mdmintz opened this issue Apr 16, 2021 · 1 comment
Assignees
Labels
bug Uh oh... Something needs to be fixed

Comments

@mdmintz
Copy link
Member

mdmintz commented Apr 16, 2021

If using multiple browser drivers in a failing test, the logs might display the wrong browser for the last page visited.

Example, let's say that I'm running tests using Chrome (default), but then I open up a new browser in the same test using self.get_new_driver(browser="firefox"), and then I perform an action that fails. In the logs where it says information about the point where the test failed, it would display chrome instead of firefox, even though Firefox was the last browser used before the test failed. To fix this, the logs should display the last browser used leading up to the failure.

To fix this, the self.browser variable might need to change whenever any of the following methods are called: self.get_new_driver(), self.switch_to_driver(), self.switch_to_default_driver().

@mdmintz mdmintz self-assigned this Apr 16, 2021
@mdmintz mdmintz added the bug Uh oh... Something needs to be fixed label Apr 16, 2021
@mdmintz
Copy link
Member Author

mdmintz commented Apr 16, 2021

@mdmintz mdmintz closed this as completed Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Uh oh... Something needs to be fixed
Projects
None yet
Development

No branches or pull requests

1 participant