Skip to content

[🐛 Bug]: <title>devtoolsOptions does not work as expected #10866

@mighty98

Description

@mighty98

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

latest

Mode

Standalone Mode

Which capabilities are you using?

{
        browserName: 'chrome',
        acceptInsecureCerts: true,
        'wdio:devtoolsOptions': {
          ignoreDefaultArgs: true,
          defaultViewport: null,
        },
        'goog:chromeOptions': {
          args: ['--disable-gpu', '--disable-prompt-on-repos', '--start-maximized'],
          prefs: {
            directory_upgrade: true,
            prompt_for_download: false,
          },
        },
      }

What happened?

As per the capabilities defined above for launching chrome via devtools it should not set default view port and should start browser maximized but it still set the window size

devtools: Launch Google Chrome (undefined) with flags: --window-position=0,0 --window-size=1200,900 --disable-gpu --disable-prompt-on-repos --start-maximized --ignore-certificate-errors

What is your expected behavior?

Window size parameters should not have set

How to reproduce the bug.

Launch chrome using devtools protocol with below setting

await remote({
      automationProtocol: 'devtools',
      capabilities: {
        browserName: 'chrome',
        acceptInsecureCerts: true,
        'wdio:devtoolsOptions': {
          ignoreDefaultArgs: true,
          defaultViewport: null,
        },
        'goog:chromeOptions': {
          args: ['--disable-gpu', '--disable-prompt-on-repos', '--start-maximized'],
          prefs: {
            directory_upgrade: true,
            prompt_for_download: false,
          },
        },
      },
    })```

### Relevant log output

```typescript
2023-08-07T10:25:06.613Z INFO webdriverio: Starting session using Chrome DevTools as automation protocol and Puppeteer as driver
2023-08-07T10:25:06.621Z INFO devtools:puppeteer: Initiate new session using the DevTools protocol
2023-08-07T10:25:06.630Z INFO devtools: Launch Google Chrome (undefined) with flags: --window-position=0,0 --window-size=1200,900 --disable-gpu --disable-prompt-on-repos --start-maximized --ignore-certificate-errors

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🐛good first picka reasonable task to start getting familiar with the code basehelp wantedIssues that are free to take by anyone interested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions