Interview Experience at HCL for Software Automation testing profile
One of our friends appeared for an interview at HCL for Automation testing. We will share the questions asked to him in the interview below along with the solutions for the 2-3 years of experience.
After finding the number of iframe in a webpage, we will use the index method to find 4th iframe -
driver.switchTo().frame(4);
It can also be searched using ID as well.
Hope that helps you! Keep Learning and keep sharing!
Interview Experience at HCL for Automation Testing
- What is a surefire plugin? - The surefire plugin is used in the testing phase to execute the unit tests of an application. It can generate reports in 2 different formats - .txt and .xml files.
- What is the difference between Set and List? - The list is a type of ordered collection that maintains the elements in insertion order while set is an unordered collection where elements are not maintained in any order. The list allows duplicate elements whereas Set doesn't allow any duplicate elements.
- How to read data from an Excel sheet in Selenium? - By using POI library, one can read data from an Excel file using Selenium.
We found the above image in one of the websites and it precisely explains all the interface and classes in the POI library.
- What are the different status codes in an API? - There are 10 different status code in an API shown below along with the description -
- What is the difference between get() and navigate() in Selenium? - navigate() can be used to navigate back or forward in the session's history. navigate() is much faster compared to get(), get() waits for the page to be loaded completely.
- What do you understand by Respin in Agile? - Respin is another term for re-testing, you found a bug, it gets fixed and you retest to confirm whether it is working as expected. This process is called respin.
- How will you enter into the 4th iframe in a webpage? - Let's first find out the number of the iframe in a webpage by using below command -
Int iframeinPage = driver.findElements(By.tagName("iframe")).size();
driver.switchTo().frame(4);
It can also be searched using ID as well.
- How would you switch back to the main window from the iframe window? - We can use the below command to switch back to the main window -
driver.switchTo().parentFrame(); driver.switchTo().defaultContent();
- Different access modifiers in Java- Access modifiers define the visibility of the class. There are four different access modifiers used in Java- Private, Public, Protected and default. If no access modifier is defined for the class, then by it has default access modifier.
- Private - If a variable is declared as Private, then it can only be used by the same class and it cannot be accessed outside that class. Classes and interfaces cannot be declared private.
- Public - Methods/ Variables declared with public access modifier can be accessed by all other classes.
- Protected - Protected variables can be accessed by the classes of the same package and even sub-classes of a different package. Although, the access modifier cannot be used for classes and interfaces.
- What are the different data types in Java? - Java is a statically-typed language Which means all variables must be declared first before running a program. There are 8 different types of primitive data types used in Java - int, boolean, short, long, double, float, char and byte.
Hope that helps you! Keep Learning and keep sharing!
Comments
Post a Comment