-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: support phantomjs-prebuilt in selenium-webdriver #2069
Comments
Marking this as a feature request as we've never claimed to support phantomjs-prebuilt. I will not accept a PR that introduces a dependency on that module, but would consider a PR that made selenium-webdriver aware of it when searching for the executable. |
npm install phantomjs-prebuilt
thanks. please support search .cmd file, because when we use npm in win32, almost all executable installed in node_modules/.bin is named with a ".CMD" ext. |
Happened to be working with this issue and found that you can technically get around this by building a PhantomJS driver around a custom Capability linking to the location of the executable. You just write something like this in the beginning of your own test, no need to modify selenium's code:
Since Selenium provides instructions for how to work with a custom Firefox install, I wrote instructions for how to use phantomjs-prebuilt with selenium-webdriver here |
@vtange ah, this is good. because at last I need not to hard code the PATH in my code. thanks! |
Seconded @jleyba on not putting dependency on That project has a known problematic install with CDN flakkiness, there is a myriad of issues filed against this. See:
And Medium/phantomjs#598 (comment) There are also other alternative to configure phantomjs support out of the box.
with the following parameters
Also with headless chrome coming out soon, it might be worth it to transition to use Chrome all together |
With the |
with chrome headless now being available - Should this still be an option? |
@manoj9788 I just start to use chrome headless today. const options = {
args: [
'--disable-gpu',
'--headless', // https://developers.google.com/web/updates/2017/04/headless-chrome
'--homepage=about:blank',
'--no-sandbox',
], // issue #26 for run inside docker See: |
Nice, so can you close this issue? |
Thanks |
You are welcome. :) |
Meta -
OS: Win32
Selenium Version: 2.53.2
Browser: phantomjs, which installed by
npm install phantomjs-prebuilt
Browser Version: 2.1.7
Expected Behavior -
node js source
should find phantomjs executable, and return success.
Actual Behavior -
cant find phantomjs executable.
Steps to reproduce -
step 1. open cmd window
step 2. run
step 3. then run this node js source
step 4. webdriver said that cant find phantomjs executable.
Steps to quick fix -
step 1. find executable installed by phatomjs-prebuilt in node_modules.bin
step 2. reason: in selenium-webdriver/phantomjs.js:
it only find .exe . but the phantomjs-prebuilt installed executable name is
.cmd
step 3. fix: add
.cmd
to searchio.findPath
:The text was updated successfully, but these errors were encountered: