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

browser.updateCapabilities does not merge configs, it overrides the previous one #3625

Closed
swrdfish opened this issue Mar 1, 2023 · 1 comment · Fixed by #3831
Closed

Comments

@swrdfish
Copy link
Member

swrdfish commented Mar 1, 2023

If some one calls browser.updateCapabilities multiple times, then nested objects get overridden instead of getting merged.

// assume desiredCapabilities = {}
browser.updateCapability ({
    browser: 'firefox',
    'bstack:options': {
        platformName: 'windows'
    }
});

// desiredCapabilities = {
//     browser: 'firefox',
//     'bstack:options': {
//         platformName: 'windows'
//     }
// }

browser.updateCapability ({
    'bstack:options': {
        seleniumVersion:  '3.5.2'
    }
});

// desiredCapabilities = {
//     browser: 'firefox',
//     'bstack:options': {
//         seleniumVersion:  "3.5.2"
//     }
// }

Expected output:

// desiredCapabilities = {
//     browser: 'firefox',
//     'bstack:options': {
//         platformName: 'windows'
//         seleniumVersion:  "3.5.2"
//     }
// }
@vinodreddy-bs
Copy link
Contributor

I found the issue. Will be sending a PR soon. Please assign on my name

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

Successfully merging a pull request may close this issue.

3 participants