Comments (18)
@jackchuong, thank you for creating this issue. We will troubleshoot it as soon as we can.
Info for maintainers
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template
label.
If the issue is a question, add the I-question
label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted
label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-*
label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer
label.
Thank you!
from selenium-ide.
FAIL ../AppData/Roaming/npm/node_modules/selenium-side-runner/dist/main.test.js (31.04 s)
× Testing driver connection (30086 ms)
It could be due to your network connection causing the driver to take a long time to download & build
Can you also try to pre-run npm install -g chromedriver
once to initialize the driver separately?
If it still fails, try to find any process in Windows Task Manager that keeps chromedriver.exe
running before, kill it, and rerun.
Also, I don't know -X
is represent for which config. However without -X
I had a run successfully as below
PS D:\Code\GitHub\selenium-ide> selenium-side-runner test3.side
info: Running test test3
RUNS C:/Users/ndviet/AppData/Roaming/npm/node_modules/selenium-side-runner/dist/main.test.js
info: Finished test test3 Success
PASS C:/Users/ndviet/AppData/Roaming/npm/node_modules/selenium-side-runner/dist/main.test.js (15.546 s)
Running project test3
Running suite Default Suite
√ Running test test3 (14573 ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 15.655 s
from selenium-ide.
Can you also try to pre-run
npm install -g chromedriver
once to initialize the driver separately?
Yes
C:\Users\jack.chuong\Downloads>npm install -g chromedriver
changed 63 packages in 17s
2 packages are looking for funding
run `npm fund` for details
C:\Users\jack.chuong\Downloads>chromedriver --version
ChromeDriver 123.0.6312.105 (399174dbe6eff0f59de9a6096129c0c827002b3a-refs/branch-heads/6312@{#761})
If it still fails, try to find any process in Windows Task Manager that keeps
chromedriver.exe
running before, kill it, and rerun.
There is no process in Windows Task Manager that keeps chromedriver.exe
running before.
Also, I don't know
-X
is represent for which config
C:\Users\jack.chuong\Downloads>selenium-side-runner --help
Usage: bin [options] your-project-glob-here-*.side [variadic-project-globs-*.side]
Options:
-V, --version output the version number
--base-url [url] Override the base URL that was set in the IDE
-c, --capabilities [list] Webdriver capabilities
-j, --jest-options [list] Options to configure Jest, wrap in extra quotes to allow shell to process (default: "\"\"")
-s, --server [url] Webdriver remote server
-r, --retries [number] Retry tests N times on failures, thin wrapper on jest.retryTimes (default: 0)
-f, --filter [string] Run suites matching name, takes a regex without slashes, eg (^(hello|goodbye).*$)
-w, --max-workers [number] Maximum amount of workers that will run your tests, defaults to number of cores
-t, --timeout [number] The maximimum amount of time, in milliseconds, to spend attempting to locate an element. (default: 15000) (default:
15000)
-T, --jest-timeout [number] The maximimum amount of time, in milliseconds, to wait for a test to finish. (default: 60000) (default: 60000)
-x, --proxy-type [type] Type of proxy to use (one of: direct, manual, pac, socks, system)
-y, --proxy-options [list] Proxy options to pass, for use with manual, pac and socks proxies
-n, --config-file [filepath] Use specified YAML file for configuration. (default: .side.yml)
-o, --output-directory [directory] Write test results as json to file in specified directory. Name will be based on timestamp.
-z, --screenshot-failure-directory [directory] Write screenshots of failed tests to file in specified directory. Name will be based on test + timestamp.
-f, --force Forcibly run the project, regardless of project's version
-d, --debug Print debug logs
-D, --debug-startup Print debug startup logs
-X, --debug-connection-mode Debug driver connection mode
-h, --help display help for command
Without -X
I get error as below
C:\Users\jack.chuong\Downloads>selenium-side-runner test3.side
info: Running test test3
FAIL ../AppData/Roaming/npm/node_modules/selenium-side-runner/dist/main.test.js (31.115 s)
Running project test3
Running suite Default Suite
× Running test test3 (30011 ms)
● Running project test3 › Running suite Default Suite › Running test test3
Driver took too long to build. This is likely an issue with the browser or driver.
at Timeout._onTimeout (node_modules/@seleniumhq/side-runtime/src/webdriver.ts:200:13)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 31.24 s, estimated 32 s
Ran all test suites within paths "C:\Users\jack.chuong\AppData\Roaming\npm\node_modules\selenium-side-runner\dist\main.test.js".
I tried with another Windows 11 , still same error.
from selenium-ide.
Oh ok, based on few info in your logs
OS: win32
Node: v20.12.2
Selenium-Webdriver: 4.19.0
chromedriver --version
ChromeDriver 123.0.6312.105 (399174dbe6eff0f59de9a6096129c0c827002b3a-refs/branch-heads/6312@{#761})
If accessing these 2 links directly, how long it takes to complete the download? is it within 30s? If no, need to figure out a config to extend that timeout (something needs to be asked in project selenium-ide)
- https://storage.googleapis.com/chrome-for-testing-public/123.0.6312.105/win32/chrome-win32.zip
- https://storage.googleapis.com/chrome-for-testing-public/123.0.6312.105/win64/chrome-win64.zip
Another Windows 11 with the same error, is it also win32? If yes, can you also try a machine win64 to see. If win64 can work, then the driver has something wrong with win32 that needs to ask chromedriver team
Another trick you can try to change the policy that will allow to run the PowerShell script (open PS run as administrators), then exec selenium-side-runner
in PowerShell instead of CMD to see any helps
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned -Force
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
from selenium-ide.
@VietND96
My both Windows 10 & 11 are 64 bit OS.
I tried PowerShell as administrators and still get same error
PS C:\Windows\system32> Get-ExecutionPolicy
RemoteSigned
PS C:\Windows\system32> Get-ExecutionPolicy -Scope Process
Bypass
And yes, it takes more then 30s to complete the download, my average download speed is 2.87 MB/s , so it takes about 50s for each file.
from selenium-ide.
Can you try this command selenium-side-runner -D -d -X --proxy-type direct test3.side
By running this command, I saw a log appear very fast (in case run successfully) that it tried to connect to 127.0.0.1:51xxx
, it looks like the port is random each run to launch the chromedriver.
If it stops with more logs helpful, let's check if it could be due to the firewall or something else can block the port or process of chromedriver.exe
from selenium-ide.
I print as much information as possible here:
PS C:\Users\jack.chuong\Downloads> selenium-side-runner -D -d -X --proxy-type direct test3.side
Configuration: {
baseUrl: '',
capabilities: { browserName: 'chrome', proxy: { proxyType: 'direct' } },
debug: true,
debugConnectionMode: true,
debugStartup: true,
filter: '.*',
force: undefined,
maxWorkers: 8,
screenshotFailureDirectory: undefined,
projects: [ 'C:\\Users\\jack.chuong\\Downloads\\test3.side' ],
proxyOptions: {},
proxyType: 'direct',
retries: 0,
runId: '15affc13ff18577918a97e64c972172b',
path: 'C:\\Users\\jack.chuong\\AppData\\Roaming\\npm\\node_modules\\',
server: '',
jestTimeout: 60000,
timeout: 15000
}
Jest command: node C:\Users\jack.chuong\AppData\Roaming\npm\node_modules\selenium-side-runner\node_modules\jest\bin\jest.js [
'--config=C:\\Users\\jack.chuong\\AppData\\Roaming\\npm\\node_modules\\selenium-side-runner\\runner.jest.config.js',
'--maxConcurrency=8',
'--runTestsByPath',
'C:\\Users\\jack.chuong\\AppData\\Roaming\\npm\\node_modules\\selenium-side-runner\\dist\\main.test.js'
] {
ALLUSERSPROFILE: 'C:\\ProgramData',
APPDATA: 'C:\\Users\\jack.chuong\\AppData\\Roaming',
ChocolateyInstall: 'C:\\ProgramData\\chocolatey',
ChocolateyLastPathUpdate: '133386376887221046',
CommonProgramFiles: 'C:\\Program Files\\Common Files',
'CommonProgramFiles(x86)': 'C:\\Program Files (x86)\\Common Files',
CommonProgramW6432: 'C:\\Program Files\\Common Files',
ComSpec: 'C:\\Windows\\system32\\cmd.exe',
DriverData: 'C:\\Windows\\System32\\Drivers\\DriverData', ',
HOMEDRIVE: 'C:',
HOMEPATH: '\\Users\\jack.chuong',
LOCALAPPDATA: 'C:\\Users\\jack.chuong\\AppData\\Local',
NUMBER_OF_PROCESSORS: '8',
OS: 'Windows_NT',
Path: 'C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\wbin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\PuTTY\\;C:\\Program Files\\Git\\cmd;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\nodejs\\;C:\\Users\\jack.chuong\\scoop\\shims;C:\\Users\\jack.chuong\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\Azure Data Studio\\bin;C:\\Users\\jack.chuong;C:\\Users\\jack.chuong\\AppData\\Roaming\\Python\\Python310\\Scripts\\;C:\\Users\\jack.chuong\\AppData\\Roaming\\npm',
PATHEXT: '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL',
PROCESSOR_ARCHITECTURE: 'AMD64',
PROCESSOR_IDENTIFIER: 'Intel64 Family 6 Model 142 Stepping 11, GenuineIntel',
PROCESSOR_LEVEL: '6',
PROCESSOR_REVISION: '8e0b',
ProgramData: 'C:\\ProgramData',
ProgramFiles: 'C:\\Program Files',
'ProgramFiles(x86)': 'C:\\Program Files (x86)',
ProgramW6432: 'C:\\Program Files',
PSModulePath: 'C:\\Users\\jack.chuong\\Documents\\WindowsPowerShell\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules;C:\\Program Files\\SharePoint Online Management Shell\\',
PUBLIC: 'C:\\Users\\Public',
SystemDrive: 'C:',
SystemRoot: 'C:\\Windows',
TEMP: 'C:\\Users\\JACK~1.CHU\\AppData\\Local\\Temp',
TMP: 'C:\\Users\\JACK~1.CHU\\AppData\\Local\\Temp',
windir: 'C:\\Windows',
ZES_ENABLE_SYSMAN: '1',
__PSLockDownPolicy: '0',
SE_CONFIGURATION: '{"baseUrl":"","capabilities":{"browserName":"chrome","proxy":{"proxyType":"direct"}},"debug":true,"debugConnectionMode":true,"debugStartup":true,"filter":".*","maxWorkers":8,"projects":["C:\\\\Users\\\\jack.chuong\\\\Downloads\\\\test3.side"],"proxyOptions":{},"proxyType":"direct","retries":0,"runId":"15affc13ff18577918a97e64c972172b","path":"C:\\\\Users\\\\jack.chuong\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\","server":"","jestTimeout":60000,"timeout":15000}'
}
console.log
Beginning test session
at Object.<anonymous>.exports.default (src/connect.ts:9:11)
console.info
Building driver for chrome
at WebDriverExecutor.getDriverSync (node_modules/@seleniumhq/side-runtime/src/webdriver.ts:172:14)
console.info
Driver attributes:{
capabilities: { proxy: { proxyType: 'direct' } },
server: '',
browserName: 'chrome'
}
at WebDriverExecutor.getDriverSync (node_modules/@seleniumhq/side-runtime/src/webdriver.ts:173:14)
console.error
Failed to build driver for chrome
Supplied capabilities: {"proxy":{"proxyType":"direct"}}
Server: none
Error: Error: Driver took too long to build. This is likely an issue with the browser or driver.
OS: win32
Node: v20.12.2
Selenium-Webdriver: 4.19.0
This is breaking at the boundary of the following code in selenium-webdriver:
// BEGIN SELENIUM-WEBDRIVER CODE
const webdriver = require('selenium-webdriver')
const driver = new webdriver.Builder().withCapabilities({"proxy":{"proxyType":"direct"}}).forBrowser('chrome').build()
// END SELENIUM-WEBDRIVER CODE
To ensure the bug is in selenium IDE, please attempt to run the above code in a script or node REPL.
You may have to npm install selenium-webdriver first.
If you are unable to proceed further, please raise a bug here:
https://github.com/SeleniumHQ/selenium/issues/new?assignees=&labels=I-defect%2Cneeds-triaging&projects=&template=bug-report.yml&title=%5B%F0%9F%90%9B+Bug%5D%3A+
If this code works in selenium-webdriver, but not the IDE or side-runner, please raise a bug here:
https://github.com/SeleniumHQ/selenium-ide/issues/new?assignees=&labels=&projects=&template=bug.md
at WebDriverExecutor.getDriver (node_modules/@seleniumhq/side-runtime/src/webdriver.ts:216:17)
at WebDriverExecutor.init (node_modules/@seleniumhq/side-runtime/src/webdriver.ts:259:21)
at Object.<anonymous>.exports.default (src/connect.ts:10:3)
at Object.<anonymous> (src/main.test.ts:130:5)
FAIL ../AppData/Roaming/npm/node_modules/selenium-side-runner/dist/main.test.js (31.007 s)
× Testing driver connection (30058 ms)
● Testing driver connection
Driver took too long to build. This is likely an issue with the browser or driver.
at Timeout._onTimeout (node_modules/@seleniumhq/side-runtime/src/webdriver.ts:200:13)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 31.129 s
Ran all test suites within paths "C:\Users\jack.chuong\AppData\Roaming\npm\node_modules\selenium-side-runner\dist\main.test.js".
from selenium-ide.
Can you try running this and posting the output?
npm install selenium-webdriver && node -e "const webdriver = require('selenium-webdriver'); const driver = new webdriver.Builder().withCapabilities({'proxy':{'proxyType':'direct'}}).forBrowser('chrome').build();"
from selenium-ide.
There is no output at console but it creates some files and folders , I attached them below.
PS C:\Windows\system32> cd C:\Users\jack.chuong\Downloads
PS C:\Users\jack.chuong\Downloads> npm install selenium-webdriver && node -e "const webdriver = require('selenium-webdriver'); const driver = new webdriver.Builder().withCapabilities({'proxy':{'proxyType':'direct'}}).forBrowser('chrome').build();"
At line:1 char:32
+ npm install selenium-webdriver && node -e "const webdriver = require( ...
+ ~~
The token '&&' is not a valid statement separator in this version.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidEndOfLine
PS C:\Users\jack.chuong\Downloads> npm install selenium-webdriver
added 16 packages in 3s
PS C:\Users\jack.chuong\Downloads> node -e "const webdriver = require('selenium-webdriver'); const driver = new webdriver.Builder().withCapabilities({'proxy':{'proxyType':'direct'}}).forBrowser('chrome').build();"
PS C:\Users\jack.chuong\Downloads>
node-output.zip
It's .7z file but I have to change file extension to .zip so I can upload it.
from selenium-ide.
Ah, windows, my mistake. Can you try the following two commands instead?
npm i -g selenium-webdriver;
node -e "const webdriver = require('selenium-webdriver'); const driver = new webdriver.Builder().withCapabilities({'proxy':{'proxyType':'direct'}}).forBrowser('chrome').build();"
EDIT: Oh, nice. Thanks for splitting that. Okay, reading a bit closer.
from selenium-ide.
What happens if you do this?
node -e "const webdriver = require('selenium-webdriver'); const driver = new webdriver.Builder().withCapabilities({'proxy':{'proxyType':'direct'}}).forBrowser('chrome').build(); driver.get('https://www.google.com').then(() => setTimeout(() => driver.close(), 3000));"
Does a Chrome browser window appear for you for 3 seconds and then disappear?
from selenium-ide.
@toddtarsi
PS C:\Users\jack.chuong\Downloads> node -e "const webdriver = require('selenium-webdriver'); const driver = new webdriver.Builder().withCapabilities({'proxy':{'proxyType':'direct'}}).forBrowser('chrome').build(); driver.get('https://www.google.com').then(() => setTimeout(() => driver.close(), 3000));"
No, nothing happens. I have also noticed this behavior, I watched some tutorials on youtube before trying selenium ide and selenium-side-runner :)
C:\Users\jack.chuong\Downloads>selenium-side-runner test3.side
should open my chrome browser and do steps in .side file , but I get error instead
from selenium-ide.
Yes, okay. If this doesn't occur in selenium-webdriver, this won't work here as it extends that tool. Can you use this code as your point of conversation there? This is getting to a spot where the Selenium core team would be an order of magnitude more helpful than I am.
from selenium-ide.
Use the code to drive discussions in the main channel of the Selenium user group.
https://www.selenium.dev/support/
They'll help you with this there. I want to help, but this is not an IDE / runner problem. This gets into driver setup and Windows, two areas where I am a very poor resource.
from selenium-ide.
I had exactly the same problem, on Windows 11, but with the geckodriver.
I just made some updates, and hit the same problem : "Driver took too long to build. This is likely an issue with the browser or driver." after 30 seconds.
It was working with the exact same version of selenium-side-runner (4.0.5) and geckodriver (4.3.3) downloaded two months ago.
I finally found the culprit : it is Node version 20.12.2 ! With the previous version, v20.12.1, or version v20.11.0 it works again ...
Here is the last working version :
https://nodejs.org/download/release/v20.12.1
Maybe something linked to this ?
https://nodejs.org/en/blog/release/v20.12.2
[69ffc6d50d] - src: disallow direct .bat and .cmd file spawning (Ben Noordhuis)
from selenium-ide.
@tharfy - You are amazing, thank you. Will review tonight.
from selenium-ide.
I uninstalled node and npm , reinstall node v19.9.0 and npm 9.6.3 , selenium-side-runner worked.
from selenium-ide.
Thank you again @jackchuong. 😮💨 I think I might hold off on fixing this until this weekend. For a number of reasons, I've needed to get a cheapy windows notebook and to iterate this without will probably be a nightmare for Windows users, so I'll get a notebook and do it this weekend.
from selenium-ide.
Related Issues (20)
- Want the ability to run test on an existing tab/window instead of opening a new one every time HOT 4
- selenium-side-runner container fail to run .side file HOT 1
- Splash window become white-out in v4.0.1-beta.5 HOT 2
- selenium-side-runner thrown timeout error HOT 8
- Selenium IDE has a large application market in China, so I localized the source code (trunk branch) and added some features and fixed some bugs that I found. Perhaps I can help promote Selenium IDE in China. HOT 4
- Selenium-IDE 4 on MacOS: Unable to startup due to chromedriver error: HOT 11
- How can we use 'Virtual Authenticator' for the applications that authenticate users in a passwordless manner. HOT 5
- Warning "Jest did not exit one second after the test run has completed." HOT 5
- Unknown command storeXpathCount HOT 3
- stale element reference: stale element not found HOT 3
- Screentshot Command Missing
- Record new tests on existing pages HOT 1
- Running selenium recorder from terminal HOT 5
- setSpeed command not working in selenium side runner version 4.0.8 HOT 3
- Add a Window Timeout Field in the Command Editor, for Commands Marked as Opening a Window HOT 6
- Side Script with a self signed certificate web application is not running inside a docker container with selenium side runner ver 4.0.8 HOT 3
- Wait timeout value does not work HOT 1
- The new line character \n in string will block assertion HOT 3
- how to get downloads working in IDE/side runner? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from selenium-ide.