About this tool
About this Selenium Java compiler
This free online Selenium Java compiler runs your script in a real Google Chrome browser on our servers. Write a Java class, click Run, and the console shows its output as it runs. You do not need to install a JDK, Maven, ChromeDriver or Chrome.
- Java 21OpenJDK
- Selenium 4.45.0with ChromeDriver
- Google Chromeheadless, on our servers
- Freeno sign-up to run
How to run Selenium Java online
- Write your test inside
public class Mainwith amainmethod. The starter code is a working example. - Create the browser with
new ChromeDriver(). It starts headless Chrome for you. - Click Run. The code compiles with Java 21 and runs in its own container.
- Read the output and errors in the console. Sign in to save a script or share a link.
Practise what you run
Five courses, every lesson checked by real tests
- API Testing32 assignments with real API requests and instant feedback.
- Selenium Java70 assignments with live execution and instant feedback.
- Selenium Python80 assignments with live execution and instant feedback.
- Playwright JS70 assignments covering selectors, assertions, and frames.
- REST Assured62 API testing assignments against live endpoints.
What's installed
- Java 21 (OpenJDK)
- Selenium 4.45.0 with Google Chrome and a matching ChromeDriver
- REST Assured 6.0.0 with Jackson and Gson, so API tests run too
- Internet access, so your script can open any public website
Limits
- The class must be named
Main, because the code is saved asMain.java. - Chrome runs headless. You see console output, not a browser window.
- Each run gets 1 CPU and 2 GB of memory. Code can be up to 100,000 characters.
- You can run up to 20 scripts a minute.
Frequently asked questions
Is the Selenium Java compiler free?
Yes. Running code is free and needs no account. Saving and sharing scripts needs a free sign-in.
Does it use a real browser?
Yes. Your code drives Google Chrome through ChromeDriver, the same WebDriver setup you would use locally. Chrome runs headless on the server.
Why does my code fail with "class X is public, should be declared in a file named X.java"?
Your code is saved as Main.java, so the public class must be named Main.
New to Selenium?Learn Selenium Java from scratch70 lessons, the first 10 free