I am trying to use selenium-wire 5.1.0 with seleniumbase 3.3.3 using chrome 105.0.5195.125 with Python 3.8.15 & pytest-7.1.2 to open a webpage, but it gives the following error:
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted because of page crash
E from unknown error: cannot determine loading status
E from tab crashed
E (Session info: chrome=105.0.5195.125)
E Stacktrace:
E #0 0x559e654ef693 <unknown>
E #1 0x559e652e89db <unknown>
E #2 0x559e652d6617 <unknown>
E #3 0x559e652d5f8f <unknown>
E #4 0x559e652d5389 <unknown>
E #5 0x559e652d3fd0 <unknown>
E #6 0x559e652d450c <unknown>
E #7 0x559e652e0dff <unknown>
E #8 0x559e652e1992 <unknown>
E #9 0x559e652f0452 <unknown>
E #10 0x559e652f4324 <unknown>
(complete, overlength full output on request).
I am defining the driver in conftest.py as
@pytest.fixture()
def driver(request):
"""Defines the modified selenium base object to contain custom driver."""
class BaseClass(BaseCase):
"""Seleniumbase class definition."""
def setUp(self):
"""Setting up the seleniumbase object."""
super().setUp()
self.driver.close()
self.driver.quit()
warnings.simplefilter("ignore", category=DeprecationWarning)
self.driver = webdriver.Chrome()
def tearDown(self):
"""Tearing down up the seleniumbase object."""
self.save_teardown_screenshot()
super(BaseClass, self).tearDown()
def base_method(self):
"""Required method"""
pass
sb = BaseClass()
sb.setUp()
yield sb
sb.tearDown()
and the actual test is as follows:
def test_1(driver):
print("opening webpage")
driver.open("https://bbp.epfl.ch/ngv-portal/anatomy/reconstruction-data")
print("Webpage has been opened")
When using the standard seleniumbase driver I do not get this error, and the open command does work without problems. Only when I use the selenium-wire driver I get this problem.
I am trying to use selenium-wire 5.1.0 with seleniumbase 3.3.3 using chrome 105.0.5195.125 with Python 3.8.15 & pytest-7.1.2 to open a webpage, but it gives the following error:
(complete, overlength full output on request).
I am defining the driver in
conftest.py
asand the actual test is as follows:
When using the standard seleniumbase driver I do not get this error, and the
open
command does work without problems. Only when I use theselenium-wire
driver I get this problem.