Set Extensions from API

  • Created

In this article we are going to show you how to set your extensions to be loaded with the profile, this process is conducted upon the creation of your virtual browser profile through the Local API Clients.

To learn more about Extensions about the installation process of your extensions, we highly advise that you read the following article:

Concept

More often the not we find ourselves in the need of additional tools to complete our tasks and to work on our designated projects. Hence why we've made it very easy to install extensions using any .crx file that you wish to be installed. Below you can find the examples for Javascript and Python:

Examples

  • const createProfileRequest = BuilderForCreateProfile
      .forBaseProfile(chromeBaseProfileList[0].id)
      .setRecommendedDefaults()
      .setExtensions(['/path/to/extension1.crx', '/path/to/extension2.crx'])
      .build();
    const profile = await client.createProfile({ body: createProfileRequest });
  • create_profile_request = BuilderForCreateProfile \
      .for_base_profile(base_profiles[0].id) \
      .set_recommended_defaults() \
      .set_extensions(['/path/to/extension1.crx', '/path/to/extension2.crx']) \
      .build()
    profile = client.create_profile(body=create_profile_request)

For your convenience, this functionality is provided by the Python Builder and JavaScript Builder for Profile Creation in the Local API Clients.

Was this article helpful?

0 out of 0 found this helpful