Pass command-line arguments to browser

  • Created

We recommend that you read the Getting started with Kameleo Automation article before reading this one.

With Kameleo, you can fine-tune the browsers by passing command-line arguments. The arguments are passed either by using the startProfileWithOptions function or with a POST request to the /profiles/{guid}/start endpoint. See the documentation on SwaggerHub for details.

Please note that some of the command line arguments are blacklisted as they may interfere with Kameleo. Blacklisted flags for Chroma:

  • --incognito
  • --remote-debugging-port
  • --user-data-dir
  • --proxy-server
  • --disable-3d-apis

Below you can find the list for blacklisted arguments for JungleFox:

  • --private
  • --private-window
  • --profile
  • --marionette

For example, you can mute the Chromium-based browsers by setting the --mute-audio command line flag during the profile launch with the following code snippet:

  • await client.startProfileWithOptions(profile.id, {
      body: {
        arguments: [
          'mute-audio',
        ],
      },
    });

    See the full example here.

  • await client.StartProfileWithOptionssAsync(profile.Id, new WebDriverSettings
    {
      Arguments = new List<string> { "mute-audio" },
    });

    See the full example here.

  • client.start_profile_with_options(profile.id, WebDriverSettings(
      arguments=["mute-audio"],
    ))

    See the full example here.

Was this article helpful?

0 out of 0 found this helpful