Skip to main content
Glama

Selenium MCP Server

utils.py610 B
from selenium.webdriver.common.by import By from state import state def get_driver(): if state.current_session and state.current_session in state.drivers: return state.drivers[state.current_session] raise Exception("No active browser session") def get_locator(by: str, value: str): mapping = { "id": By.ID, "name": By.NAME, "xpath": By.XPATH, "css": By.CSS_SELECTOR, "class": By.CLASS_NAME, "tag": By.TAG_NAME, "link_text": By.LINK_TEXT, "partial_link_text": By.PARTIAL_LINK_TEXT } return mapping[by.lower()], value

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jyothishkumarav/selenium-mcp-server-python'

If you have feedback or need assistance with the MCP directory API, please join our Discord server