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

alwaysMatch in desiredCapabilities doesn't work #3431

Closed
garg3133 opened this issue Oct 13, 2022 · 4 comments · Fixed by #3907
Closed

alwaysMatch in desiredCapabilities doesn't work #3431

garg3133 opened this issue Oct 13, 2022 · 4 comments · Fixed by #3907
Assignees
Labels

Comments

@garg3133
Copy link
Member

Description of the bug/issue

When we put moz:firefoxOptions inside alwaysMatch, the passed options are not considered by Geckodriver while they are considered when passed without using alwaysMatch.

With alwaysMatch

      desiredCapabilities: {
        browserName: 'firefox',
        alwaysMatch: {
          acceptInsecureCerts: true,
          'moz:firefoxOptions': {
            args: [
              // '-headless',
              // '-verbose'
            ],
            androidPackage: 'org.mozilla.firefox',
            // androidDeviceSerial: 'ZD2222W62Y'
          }
        }
      }

Verbose:
image

Without alwaysMatch

      desiredCapabilities: {
        browserName: 'firefox',
        acceptInsecureCerts: true,
        'moz:firefoxOptions': {
          args: [
            // '-headless',
            // '-verbose'
          ],
          androidPackage: 'org.mozilla.firefox',
          // androidDeviceSerial: 'ZD2222W62Y'
        }
      }

Verbose:
image

Steps to reproduce

Run any test on Firefox with the above config.

Sample test

No response

Command to run

No response

Verbose Output

No response

Nightwatch Configuration

No response

Nightwatch.js Version

2.3.4

Node Version

No response

Browser

No response

Operating System

No response

Additional Information

No response

@AutomatedTester
Copy link
Member

This is part of the work to move to 4.5 that @vaibhavsingh97 is doing

@garg3133
Copy link
Member Author

Bump on this one. It's not yet fixed and users keep on facing this issue where they can't figure out why a config or arg is not working with Firefox.

/cc: @gravityvi @beatfactor

@gravityvi gravityvi added p1 and removed p2 labels Aug 28, 2023
@gravityvi gravityvi changed the title alwaysMatch in desiredCapabilities doesn't work with Firefox alwaysMatch in desiredCapabilities doesn't work Sep 5, 2023
@gravityvi
Copy link
Member

This is the case for every browser not just firefox

@gravityvi gravityvi self-assigned this Sep 5, 2023
@garg3133
Copy link
Member Author

garg3133 commented Sep 5, 2023

Yes, but we use alwaysMatch in our default config file and the one created by the init tool only for Firefox, due to which config files of all our users contain alwaysMatch, which does not work.

So, I think we only need to take care of alwaysMatch for Firefox browser, while also changing our default config file in Nightwatch and the init tool to not include alwaysMatch for firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants