Can I learn Selenium without knowing Java?

This Question comes to many professionals who are not actually into core technical and want to pursue their career in Selenium Automation. The term coding makes the non-programmers a bit scare to even start off with something like automation. There is a perception that a non-programmer cannot excel in Automation, but it is only in head. Many deserving and capable manual testers shy away from Selenium just thinking that it require some special skills.

There are various many languages in which Selenium Scripts are designed such as Python, Ruby, C#, JavaScript and Java is one such of them. Knowing the popularity and future prospects of Java, the inclination is now more towards it. Although Python is also a buzz these days.

We won't deny that learning Selenium requires the basic concepts of Java. Let's see at what extent one needs to know about Java Programming.

Things to be kept in mind before starting to learn Basic Java −

  • Mindset to learn it without any baggage of not being a coder.
  • Basic Logic Building
  • Implementing the concept of logic

Below are the basics of Java, one must adhere to while going forward to learn Selenium −

  • Structure of Java Programming − A Java program consists of various sections such as Package section where all the packages imported are mentioned. Packages are collection of classes, interfaces and sub-packages. In java by default java lang. package is imported by every program. Rest packages we need to import depending on the requirement. Then there is a class section where the objects are defined and methods are called. Then comes the main method section which is the starting point of program. Methods contain data type declaration and executable statements.

  • UnderstandingObject and Classes (OOP- Object oriented approach) − OOPS concept is the backbone of Java. It consists of real-world entities like abstraction, inheritance, encapsulation, polymorphism which are the ways to re-use the functionality wherever required with security maintained. This way the data and functions are bound together so that no other part of code can access it other than that function.

  • Class − Class is a template which is used to create objects and define object data types and method. Object is an instance of class which has specific state and behavior.

  • Variables − They stores the value which is required by program to do its job. So they are basically memory locations. It has many data types and that must be declared before use. The value of the variables can be changed anytime in the program.

  • Method − These are just like the functions created to perform a specific task. It runs only when it is called.

  • Inheritance − It is a part of OOPS which one class is allowed to inherit the features of another class.

  • Abstraction − Hiding the unwanted details from the outside world and giving only the essential details are a part of abstraction.

  • Encapsulation −Encapsulation means wrapping the code and data together into a single unit to protect inner working of an object from outside world. Example could be a calculator.

  • Interface −Unlike classes, which are inherited by other classes, Interface are implemented or extended by other classes. It is used to implement multiple inheritance in a program. All methods in an interface are implicitly public and abstract. It is used to achieve total abstraction.

  • Array − It is a group of similar variables which have contiguous memory location. Control Statement-they enable decision making, branching and looping such as if-then-else, while loop, for loop.

  • Collection − Wherever the data is dynamic, collections are used. It allows to add and element, delete an element.

  • Polymorphism(Overloading/Overriding) − By Polymorphism, we can say that a particular action can be performed by multiple ways depending on their data types and class. There are two types of polymorphism-compile-time polymorphism and runtime polymorphism. For implementing inheritance, polymorphism is required. It helps programmers to reuse the code, classes, and methods written once, tested and implemented.

  • FileHandling − It allows us to create, read, update, and delete the files, which are stored on the local file system. Java l/o (Input and Output) is used to process the input and produce the output.

  • ExceptionHandling − To handle the runtime errors so that normal flow of the application can be maintained, exception handling plays a critical role. Various exceptions such as FileNotFound Exception, IOEXception are handles using it. By handling these exceptions, we can provide a proper error message instead of a system generated error which is difficult to understand.

  • Basic of Threads − A thread is an independent path of execution within a program. When multiple threads run in a program concurrently, multiple tasks are performed at a time. They provide maximum utilization of CPU.