Tag Archives: selenium java

encapsulation in java

Encapsulation in java: Encapsulation = Data Hiding + Abstraction. It means if any component is following Abstraction as well as data hiding then it is also following Encapsulation. Encapsulation: It is actually the process of binding data members and methods together in a unit. Each class in java itself is an example of encapsulation. It… Read More »

selenium-interview-questions-2

Selenium Interview Questions: 1. Question on xpath. Parent child traversing. Lets consider we have 1 parent element and 3 child elements. Write a xpath to identify the 2nd child element using 1st child element? Selenium Testing Selenium WebDriver Selenium Automation Solution: //*[@id=’id1′]/following-sibling::li[1] Explanation: If you give the xpath ‘//*[@id=’id1′]‘ in firepath or chropath, 1st child… Read More »