You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Edge-case when saving a screenshot for the logs when using multiple drivers in one test.
There's a very specific edge case that can occur if a test opens a second browser driver using self.get_new_driver() and then the user navigates to an unresponsive page (or the browser window is closed) if there is also a custom tearDown() method that navigates back to the original driver. Currently, the screenshot that would appear in the logs would be of the original driver browser that is also open. The expected behavior here should be that if the screenshot can't be taken using self.save_teardown_screenshot() in the custom tearDown() (because a site is unresponsive or the browser window closed prematurely), then there should be no screenshot at all in the logs, because that would be misleading. The screenshot should match the page where a stack trace occurred.
mdmintz
changed the title
Edge-case when saving a screenshot for the failure logs when using multiple browser drivers in one test
Edge-case when saving a screenshot for the logs when using multiple browser drivers in one test
Apr 9, 2021
mdmintz
changed the title
Edge-case when saving a screenshot for the logs when using multiple browser drivers in one test
Edge-case when saving a screenshot for the logs when using multiple drivers in one test
Apr 9, 2021
Edge-case when saving a screenshot for the logs when using multiple drivers in one test.
There's a very specific edge case that can occur if a test opens a second browser driver using
self.get_new_driver()
and then the user navigates to an unresponsive page (or the browser window is closed) if there is also a customtearDown()
method that navigates back to the original driver. Currently, the screenshot that would appear in the logs would be of the original driver browser that is also open. The expected behavior here should be that if the screenshot can't be taken usingself.save_teardown_screenshot()
in the customtearDown()
(because a site is unresponsive or the browser window closed prematurely), then there should be no screenshot at all in the logs, because that would be misleading. The screenshot should match the page where a stack trace occurred.Here's an example that reproduces the bug:
Adding a related error message in the
page_source.html
file in the logs would also be helpful.The text was updated successfully, but these errors were encountered: