@@ -14651,8 +14651,14 @@ def setUp(self, masterqa_mode=False):
14651
14651
d_height=self.__device_height,
14652
14652
d_p_r=self.__device_pixel_ratio,
14653
14653
)
14654
- if self.driver.timeouts.implicit_wait > 0:
14655
- self.driver.implicitly_wait(0)
14654
+ try:
14655
+ if self.driver.timeouts.implicit_wait > 0:
14656
+ self.driver.implicitly_wait(0)
14657
+ except Exception:
14658
+ try:
14659
+ self.driver.implicitly_wait(0)
14660
+ except Exception:
14661
+ pass
14656
14662
self._default_driver = self.driver
14657
14663
if self._reuse_session:
14658
14664
sb_config.shared_driver = self.driver
@@ -14671,10 +14677,13 @@ def setUp(self, masterqa_mode=False):
14671
14677
self.set_time_limit(self.time_limit)
14672
14678
14673
14679
# Configure the page load timeout
14674
- if hasattr(settings, "PAGE_LOAD_TIMEOUT"):
14675
- self.driver.set_page_load_timeout(settings.PAGE_LOAD_TIMEOUT)
14676
- else:
14677
- self.driver.set_page_load_timeout(120) # Selenium uses 300
14680
+ try:
14681
+ if hasattr(settings, "PAGE_LOAD_TIMEOUT"):
14682
+ self.driver.set_page_load_timeout(settings.PAGE_LOAD_TIMEOUT)
14683
+ else:
14684
+ self.driver.set_page_load_timeout(120) # Selenium uses 300
14685
+ except Exception:
14686
+ pass
14678
14687
14679
14688
# Set the start time for the test (in ms).
14680
14689
# Although the pytest clock starts before setUp() begins,
0 commit comments