Selenium/Java-OOPs-Abstraction
In last post, we learnt about different types of constructors Selenium/Java- CoC in Java which are important and very useful while writing Selenium automation scripts. Now we will move towards Java OOPs concepts and in this post we will deal with Abstraction. Abstraction: It is a process of hiding implementation details and showing only functionality to the user. It hides internal details. An abstract class is declared with Abstract keyword. We need to declare class as abstract to use abstract methods. We can not create objects of the Abstract class. Abstract class can have both abstract as well as concrete(normal) methods. It is most useful when two sub-classes are doing same thing in different ways. When we define sub-classes, we use extends keyword to show that it is a child class of parent class. Super keyword is also used in abstraction when we need to use immediate parent class instance variable, method or constructor. Example: // de...
Nice job buddy. I would like to hear more from you on such intrestiint topic
ReplyDeleteyes sure. you can learn with new posts every week. !!
Deletehello i have visited your blog first time.content was good enough but u have to put more real time scenario in actual where we have used oops concept in selenium
ReplyDelete..anyways nice job keep it up:)
Hi There, Thanks a lot. You will see more real time examples once we will start writing more complex scripts in Selenium. Here I am starting from beginners' level so flow can be maintained. Happy learning :)
DeleteGlad to connect !
ReplyDeleteThank you and same here ! Keep learning :)
Delete