MLX · Selenium
Selenium Automation Example
WebDriver pattern for teams standardizing on Selenium against Multilogin profiles.
Prerequisites
- Multilogin agent + API token
- Selenium 4.x and a matching Chrome/Chromium WebDriver strategy
- Profile start that exposes a debugger address / port for attach
Flow
- Start the Multilogin profile with automation enabled via API.
- Read
driver/ debugger connection details from the response. - Configure Chrome options to attach (debugger address).
- Execute WebDriver commands.
- Quit driver and stop the profile.
Example (Python, illustrative)
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
debugger_address = "127.0.0.1:XXXXX" # from MLX start response
opts = Options()
opts.add_experimental_option("debuggerAddress", debugger_address)
driver = webdriver.Chrome(options=opts)
try:
driver.get("https://example.com")
print(driver.title)
finally:
driver.quit()
# stop profile via MLX API
Tips
- Prefer explicit waits over hard sleeps.
- Isolate one profile per WebDriver session.
- Log profile_id + trace_id on every failure.
- For scraping-focused walkthroughs, continue with Selenium 101.
Partner Multilogin pricing: 50MAM / MAMOFF.