Selenium and Vera: AI conversion in, Python out
Selenium is the one framework Vera does not convert deterministically from every language. Java and Python files have no parser in Vera, so the whole file goes through opt-in AI conversion and every step it writes is flagged for review. JavaScript selenium-webdriver is different: the WebdriverIO converter reads it with no AI. Export goes to Selenium for Python, as a pytest module.
What comes across
- JavaScript selenium-webdriver specs convert deterministically through the WebdriverIO converter: driver.get(), findElement(By…) with click, sendKeys and clear.
- Java and Python Selenium files are recognised by their extension, or by their Selenium imports when the file has none.
- With AI conversion ticked, the model converts the whole Java or Python file, and the import warns you to review every generated step before running it.
- On export, a test downloads as a pytest module (…_test.py) driving Selenium WebDriver.
- On export, Vera's text= selectors become an XPath approximation and data-testid becomes a CSS attribute selector — the same WebDriver translation the runner uses.
- On export, waits become WebDriverWait calls with expected conditions.
- On export, {{variable}} tokens become os.environ reads.
What does not
- Without AI conversion, nothing is imported from Java or Python Selenium files — there is no deterministic converter for them.
- AI conversion spends AI credits and needs a working AI setup. A workspace with no key of its own and no onboarding grant left is refused rather than given a partial import.
- A file is cut to 24,000 characters before AI conversion, so split large files first.
- There is no Java export. Vera exports to four targets only: Playwright, WebdriverIO, Selenium (Python) and TestCafe.
- On export, an accessibility-audit step becomes a TODO: install axe-selenium-python and wire it up yourself.
How to set it up
- Open a project's Tests page and choose Import tests, then pick your .java or .py files. The format is detected from each file.
- Tick the AI conversion box. For Java and Python Selenium it is required — without it the dialog tells you nothing will be imported.
- Review every step marked AI-converted before running. If the workspace requires review of AI-written tests, those tests land as drafts until someone approves them.
- To take a test back out, open its Export as code menu on the Tests page and choose Selenium (Python).
Questions
Can Vera import Java Selenium tests?
Only through AI conversion. Vera has no Java or Python parser, so the whole file is converted by the model when you opt in, and every step it writes is flagged for review.
Is JavaScript Selenium converted with AI too?
No. JavaScript selenium-webdriver goes through the deterministic WebdriverIO converter, with no AI call and no credits spent.
Which Selenium language does Vera export to?
Python. A test exports as a pytest module using Selenium WebDriver. There is no Java export.