What is Selenium? Installations and start for first Project on MacOS

Hello readers, this is my very very first article. I am going to try to explain Selenium in very simple language for you. I hope this article helps you. I will use Selenium Web Driver, Maven, Java programming language, and IntelliJ IDEA for automated test cases and I am going to share with you what are those and how we install those. Let’s start with Selenium.

What is Selenium?

First of all, we start with what is the Selenium? Selenium is an open-source test tool for testing web applications. Selenium supports different browsers and platforms.

Leading supported languages by Selenium Web Driver are Java, C#, Ruby, and Python. Leading supported browsers by Selenium Web Driver are Chrome, Safari, Firefox, and Internet Explorer.

If you want to run your manual test cases more faster and systematically, selenium is just for that.

Installations of Selenium Web Driver

Step 1: JDK(Java Development Kit)

Since we will be using the Java language, first we must install JDK. You can download JDF https://www.oracle.com/java/technologies/javase-downloads.html from this url. Now you can check the java version on your computer. Enter this command “java -version” to your terminal and run, you should see details on your terminal page.

Step 2: Download IntelliJ IDEA

You can download IntelliJ IDEA from this url https://www.jetbrains.com/idea/download. Now you need to install this tool and If you follow instructions, you can install the tool with success. By the way, if you are a student, you can ask for a license with enter your student email and password.

Step 3: Maven

If you did not install maven before, you need to do. You can install Maven with use the command “brew install maven” but if you don’t have brew on your computer, first you must install brew. You can install brew with this url https://brew.sh/. Enter this command to the terminal and run it, you should see the installation. Now check the maven version with “mvn -version” command, run this command at the terminal too.

Start Selenium Project

Open IntelliJ IDEA and select New Project or if you see Create New Project option, you can select it as well.

Now select “Maven” from the left frame, click the “Create from archetype” checkbox, select “org.apache.maven.archetypes:maven-archetype-quickstart” option and click the “Next” button.

If you are using the first time to IntelliJ IDEA, on the next page you see “GroupId” and “ArtifactId” text fields. Enter these fields and click the “Next” button.

On the next page, you enter project “Name” and click the “Next” button and the “Finish” button.

Now you should see the pom.xml file.

Enter library code between these two areas <dependencies></dependencies> for Selenium to pom.xml file and save it. Selenium library code is:

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>

One last step left, find and download the browser. I am going to use Chrome Browser. You can download the browser from this link https://chromedriver.chromium.org/downloads . If you want to see other browsers you can see others too with this url https://www.selenium.dev/downloads/ (End of the page, under browsers tab). download browser and open IntelliJ project and create a new folder that name is Driver and add chrome driver to this folder.

Finally, we installed everything we need to write automation test cases. The next step is writing tests and run. I will select one test case and I will write a test case with use TestNG in my next article.

Thank you for your time. Have a nice day.

Quality Assurance Engineer-Automation