We recommend that you read the Getting started with Kameleo Automation article before reading this one.
By default, when you create a mobile profile, you should use your mobile device to connect to the external spoofing engine. Automate browsing on the mobile device's browser is not supported yet, but you can set up Kameleo to start the mobile profile on your desktop. The profile will be launched (emulated) in our custom-built Chromium. You can launch these profiles from your code with the Local API and automate browsing with popular automation frameworks.
-
First you need to filter for a Mobile Fingerprint
-
const fingerprints = await client.fingerprint.searchFingerprints("mobile", "ios", "safari");
-
var fingerprints = await client.Fingerprint.SearchFingerprintsAsync("mobile", "ios", "safari");
-
fingerprints = client.fingerprint.search_fingerprints( device_type='mobile', os_family='ios', browser_product='safari' )
-
-
You need to set up our custom built chromium as a launcher, so the mobile profile will start on your desktop.
-
@type {import('@kameleo/local-api-client').CreateProfileRequest} */ const createProfileRequest = { fingerprintId: fingerprints[0].id, name: "automate mobile profiles on desktop example", }; const profile = await client.profile.createProfile(createProfileRequest);/code
-
var createProfileRequest = new CreateProfileRequest(fingerprints[0].Id) { Name = "automate mobile profiles on desktop example", }; var profile = await client.Profile.CreateProfileAsync(createProfileRequest);
-
create_profile_request = CreateProfileRequest( fingerprint_id=fingerprints[0].id, name='automate mobile profiles on desktop example') profile = client.profile.create_profile(create_profile_request)
-
-
It is recommended to pass the following additionalOption when you start the profile. This allows you to click on elements using the cursor when emulating a touch screen in the browser. If you leave this out, your script may time out after clicks and fail.
-
await client.profile.startProfile(profile.id, { additionalOptions: [ { key: "disableTouchEmulation", value: true, }, ], });
-
await client.Profile.StartProfileAsync(profile.Id, new BrowserSettings() { AdditionalOptions = new List { // This allows you to click on elements using the cursor when emulating a touch screen in the browser. // If you leave this out, your script may time out after clicks and fail. new Preference("disableTouchEmulation", true), } });
-
client.profile.start_profile(profile.id, { # This allows you to click on elements using the cursor when emulating a touch screen in the browser. # If you leave this out, your script may time out after clicks and fail. 'additionalOptions': [ { 'key': 'disableTouchEmulation', 'value': True, }, ], })
-
If you want to see the full example code, click any of the links below: