webdriverio-boneyard / wdio-firefox-profile-service Goto Github PK
View Code? Open in Web Editor NEWWebdriverIO v4 service to easy define Firefox profiles for the WDIO testrunner
Home Page: http://webdriver.io
License: MIT License
WebdriverIO v4 service to easy define Firefox profiles for the WDIO testrunner
Home Page: http://webdriver.io
License: MIT License
Hi,
I'm trying to install an unsigned Firefox addon I want to test. In my wdio.conf.js, I have:
services: ['firefox-profile'],
firefoxProfile: {
'xpinstall.signatures.required': false,
extensions: [__dirname+'/output/firefox/firefox.xpi']
}
But when I run it, I get:
A service failed in the 'onPrepare' hook
Error: Cannot find module '/tmp/d410c520-7be1-4492-a3d5-4a8067a2d1f3firefox.xpi/package.json'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at FirefoxProfile._addonDetails (/home/vlad/Documents/click-to-call/node_modules/firefox-profile/lib/firefox_profile.js:635:20)
at FirefoxProfile._installExtension (/home/vlad/Documents/click-to-call/node_modules/firefox-profile/lib/firefox_profile.js:549:8)
at FirefoxProfile.addExtension (/home/vlad/Documents/click-to-call/node_modules/firefox-profile/lib/firefox_profile.js:319:8)
at /home/vlad/Documents/click-to-call/node_modules/firefox-profile/lib/firefox_profile.js:333:12
at /home/vlad/Documents/click-to-call/node_modules/firefox-profile/node_modules/async/lib/async.js:718:13
at async.forEachOf.async.eachOf (/home/vlad/Documents/click-to-call/node_modules/firefox-profile/node_modules/async/lib/async.js:233:13)
I checked and the d410c520-7be1-4492-a3d5-4a8067a2d1f3firefox.xpi dir contains a copy of the addon files that are in /output/firefox/ dir.
Do you know why this happens? Is there a something I can do?
Referring to:
http://webdriver.io/guide/services/firefox-profile.html
The following conf snippet doesn't work either locally or with some other service say Sauce Labs:
services: ['firefox-profile'],
firefoxProfile: {
'media.navigator.streams.fake': true,
'media.navigator.permission.disabled': true
}
HI,
I tried adding the following code to wdio.config.js to overcome the certificate error.
services: ['firefox-profile'],
firefoxProfile: {
assumeUntrustedCertIssuer: true,
canAssumeUntrustedCertIssuer: true
}
But the firefox is not honoring these values. Are we stripping down these values in this module?
Please publish wdio-firefox-profile-service to npm and provide an example of usage.
Thank you.
UPD. Found an example here https://github.com/webdriverio/wdio-firefox-profile-service/blob/master/test/wdio.conf.js
From @Nandish47 on July 5, 2018 6:57
Hi,
I tried to ignore a firefox certificate error 'Your connection is not secure' which usually occurs if certificate is not trusted by using wdio-firefox-profile-service from wdio.conf.js.
services: ['firefox-profile'],
firefoxProfile: {
assumeUntrustedCertIssuer: true,
canAssumeUntrustedCertIssuer: true
},
But WebdriverIO fails to get past these errors. Are the key values ignoring certificates changed?
Copied from original issue: webdriverio/webdriverio#2791
Hi,
I am the maintainer of firefox-profile
package. This is just a heads-up that I am about to publish a new 1.0 package that introduces a breaking change: Firefox.prototype.encoded(cb)
now expects an error-first callback (encoded(function (err, base64Profile) {})
). So if you decide to update your package dependencies, you might want to update this line (... and also handle the error...).
The profile defined in wdio.conf is not set in newer versions of firefox and geckodriver
Firefox: 56.0
geckodriver: 0.19.0
selenium-server-standalone: 3.6.0
According to saadtazi/firefox-profile-js#95 the browser capabilities changed and the profile should be set like so:
cap['moz:firefoxOptions'] = {
profile: zippedProfile
};
Instead of the old definition
cap.firefox_profile = zippedProfile;
Hey folks,
Could you please push an update to this package? You already merged the PR that bumps up firefox-profile to 0.4.6 here: #4
We'd need to use the latest firefox-profile because it supports Firefox Web Extensions.
We forked the repo temporarily to get around the issue, but it's a poor long term solution, especially because NPM behaves badly when installing from a forked repo (doesn't build correctly).
Thank you!
Hello webdriverioskis
I copied this repository and started changing everything from 'firefox' to 'chrome'.
My question is about the npm test command:
"test": "wdio test/wdio.conf.js"
Could you please explain in a paragrah to me the nature of this test? I do not understand it.
I'm launching wdio programmatically supplying capabilities for firefox like this:
{
browserName: 'firefox',
'moz:firefoxOptions': {
args: ['--width=400', '--height=768']
}
};
This works fine, opening firefox at the correct size. But I also use the wdio-firefox-profile-service to supply a profile and the firefox-profile-launch-service.js overwrites the 'moz:firefoxOptions' like this:
cap['moz:firefoxOptions'] = {
profile: zippedProfile
}
If I change firefox-profile-launch-service.js to add the property instead it works:
cap['moz:firefoxOptions'].profile = zippedProfile;
So frist off, it works great locally, no issues. But... I've had some trouble getting firefox version >47 to load the profile at all in travis. I have tried saucelabs, and the same occurred. Any help would greatly be appreciated.
My attempts so far of me running around like a headless chicken are here. https://travis-ci.org/lutostag/webextension-formsave/builds
More than happy to try anything! Thanks!
There is no commit since may and no open issue, however the changes are important since the last release because the firefox-profile versionn has been updated.
Is there any reason for not releasing a new version?
If other options are provided in moz:firefoxOptions
they are being overriden by the profile. This disable for example the option to run headless (args: [-headless]
).
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.