You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to use external parameters, e.g. with Windows variables, "--params" or "env" input in the .side.yml file, in a functioning project side-file, unfortunately it does not work. The value of the variables is not transferred:
Selenium Grid is run under WSL Docker and selenium-side-runner under Windows.
WSL-Version: 2.3.14.0
Kernelversion: 6.6.36.3-1
Microsoft Windows Server 2022 [Version 10.0.20348.2461]
C:>%USERPROFILE%\AppData\Roaming\npm\selenium-side-runner.cmd --version
4.0.12
Hi, I am trying to use external parameters, e.g. with Windows variables, "--params" or "env" input in the .side.yml file, in a functioning project side-file, unfortunately it does not work. The value of the variables is not transferred:
info: echo: Env MYUSERNAME: ${MYUSERNAME}, Env MYPASSWORD: ${MYPASSWORD}
Selenium Grid is run under WSL Docker and selenium-side-runner under Windows.
WSL-Version: 2.3.14.0
Kernelversion: 6.6.36.3-1
Microsoft Windows Server 2022 [Version 10.0.20348.2461]
C:>%USERPROFILE%\AppData\Roaming\npm\selenium-side-runner.cmd --version
4.0.12
Docker container:
Selenium Grid 4.23.0 (revision 77010cd)
chrome {"browserName":"chrome","browserVersion":"127.0","goog:chromeOptions":{"binary":"/usr/bin/google-chrome"},"platformName":"linux","se:containerName":"","se:noVncPort":7900,"se:vncEnabled":true}
Test.side file
...
"commands": [
{
"command": "echo",
"target": "Env MYUSERNAME: ${MYUSERNAME}, Env MYPASSWORD: ${MYPASSWORD}",
"value": "",
"id": "62047056-d94c-4b1d-8225-830dcc376e45"
},
{
"command": "store",
"target": "${MYUSERNAME}",
"value": "storedUsername",
"id": "8d9cc6ab-f7ec-4649-bdbc-9dcb42d59e53"
},
{
"command": "store",
"target": "${MYPASSWORD}",
"value": "storedPassword",
"id": "53475d8a-63ef-4337-b261-bfc446da22b7"
},
{
"command": "echo",
"target": "Username is: ${storedUsername} and Password is: ${storedPassword}",
"value": "",
"id": "fbff3d44-b897-42a9-9906-196623e64044"
},
{
"id": "ea00a4ed-b33e-4238-9de8-0509b55e4a6b",
"comment": "",
"command": "setWindowSize",
"target": "1280x800",
"targets": [],
"value": ""
},
...
Test: --params
set MYUSERNAME=demo
set MYPASSWORD=demo
%runner_CMD% %TEST% --output-directory=results --config-file %TestCase_Dir%.side.yml --params "MYUSERNAME=%MYUSERNAME% MYPASSWORD=%MYPASSWORD%" --server %Remote_URL%
error: unknown option '--params'
Test: Windows variables
set MYUSERNAME=demo
set MYPASSWORD=demo
%runner_CMD% %TEST% --output-directory=results --config-file %TestCase_Dir%.side.yml --server %Remote_URL%
Debug output:
Configuration: {
baseUrl: 'about:blank',
capabilities: {
browserName: 'chrome',
version: '128.0',
platform: 'linux',
acceptInsecureCerts: true,
'goog:chromeOptions': { args: [Array] }
},
debug: true,
debugConnectionMode: undefined,
debugStartup: true,
filter: '.*',
force: undefined,
maxWorkers: 4,
screenshotFailureDirectory: undefined,
projects: [
'e:\SpeedTest.side'
],
proxyOptions: {},
proxyType: undefined,
retries: 0,
runId: 'c4f0c2f9fe3e60390b6f85cccd7a6648',
path: 'C:\Users\Usr\AppData\Roaming\npm\node_modules\',
server: 'http://127.0.0.1:4444/wd/hub',
jestTimeout: 60000,
timeout: 15000
}
Jest command: node C:\Users\User\AppData\Roaming\npm\node_modules\selenium-side-runner\node_modules\jest\bin\jest.js [
'--config=C:\Users\User\AppData\Roaming\npm\node_modules\selenium-side-runner\runner.jest.config.js',
'--maxConcurrency=4',
'--json',
'--outputFile=results\results-2024-08-07T16-31-10.934Z.json',
'--runTestsByPath',
'C:\Users\User\AppData\Roaming\npm\node_modules\selenium-side-runner\dist\main.test.js'
] {
..
MYPASSWORD: 'demo',
MYUSERNAME: 'demo',
Env from .side.yml: the variables are taken over, but the same behavior as above
%runner_CMD% %TEST% --output-directory=results --config-file %TestCase_Dir%.side.yml --server %Remote_URL%
.side.yml - file:
debug: true
#debugConnectionMode: true
debugStartup: true
baseUrl: "about:blank"
capabilities:
browserName: "chrome"
version: "128.0"
platform: "linux"
acceptInsecureCerts: true
goog:chromeOptions:
args:
- incognito
env:
MYUSERNAME: "demo"
MYPASSWORD: "demo"
Debug output:
...
server: 'http://127.0.0.1:4444/wd/hub',
jestTimeout: 60000,
timeout: 15000,
env: { MYUSERNAME: 'demo', MYPASSWORD: 'demo' }
}
Thx
The text was updated successfully, but these errors were encountered: