The Insight into Selenium Independent of the Programing Language Used

 

 

In the last decade or so of teaching Selenium using various programming languages I have come to a following understanding, and I hope this helps you the one reading to understand selenium irrespective of the programming language used to implement it to automate the browser.

 

Selenium is a code library which automates the browser, what you do with that power is upto you.

 

The library is called different names with respect to the programming language you are using – jar for java, gem for ruby, module for python and a nuget package when used in C# world.

 

For each of the programming language to implement Selenium we may or may not use the unit test framework provided by that programming language. Example Junit and TestNg are for Java, NUnit is for C#, PyUnit is for Python etc

 

The design you implement to use Selenium, is more to do with how you wish to DESIGN the test rather than Selenium itself. So the concepts of Page Objects or screenplay pattern etc are the design patterns used to write code.

 

Selenium is just a library you use under the automation of test process and its part of a much bigger ecosystem- which is generally defined using the term as a framework.

 

To understand Selenium browser automation – we need to understand the three basic pillars of the selenium webdriver –

Webdriver – Which represents the browser and the methods we can use to work with the browser

 

Webelement – Which represents the html element on the page and methods we can use to interact with the html elements on the page

 

By – the entity [example a class in java] which helps us create locator information to locate the elements in the webpage. There are different methods using which Selenium identifies the element and all that information is actually taken from the HTML document or the HTML content of the webelement of interest.

 

The best place to learn Selenium is the Selenium website itself - https://www.selenium.dev/documentation/en/webdriver/

 

Hope this helps!