Automating Chrome Browser

Introduction :


Software Automation Testing has evolved a lot in the past 4 to 5 years.With the evolution of Automation Testing and Software Testing Practices , testers are expected to perform automation testing across various browsers incase of Web Automation Testing.Thus it becomes sometimes too tedious to run same set of test cases across multiple browsers.Chrome is one such example.

Lets start to automate a sample script for Chrome Browser :

You can download the chrome driver from here

Add the below piece of code in your Eclipse/IntelliJ IDEA Editor

Run as a Java Program, you should get the below output :

The error clearly states that user has not added the chrome driver executable path in the System property.
Now change the above piece of code to something like below

Again run as Java program, Chrome browser will open up.The main advantage of running testcases on different browsers is that it helps us in creating a better framework with Selenium Grid where we are expected to run different test cases parallely.

Leave a Reply

Your email address will not be published. Required fields are marked *