Selenium language bindings allow you to write tests and communicate with browsers in multiple languages:
In order to start writing tests, you first need to install the bindings for your preferred programming language.
Java (With Maven)
In your test project, add the following to your
pom.xml. Once done, you can either let your IDE (Integrated Development Environment) use Maven to import the dependencies or open a command-prompt,
cd, into the project directory, and run
mvn clean test-compile.
You will need the Java Development Kit (version 8+ for 3.x and 4.x versions of Selenium) and Maven installed on your machine. For more details on Selenium Java bindings, see the API documentation.
Use the command below to install the Python bindings for Selenium:
You will need to install Python, pip, and setuptools in order for this to work properly. For more information on the Selenium Python bindings, check out the API documentation.
Use the following command to install the Selenium Ruby bindings:
You will need to install a current version of Ruby which comes with RubyGems. You can find instructions for that on the Ruby project website. For more information on the Selenium Ruby bindings, check out the API documentation.
C# (With NuGet)
Use the following commands from the Package Manager Console window in Visual Studio to install the Selenium C# bindings.
You will need to install Microsoft Visual Studio and NuGet to install these libraries and build your project. For more information on the Selenium C# bindings, check out the API documentation.
The remaining examples will show Java demonstrations.
This is a preview of the Getting Started With Selenium Refcard. To read the entire Refcard, please download the PDF from the link above.