40. Distributed Automation with Selenium Grid 4 & Remote WebDriver

Remote WebDriver in Python

from selenium import webdriver

grid_url = "http://grid-hub.targetqa.internal:4444/wd/hub"
options = webdriver.ChromeOptions()

driver = webdriver.Remote(
command_executor=grid_url,
options=options
)
driver.get("https://targetqa.com")

Task

  • Implement format_grid_endpoint(host, port=4444):
  • 1. Return f"http://{host}:{port}/wd/hub".
πŸ’‘Common doubts
Did you like the problem?
Lesson 40 of 43
Python
Loading code editor…
Next