Skip to content

Commit 135e108

Browse files
committed
🙏 :prayl
1 parent cb3388a commit 135e108

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

tests/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Fixtures and helper functions for testing"""
22

33
import os
4+
import platform
45
from typing import Union
56

67
import numpy as np
@@ -64,6 +65,14 @@ def driver():
6465
options.add_argument("--disable-dev-shm-usage")
6566
options.add_argument("--disable-gpu")
6667
# options.add_argument("--no=sandbox")
68+
69+
# macOS-specific options for better stability
70+
if platform.system() == "Darwin": # macOS
71+
options.add_argument("--disable-web-security")
72+
options.add_argument("--disable-features=VizDisplayCompositor")
73+
options.add_argument("--window-size=1920,1080")
74+
options.add_argument("--remote-debugging-port=9222")
75+
6776
driver = webdriver.Chrome(
6877
options=options,
6978
desired_capabilities=d,

tests/fr_selenium.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ def drag_and_zoom(self, div_classname, x0=0.25, x1=0.5, y0=0.25, y1=0.5):
230230
if not self.on_page:
231231
self.go_to_page()
232232

233-
WebDriverWait(self.driver, 10).until(
233+
timeout = 30 if not_on_linux() else 10
234+
WebDriverWait(self.driver, timeout).until(
234235
EC.presence_of_element_located((By.CLASS_NAME, div_classname))
235236
)
236237

0 commit comments

Comments
 (0)