Skip to main content

Take your existing framework and make it smarter

1) Get your API key

Sign-Up/Login to the dashboard, and get your API key from the top right side.

Note

You can click the copy icon to quickly copy it to your clipboard

Example API key

2) Install SmartDriver

pip install devtools-ai
pip install selenium
pip install webdriver_manager # Optional: Used to auto-install ChromeDriver

3) Run your first test case with Dev Tools

Below is a sample test case using DevTools. Note you only need 2 lines to make Dev Tools work

from time import sleep

from selenium.webdriver import Chrome
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

from devtools_ai.selenium import SmartDriver # Import Dev Tools

def _main() -> None:
"""Main driver"""
chrome_driver = Chrome(service=Service(ChromeDriverManager().install()))

# Convert chrome_driver to smartDriver
driver = SmartDriver(chrome_driver, "??API_KEY??")

# Navigate to Google.com
driver.get("https://google.com")
sleep(1)

# Find the searchbox and send "hello world"
searchbox_element = driver.find_element(By.NAME, 'q')
searchbox_element.send_keys("hello world\n")

sleep(2)

driver.quit()


if __name__ == "__main__":
_main()

4) Run your test as normal

The first time you run the test, smartdriver will watch and learn from your test.

When selectors fail in the future, smartdriver will look at the page and identify the element visually.