Skip to content

Commit 3779f04

Browse files
fix: define browser resolution for all chrome tests (#431)
Specifying window resolution for UI tests resolves `ElementNotInteractableException` error when element to be found with xpath is not visible and browser page has to be scrolled down.
1 parent 6940141 commit 3779f04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytest_splunk_addon_ui_smartx/base_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ def get_local_chrome_opts(headless_run):
154154
chrome_opts.add_argument("--ignore-ssl-errors=yes")
155155
chrome_opts.add_argument("--ignore-certificate-errors")
156156
chrome_opts.add_argument("--disable-dev-shm-usage")
157+
chrome_opts.add_argument("--window-size=1280,768")
157158
if headless_run:
158159
chrome_opts.add_argument("--headless")
159-
chrome_opts.add_argument("--window-size=1280,768")
160160
return chrome_opts
161161

162162
@staticmethod

0 commit comments

Comments
 (0)