Selenium Interview Preparation

Selenium Interview Preparation…

Generally Interviews depends upon Company as well as our experience that we mention in our Resume, It may vary from one company to another but if you prepare properly then you can face any type Interview,

Take Selenium Interviews,

If you are a fresher then you mention your Selenium knowledge in your Resume’s Professional Summary,

Suppose If you are an experienced person then you mention your Selenium Skills in Your Resume’s professional Summary, and Job Responsibilities in your Project (one or more projects).

In this post, I am going to cover Selenium Interview Preparation for experienced
people. Selenium Experienced people face this type of Interview Questions that
I am going to explain, Questions may vary form one Interview to another but if
you prepare these Questions then definitely you can face any Selenium Interview.

Types of Questions in Interviews,

Questions in Interviews basically 2 types,
1) General Questions
2) Subject/Experience Related Questions

For Examples, common general questions are,
1) Tell me about yourself?
2) Why you are looking for a change?
3) What is your strength and what is your weakness? etc…

Experienced related questions, suppose you are a Java Professional/developer then,

1) What is ArrayList in Java and when you use it?
2) What is the difference between Static and Non-static methods in Java? etc..

Come to main stream, Selenium experienced professionals usually face this type of Questions…

1) Explain about your Current Project?

Here, explain about your current Project architecture, modules, and functionalities, and your Job Responsibilities etc…, while answering this question you may face some supplementary questions.

2) How you Selected Selenium Tools and Others for Test Automation?

Actually our Test lead selected Selenium Tools, and other supported tools with the contribution of our team members for automation after Test tool (Selenium) selected by the Management.

> Selenium WebDriver to create basic Tests,

> Java Programming to write Test Scripts.

> TestNG testing framework for grouping Test Cases, prioritizing test Cases, executing Test batches, and generating Test Reports.

Note: we selected an automation framework/hybrid framework that designed by senior people our company, created Framework components, then using Framework components designed Test cases/test scripts

3) Write a code for “Add Manufacturer” Functionality in your current project?

It is depends on our project, Interviewer may ask to write one or two Selenium code examples from our project that we explained already to the Interviewer.

Here, Interviewer checks our coding logic, not the exact code, so write the code,

Suppose after instantiating and creating the browser driver, then,
navigate to “Add Manufacturer” page,
driver.get(“url”);

next, click on “Add Manufacturer” link
driver.findElement(By.linkText(“Add Manufacturer”)).click();

next enter Manufacturer name,
driver.findElement(By.id(“Name”)).sendkeys(“Abcd”);

next enter Address1, 2 Steps, after entering all mandatory fields, then submit,
driver.findElement(By.name(“Submit”)).click();

like this you can write selenium Test script on white paper.

4) Write a code to capture and verify the Conformation message in your Application?

For Example, after successful submission of “Manufacturer” details then it will show the confirmation message, we can capture the message and compare…

String Message= driver.findElement(By.id(“conform_message”)).getText();

next compare this message with expected,

if (Message.equals(“Manufacturer Added Successfully”)){
System.out.println(“Passed”);
}
else{
System.out.println(“Failed”);
}

5) write a code to close the Popup Window?

Selenium supports Web elements only, if we want to handle Popup Window (It is not web element) then we need to create Alert Object,

Alert popUp = driver.switchTo().alert(); // Switch the driver focus from the web page to Popup/Alert message

String errorMessage2 = popUp.getText(); // Capture the message on Popup Window and store into a String…

popUp.accept(); //Close Error Popup/click OK Button the Popup

6) write a code to click 3rd link in 2nd frame of your webpage?

Frames are sections of Web pages, if it Manual Testing then we can operate any element from any frame directly, but in Automated Testing using Selenium, first we need to go to 2nd frame from top window then click the 3rd link…

driver.switchTo().frame(1);
driver.findElement(By.linkText(“abcd”).click();

7) How you identify the Synchronization problem in your Test Script?

perform dry run of the Test Script then we can identify the Synchronization Problem (If is there),

Test Run basically 2 types,
i) Dry Run/sample run -check weather the Test script is executing without errors or not?

ii) Real Run – real run purpose is Testing

8) How you conduct Data Driven Testing using Selenium?

Testing the same test case or functionality with multiple sets of test data,

In my project I used excel as Test data file, using Java programming import & read test data, and conducted Data driven testing.

9) How you conduct Cross Browser Testing?

In my project I conducted cross browser testing with Mozilla Firefox, Google Chrome, and Microsoft edge/IE browsers as per my customer requirement, Downloaded Browsers drivers first then instantiate browser drivers, create browser drivers and executing test scripts.

10) How you are handling Exceptions in your current Project?

Usually I handle, Exceptions in Selenium Testing using Java Exception handling mechanism.

Frequently I handle “NoSuchElement” like exception in my Selenium code, and other exceptions also.

11) What are the challenges that you faced in Test Automation using Selenium?

Two major challenges that I faced in my current project,

i) Element Identification

ii) Executing Test scripts using Internet explorer browser, no issues with Google Chrome and Mozilla Firefox browsers.

12) How you raise defects that you find in Automated Testing using Selenium?

In my Project we are using Jira for Test Management/Defect management,

After deducting the defect while Selenium Test execution, launch Jira, enter defect details and send through our company internal mailing system.

13) How you conduct Database Testing?

Selenium Webdriver is limited to Testing our applications using Browser. To use Selenium Webdriver for Database Verification we need to use the JDBC (“Java Database Connectivity”).

JDBC (Java Database Connectivity) is a SQL level API that allows us to execute SQL statements. It is responsible for the connectivity between the Java Programming language and a wide range of databases.

14) Explain about the Page Object Model?

Page Object Model is an object design pattern to create Object Repository for web elements/objects (Ex: Links, Buttons, Edit boxes etc…).
Under this model, container classes for web elements are created that behave as object repositories.

Advantages of Page Object Model:

• Centralized maintenance of elements/objects
• Reusability, reduces duplication of code
• It is Efficient and Scalable
• It makes the framework user friendly.

Selenium Interview Preparation

Also Read & Watch:

1) Selenium Latest Videos and Class Notes

2) Selenium Live Project

3) Selenium Sample Resume

Follow me on social media: