selenium-ide
selenium-ide copied to clipboard
selenium-side-runner doesn't execute .side file with user profile indicated
🐛 Bug Report
Hello!
BTW, I tried to check at IRC channel, but couldn't find anybody in channel.
To Reproduce
Steps to reproduce the behavior:
When I try to run selenium-side-runner without profile-directory, it doesn't see / open necessary profile: selenium-side-runner -c "goog:chromeOptions.args=[user-data-dir=C:\Users\user\AppData\Local\Google\Chrome\User Data\Profile 2] browserName=chrome" C:\SeleniumProjects\refresh.side
Result: different profile is opened: C:\Users\user\AppData\Local\Google\Chrome\User Data\Profile 2\Default
But when I use profile-directory, it doesn't execute .side file. Chrome browser opens with empty tab and nothing happens (visible): selenium-side-runner -c "goog:chromeOptions.args=[user-data-dir=C:\Users\user\AppData\Local\Google\Chrome\User Data, profile-directory=Profile 2] browserName=chrome" C:\SeleniumProjects\refresh.side
UPDATED (2022.02.05 / YYYY.MM.DD): selenium-side-runner -c "goog:chromeOptions.args=[user-data-dir=C:\Users\user\AppData\Local\Google\Chrome\User Data\Default] browserName=chrome" C:\SeleniumProjects\refresh.side Command above opens new profile named 'Default' inside of Default profile: C:\Users\user\AppData\Local\Google\Chrome\User Data\Default\Default
Expected behavior
command should execute .side file
Project file reproducing this issue (highly encouraged)
Project file .side
that reproduces this issue.
{
"id": "1e239c7c-9efe-4bfa-9aae-a5030e0f3544",
"version": "2.0",
"name": "AMZ Ad Bulk Upload",
"url": "https://advertising.amazon.com/",
"tests": [{
"id": "f9bfc4ed-077d-494b-a400-225de3d517f6",
"name": "test4",
"commands": [{
"id": "cf69dff6-0567-41d7-b603-65a6538f64c7",
"comment": "",
"command": "open",
"target": "/bulksheet/HomePage?entityId=ENTITY110F8X3WTYW6E",
"targets": [],
"value": ""
}, {
"id": "6b17aeb2-952e-4e54-8633-c93787dba598",
"comment": "",
"command": "pause",
"target": "10000",
"targets": [],
"value": ""
}]
}],
"suites": [{
"id": "16865840-4b6c-4690-a5af-55baf0eef8ad",
"name": "Default Suite",
"persistSession": false,
"parallel": false,
"timeout": 300,
"tests": ["f9bfc4ed-077d-494b-a400-225de3d517f6"]
}],
"urls": ["https://advertising.amazon.com/"],
"plugins": []
}
Environment
OS: Windows 10 Version 21H1 (Build 19043.1466) Selenium IDE Version: v3.17.2 Selenium SIDE Runner Version: v3.17.0 Node version: v16.13.2 Browser: Chrome Browser Version: 97.0.4692.99 (Official) (64 бит) (cohort: Stable)
Very interesting, thank you for providing a good reproduction path. Unfortunately, my current and most immediate goal is v4 of the IDE, which I'm aiming to get out around April. After that is out, I intend to come back around and revisit / triage more nuanced issues like this. I'm sorry if this affects your ability to perform your workflow, but its the best move I can make for the long term health of this tooling.
Thanks, Todd. I discovered a little bit more data:
UPDATED (2022.02.05 / YYYY.MM.DD): selenium-side-runner -c "goog:chromeOptions.args=[user-data-dir=C:\Users\user\AppData\Local\Google\Chrome\User Data\Default] browserName=chrome" C:\SeleniumProjects\refresh.side Command above opens new profile named 'Default' inside of Default profile: C:\Users\user\AppData\Local\Google\Chrome\User Data\Default\Default
I propose this as the solution, and please mark it so, if this works for you. I figured out something that works for me as this appears to be a bug in the documentation. This works well. The trick is to remove any '-' before 'user-data-dir' like below. This is plaguing many users. I'll look around for other places asking this same question and share.
selenium-side-runner -c "goog:chromeOptions.args=[user-data-dir=C:\Users\Admin\AppData\Local\Google\Chrome\selenium] browserName=chrome" .\Test.side
@coinzdude, thanks for your input.
I tried command as you suggested (with my path), but it has only added a new profile in the given path.
My aim was to start Chrome with selenium-side-runner, and in profile of my selection.
Opening 'Default' profile is solved: selenium-side-runner -c "goog:chromeOptions.args=[user-data-dir=C:\Users\user\AppData\Local\Google\Chrome\User Data] browserName=chrome" C:\SeleniumProjects\refresh.side
This command opens Chrome with Default profile, and scripts run without error.
@coinzdude, thanks for your input.
I tried command as you suggested (with my path), but it has only added a new profile in the given path.
My aim was to start Chrome with selenium-side-runner, and in profile of my selection.
Opening 'Default' profile is solved: selenium-side-runner -c "goog:chromeOptions.args=[user-data-dir=C:\Users\user\AppData\Local\Google\Chrome\User Data] browserName=chrome" C:\SeleniumProjects\refresh.side
This command opens Chrome with Default profile, and scripts run without error.
@hyperione selenium-side-runner -c "goog:chromeOptions.binary=/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome" -c "goog:chromeOptions.args=[--user-data-dir=/Users/manikanta/Library/Application\ Support/Google/Chrome/Default]" /Users/manikanta/Downloads/qA-NewTest.side
i tried this this command for running in profile of my selection but it is running in new profile . Can you please help how to run in my profile of chrome
https://github.com/SeleniumHQ/selenium-ide/issues/1672 can any one know how to run in mac on my profile
@manikantayarramsetti1 - Did you try the method recommended in this comment? The capabilities here are parsed and largely passed as is to selenium-webdriver. I believe there should be some debug log flags in the side-runner. Turn those on, and you should be able to see the intermediate object passed to the chromedriver capabilities. Look for any incorrect syntax around the flags you're trying to use.
https://github.com/SeleniumHQ/selenium-ide/issues/1319#issuecomment-1039450008