Please update to the latest patch version to use it.
POST /api/v2/browser-profile/start
Description: To open a browser, you need to specify the profile ID. After a successful launch, you can obtain the browser's debug interface for executing Selenium and Puppeteer automation. Selenium requires the use of a Webdriver that matches the corresponding browser's core version. Ensure that your application is updated to version 3.4.1 or higher. After launching the browser, you can retrieve the path to the corresponding Webdriver from the return value.
Optional Body parameters can be omitted, and the parameter format is JSON.
Name | Type | Necessary | Default | Example | Description |
---|---|---|---|---|---|
profile_id | text | YES | - | h1yynkm | Unique profile ID, generated after creating profile |
profile_no | text | NO | - | 123 | Priority will be given to profile id when profile id is filled. |
launch_args | list | NO | - | ["--window-position=400,0","--blink-settings=imagesEnabled=false", "--disable-notifications"] | Browser startup parameters. If launch_args are set both for API and the profile, priority will be given to the ones in API settings. |
headless | text | NO | 0 | 0 | Whether to open in headless mode, 1: Yes; 0: No(default). |
last_opened_tabs | text | NO | 1 | 1 | Whether to continue browsing the last opened page: 1: Yes(default), 0: No |
proxy_detection | text | NO | 1 | 1 | Whether to open the proxy detection page, 1: Yes(default);0: No. |
password_filling | text | NO | 0 | 0 | Whether to activate the password filling function. 1: Yes; 0: No(default). Effective only when the profile is opened for the first time. |
password_saving | text | NO | 0 | 0 | Whether to save the password. 1: Yes; 0: No(default) . Only effective on Chrome kernel. |
cdp_mask | text | NO | 1 | 1 | Whether to mask the cdp detection. 1: Yes (default), 0: No. iOS and Android OS profiles are forced to enable this feature. |
delete_cache | text | NO | 0 | 0 | Whether to clear the cache after closing the profile. 1: Yes; 0:NO (Default). It is recommended to set this parameter to 1 if there is insufficient disk space. |
device_scale | text | NO | - | 1 | Set the zoom ratio of mobile OS profile. Range 0.1 to 2, 1 is 100%. Only valid for mobile OS and 128 kernel and plus. |
//Operation succeeded
{
"code":0,
"data":{
"ws":{
"selenium":"127.0.0.1:xxxx", //Browser debug interface, used for selenium automation
"puppeteer":"ws://127.0.0.1:xxxx/devtools/browser/xxxxxx" //Browser debug interface, used for puppeteer automation
},
"debug_port": "xxxx", //debug port
"webdriver": "C:\\xxxx\\chromedriver.exe" //webdriver path
},
"msg":"success"
}
//Operation failed
{
"code":-1,
"data":{},
"msg":"failed"
}