Skip to content
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

Add Profile Choice Functionality To The Module #47

Closed
wants to merge 9 commits into from

Conversation

barakhaim
Copy link

Added the option to mimic "firefox.exe -p ".
When adding "customProfile" to the "customLauncher" firefox will launch said profile. The profiles list is shown when you execute "firefox.exe -p". This was added as a solution to karma-runner/karma-firefox-launcher issue #46 .
Example:

browsers: ['FirefoxWithMyExtension'],

customLaunchers: {
FirefoxWithMyExtension: {
base: 'Firefox',
customProfile: 'Karma',
extensions: [
path.resolve(__dirname, '../[email protected]'),
]
}}

This will upload the "karma" firefox i've setup beforehand using "firefox.exe -p", in it, my configs, such as imported certs.

Ignoring this field will save the exact API of the original.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@@ -95,7 +96,7 @@ var FirefoxBrowser = function(id, baseBrowserDecorator, args, logger) {
fs.writeFileSync(profilePath + '/prefs.js', this._getPrefs(args.prefs));
self._execCommand(
command,
[url, '-profile', profilePath, '-no-remote'].concat(flags)
[url, (customProfile !== '') ? '-p ' + customProfile : '-profile ' + profilePath , '-no-remote'].concat(flags)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's break this up into multiple lines please

@dignifiedquire
Copy link
Member

Can you add some documentation on how to use this to the Readme as well please?

@barakhaim
Copy link
Author

Sure, I just pushed it.

customLaunchers: {
FirefoxWithMyExtension: {
base: 'Firefox',
customProfile: 'Karma',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use 2 spaces indent

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@sechel
Copy link

sechel commented Mar 1, 2016

+1


customLaunchers: {
FirefoxWithMyExtension: {
base: 'Firefox',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use consistent indentation of two spaces

@dignifiedquire
Copy link
Member

@barakhaim one style issue and after that please squash all commits into one (git rebase -i)

@birtles
Copy link
Collaborator

birtles commented Oct 19, 2022

For what it's worth, I rebased this over on the custom-profile branch but I don't understand if it's still needed. It looks like we now have the profile argument which allows specifying the path to an existing profile. Do we also need to be able to specify a profile by name?

@pmvald
Copy link
Member

pmvald commented Mar 3, 2024

Too old, closing, feel free to reopen is still relevant!

@pmvald pmvald closed this Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants