Selenium + Python · Lesson 40 of 43
Module 40: Selenium Grid
Your task
Implement format_grid_endpoint(host, port=4444):
Write it in the editor, then press Check answer (Ctrl + Enter).
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")Running thousands of tests requires distributing execution across remote machines. In this lesson, you will master Selenium Grid 4 architecture and Remote WebDriver in Python. Let's scale with Selenium Grid!
Part of the Selenium + Python course (Selenium with Python). Practice this concept live in the Selenium Online Compiler or explore our free automation practice form.
The Hub receives requests from tests, examines capabilities (browser type, OS), and routes commands to an available Node matching those requirements.
Ready? Solve the task in the editor
Use Check answer to mark it complete. Hints are there if you need them.
___