webdriverio-community / wdio-geckodriver-service Goto Github PK
View Code? Open in Web Editor NEWWebdriverIO service to start & stop GeckoDriver
License: MIT License
WebdriverIO service to start & stop GeckoDriver
License: MIT License
I installed wdio-geckodriver-service v3.0.0 and src/index.js
did not exist.
This result is displaying the inside of node_modules/wdio-geckodriver-service
using the tree command:
v2.1.2
$ tree node_modules/wdio-geckodriver-service
node_modules/wdio-geckodriver-service
├── LICENSE
├── README.md
├── package.json
└── src
└── index.js
v3.0.0
$ tree node_modules/wdio-geckodriver-service
node_modules/wdio-geckodriver-service
├── LICENSE
├── README.md
└── package.json
Hello team!
After an upgrade to the wdio-geckodriver-service v2.0.0 I noticed that every time when you want to launch your e2e test suites on Firefox browser @wdio/sync throws the following error into a console:
0-0] 2021-05-26T15:23:32.683Z INFO geckodriver: Start Geckodriver (/home/user/wdio-project/node_modules/geckodriver/geckodriver) with args: --log=info --port=34177
[0-0] 2021-05-26T15:23:32.743Z ERROR @wdio/sync: ReferenceError: split2 is not defined
at GeckoService._startDriver (/home/user/wdio-project/node_modules/wdio-geckodriver-service/src/index.js:128:33)
I think that it happens because the split2 package is not imported in index.js. Could you please take a look at this?
It can be fixed by adding the following LOC at the beginning of index.js:
const split2 = require('split2');
I tested it on my local machine and it helped me to resolve the issue.
Unfortunately, it wasn't the last issue within the index.js file. When I launched my e2e test suite once again I got the following error from @wdio/sync in logs:
[0-0] 2021-05-26T15:39:29.610Z INFO geckodriver: Start Geckodriver (/home/user/wdio-project/node_modules/geckodriver/geckodriver) with args: --log=info --port=41137
[0-0] 2021-05-26T15:39:29.641Z INFO geckodriver: 1622043569638 geckodriver INFO Listening on 127.0.0.1:41137
[0-0] 2021-05-26T15:39:29.650Z ERROR @wdio/sync: TypeError: Cannot read property 'bind' of undefined
at GeckoService._startDriver (/home/user/wdio-project/node_modules/wdio-geckodriver-service/src/index.js:133:44)
It would be nice if you take a look at the aforementioned issues.
Best regards,
Ihor
Hey @RafalSkorka ,
first off, thank you for creating this plugin and extending the WebdriverIO ecosystem!
We have been looking into successful WDIO plugins like this one as we want to ensure that its development can be continued even if the original maintainer decides to move on. Therefore on behalf of the WebdriverIO community I would like to ask if you would be interested to move this repository into the WebdriverIO Community organisation. It would allow us to help maintain this package, automate a few things like releases and allow others to contribute to it and make the package even better. You would of course continue to have full access to it.
What do you think? Please let me know if you have any questions.
As part of the v8 effort we are currently migrating over to ESM as many packages will stop support CJS in the future. This means we have to transition all plugins to ESM as well, ideally with continuous support for CJS.
Hello,
try running more than one tests in parallel with geckodriver, it fails with error Session is already started
.
Add a new option to log to a specific filename like wdio-chromedriver-service
I have installed the latest NPM packages for wdio-geckodriver-service and geckodriver as below:
"devDependencies": { "@types/chai": "^4.3.5", "@types/supertest": "^2.0.12", "@wdio/allure-reporter": "^8.8.7", "@wdio/cli": "^8.9.0", "@wdio/cucumber-framework": "^8.8.7", "@wdio/local-runner": "^8.9.0", "@wdio/spec-reporter": "^8.8.7", "chai": "^4.3.7", "chromedriver": "^112.0.1", "dotenv": "^16.0.3", "geckodriver": "^4.0.0", "supertest": "^6.3.3", "ts-node": "^10.9.1", "wdio-chromedriver-service": "^8.1.1", "wdio-geckodriver-service": "^5.0.0", "winston": "^3.8.2" },
When running the WebdriverIO tests, they fail immediately with:
Error: Failed to initilialise launcher service unknown: Error: Couldn't initialise "wdio-geckodriver-service". file:///Users/jane.hamilton/Repositories/webdriverioe2e/node_modules/wdio-geckodriver-service/dist/service.js:19 import { start, download } from 'geckodriver'; ^^^^^^^^ SyntaxError: Named export 'download' not found.
Geckodriver 4.0.0 introduced the new download export https://github.com/webdriverio-community/node-geckodriver/releases/tag/v4.0.0
However, if you expand the wdio-geckodriver-service npm package, and look in the nested geckodriver folder, it is still using geckodriver 3.2.0 and hence why I think it is failing to start.
I think wdio-geckodriver-service v5.0.0 needs to be updated (in it's package.json) to install "geckodriver": "^4.0.0" ?
I am trying to add custom port to geckodriver via options. It always taking random port number.
the following line always be true and it is generating the random port number.
this.randomPort = options.useRandomPort || config.geckoDriverRandomPort || true
Example: https://www.npmjs.com/package/wdio-chromedriver-service#user-content-configuration
This would save me having to add stuff to the top level and section it off
non persistent mode failed, service is not waiting for geckodriver port to open.
Hi Rafał,
On behalf of the WebdriverIO Steering Committee I would like to contact you personally.
Could you provide me with your personal contact information? My contact details are available on my profile.
Looking forward to your reply and you can close this issue after replying of course.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.