Skip to content

Commit 3c169a1

Browse files
authored
Adding Grid URL env var (#1233) [deploy][prerelease]
* Using DesiredCapabilities.OPERA * Reading SE_NODE_GRID_URL env var
1 parent ae7d131 commit 3c169a1

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

NodeBase/generate_config

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@ else
2323
echo "port = \"${SE_NODE_PORT}\"" >> /opt/selenium/config.toml
2424
fi
2525

26-
echo "[node]
27-
max-sessions = ${SE_NODE_MAX_SESSIONS}
26+
echo "[node]" >> /opt/selenium/config.toml
27+
# String, Url where the Grid can be reached
28+
if [[ -z "${SE_NODE_GRID_URL}" ]]; then
29+
echo "Setting up SE_NODE_GRID_URL..."
30+
else
31+
echo "grid-url = \"${SE_NODE_GRID_URL}\"" >> /opt/selenium/config.toml
32+
fi
33+
echo "max-sessions = ${SE_NODE_MAX_SESSIONS}
2834
" >> /opt/selenium/config.toml
2935

36+
37+

tests/SeleniumTests/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ def test_title_and_maximize_window(self):
9494

9595
class OperaTests(SeleniumGenericTests):
9696
def setUp(self):
97-
capabilities = DesiredCapabilities.CHROME
98-
capabilities['browserName'] = 'opera'
9997
self.driver = webdriver.Remote(
100-
desired_capabilities=capabilities,
98+
desired_capabilities=DesiredCapabilities.OPERA,
10199
command_executor="http://%s:4444" % SELENIUM_GRID_HOST
102100
)

0 commit comments

Comments
 (0)