Contact Us
If you still have questions or prefer to get help directly from an agent, please submit a request.
Popular topics: Multilogin X, Multilogin 6,
-
Retrieving the token Using the automation token in a workspace Retrieving profile, folder, and workspace IDs Retrieving the user ID Selenium automation example Playwright automation example Puppeteer automation example Logging in to Multilogin automatically Setting up automatic cookie collection Auto-launching the agent Exporting proxy details from profiles Converting external proxy lists into API-ready JSON files Automation FAQHow to fix agent connection issues How to fix startup issues in Multilogin Account banned: what should I do? How to fix profile launch or proxy connection issues How to fix Mimic launch issues on Linux How to enable web camera in Multilogin profiles My app or profile is slow: how to fix performance issues How to unlock a locked profile How to find missing profiles How to fix website loading issues in Multilogin How to access restricted websites How to fix connection issues in restricted regions How to fix Stealthfox issues on Windows How to fix small Stealthfox window resolution on Windows How to fix Multilogin issues on macOS How to disconnect and reconnect the agent How to reinstall app components How to send logs to support How to fix "Failed to get profile data" error How to fix "Access denied" error How to fix “Some settings were reset” error How to fix “Plan limit reached” error How to fix “Wrong proxy data” error How to fix “ERR_CONNECTION_RESET” error
-
Common errors and solutions in Multilogin 6 How to fix profile launch issues in Multilogin 6 How to fix proxy connection issues in Multilogin 6 How to fix frozen "Update in progress... Loading [3] of 2 components" status How to fix Android profile issues in Multilogin 6 How to fix issues with extension data in Mimic How to fix Stealthfox issues on Windows How to fix "JavaScript error" in Multilogin 6 dark mode How to fix "Javax.crypto […] pad block corrupted" error How to fix "Fingerprint composition failed" error How to fix "Mimic/Stealthfox executable is not found" error How to fix "Downloading Mimic browser" error How to fix "Invalid buffer arguments" error How to fix "Cannot invite existing user" error
Selenium browser automation in Multilogin 6
Written by Yana Shcharbina
Updated on December 12th, 2024
Table of contents
Browser automation allows you to automate tasks inside Multilogin 6 browser profiles, from creating simple automation scripts to complex web crawlers that search, collect and interact with web data.
Multilogin 6 browser automation is based on the Selenium WebDriver.
In the usual scenario, if you are running Selenium code, you would first connect to the Firefox (Gecko) or Chrome driver and then set desired capabilities. When using Multilogin with your Selenium code, you do not need to do that.
Instead, you use the Remote Web Driver to connect to the Multilogin 6 application or browser profile via the local port and set desired capabilities to execute Selenium commands in a pre-defined browser profile.
Supported languages
Because the Selenium framework offers a variety of language bindings, Multilogin 6 automation can also be run on multiple coding languages. However, currently, technical support is only provided for Python.
Multilogin port allocation
You need to predefine the application port in order to utilize Selenium automation.
- Go to the C:\Users\%username%\.multiloginapp.com directory and open the app.properties file using any text editor
- Add the following string to the file:
multiloginapp.port=[PORT_NUMBER]
- Save the app.properties file
The port number has to be in the range of 10000 to 49151.
Thereafter, you will be able to refer to the Multilogin 6 application through this port.
For more detailed instructions on how to complete these steps on different operating systems, check this guide.
Python example
from selenium import webdriver
from selenium.webdriver.chromium.options import ChromiumOptions
from selenium.webdriver.firefox.options import Options
import requests
#TODO replace with existing profile ID. Define the ID of the browser profile, where the code will be executed.
mla_profile_id = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
mla_url = 'http://127.0.0.1:35000/api/v1/profile/start?automation=true&profileId='+mla_profile_id
""" Send GET request to start the browser profile by profileId.
Returns response in the following format:'{"status":"OK","value":"http://127.0.0.1:XXXXX"}',
where XXXXX is the localhost port on which browser profile is launched.
Please make sure that you have Multilogin listening port set to 35000.
Otherwise please change the port value in the url string
"""
resp = requests.get(mla_url)
json = resp.json()
print(json)
#Instantiate the Remote Web Driver to connect to the browser profile launched by previous GET request
# In case of using Mimic browser
driver = webdriver.Remote(command_executor=json['value'], options=ChromiumOptions())
# In case of using Stealthfox browser
#driver = webdriver.Remote(command_executor=json['value'], options=Options())
#Perform automation
driver.get('https://multilogin.com/')
print(driver.title)
driver.quit()