Automation Interview Questions And Answers

Download Automation Interview Questions and Answers PDF

Optimize your Automation interview preparation with our curated set of 108 questions. Each question is crafted to challenge your understanding and proficiency in Automation. Suitable for all skill levels, these questions are essential for effective preparation. Download the free PDF to have all 108 questions at your fingertips. This resource is designed to boost your confidence and ensure you're interview-ready.

108 Automation Questions and Answers:

Automation Job Interview Questions Table of Contents:

Automation Job Interview Questions and Answers
Automation Job Interview Questions and Answers

1 :: What is Selenium?

Selenium is a robust test automation suite designed in a way to support and encourage automation testing of functional aspects of web-based applications and a wide range of browsers and platforms.
Read More

2 :: Tell me does the Selenium have any limitations?

Selenium supports only web based applications testing. So, here are the limitations of it:

☛ Mobile applications cannot be tested using Selenium
☛ Desktop applications cannot be tested using Selenium
☛ Captcha and Bar code readers cannot be tested using Selenium
☛ User should use third-party tools like TestNG or jUnit to write test scripts and generate reports
☛ Programming language knowledge is required to create robust scripts in Selenium WebDriver
Read More

3 :: Tell me what is an Absolute XPath?

Absolute XPath is the direct way to find the element. It has a disadvantage. XPath gets failed if there are any changes made in the path of the element. html/body/div[3]/div/div[1]/div/div/div[1]/div/input - Absolute XPath example.
Read More

4 :: Explain me what the WebDriver supported Mobile Testing Drivers do you know?

Mobile Testing Drivers supported by the WebDriver are:
☛ AndroidDriver,
☛ IphoneDriver,
☛ OperaMobileDriver.
Read More

5 :: Tell us what is the alternate way to click on login button?

submit() method could be used as the alternate way to click on login button, but only if attribute type=submit.
Read More

6 :: Tell me can Selenium handle Windows based pop-up?

Windows pop-ups cannot be handled by using Selenium. Because it supports only web application testing.
Read More

7 :: Tell us how to perform right click using Selenium WebDriver?

The next Actions class is used to perform right click:

Actions act = new Actions(driver); // where driver is WebDriver type
act.moveToElement(webElement).perform();
act.contextClick().perform();
Read More

8 :: Tell us can you write the code to double click an element in Selenium?

Code to double click an element in Selenium:

Actions action = new Actions(driver);
WebElement element=driver.findElement(By.id("elementId"));
action.doubleClick(element).perform();
Read More

9 :: Tell me how you can find broken images in a page using Selenium Web driver?

You have to follow the next steps to find broken images in a page using Selenium Web driver:

☛ get XPath and get the all links on the page using the tag name
☛ click on every link on the page
☛ look for 404/500 in the target page title
Read More

10 :: Tell us how many exceptions do you know in Selenium WebDriver?

There are 5 different exceptions Selenium WebDriver:

☛ NoAlertPresentException,
☛ NoSuchElementException
☛ NoSuchWindowException
☛ TimeoutException
☛ WebDriverException
Read More

11 :: Tell us which package can be imported while working with WebDriver?

org.openqa.selenium java -cp bin;jars/* org.testng.TestNG testng.xml
Read More

12 :: Tell us how you can use recovery scenario with Selenium?

You can use recovery scenario in accordance with the programming language.

If it is Java then you can use exception handling to overcome same.
Read More

13 :: Tell me what is a hub in Selenium Grid?

Selenium Grid hub is a central point or a server that controls the test executions on the different machines.
Read More

14 :: Do you know how to debug the tests in Selenium IDE?

The tests could be debugged in such way:

☛ insert a break point from the location from where you want to execute test step by step
☛ run the test case
☛ test case execution will be paused at the given break point
☛ click on the blue button to continue with the next statement
☛ to continue executing all the commands at a time click on the “Run” button
Read More

15 :: Tell me what is IntelliJ?

IntelliJ is an IDE that helps users to write code for Selenium better and faster. It could be used as an option to Java bean and Eclipse.
Read More

16 :: Tell me what is Automation Testing?

Automation testing is a process in which software tools execute pre-scripted tests on a software application before it is released into production. Special software is used to control the test execution, actual outcomes and predicted outcomes comparison, the test preconditions setting up, and other test control and test reporting functions.
Read More

17 :: Explain what is Selenium IDE?

Selenium IDE is a plug-in used to record and replay tests in Firefox browser. Scripts may be automatically recorded and edited manually providing auto-completion support and the ability to move commands around quickly.
Read More

18 :: Please explain what is a Relative XPath?

Relative XPath means that user can start from the middle of the HTML DOM structure and no need to write long XPath. Example of Relative XPath - //input[@id='email'].
Read More

19 :: Do you know what is the difference between "type" and "typeAndWait" command?

If you need to type keyboard key values into a text field of the web application, "type" command will be used. Another reason for its usage is selecting values of the combo box. "typeAndWait" command is used when your typing is completed and software web page start reloading.
Read More

20 :: Explain me what is the difference between setSpeed() and sleep() methods?

Both of these methods delay the speed of execution. The main difference between them is setSpeed sets a speed while will apply delay time before every Selenium operation takes place. thread.sleep() will set up wait only for once.

For Example:
☛ sleep(5000)- It will wait for 5 seconds. It is executed only once, where the command is written.
☛ setSpeed("5000")- It also will wait for 5 seconds. It runs each command after setSpeed delay by the number of milliseconds mentioned in set Speed.
Read More

21 :: Tell me could cookies be deleted in Selenium?

driver.manage().deleteAllCookies(); //command is used for deleting all cookies
Read More

22 :: Tell us what kind of keyboard operations can be performed in Selenium?

Selenium lets to perform different kinds of keyboard operations, such as:

☛ .pressKey("non-text keys") is used for keys like control, function keys etc that are non-text
☛ .releaseKey("non-text keys") is used in conjunction with key press event to simulate releasing a key from keyboard event
☛ .sendKeys("sequence of characters") is used for passing character sequence to an input or textbox element.
Read More
linkText() and partialLinkText() are used for link location.

The examples:

WebElement link1 = driver.findElement(By.linkText(“some_link_test”));
WebElement link2 = driver.findElement(By.partialLinkText(“some_link_part_text”));
Read More

24 :: Tell us what methods of Robot Class do you know?

Some commonly and popularly used methods of Robot Class during web automation:

keyPress(): method with press down arrow key of Keyboard
Example:

keyPress(KeyEvent.VK_DOWN)
keyRelease(): method with release down arrow key of Keyboard:
Example:

robot.keyRelease(KeyEvent.VK_DOWN)
mouseRelease() method will release the right click of your mouse
Example:

mouseRelease(InputEvent.BUTTON3_DOWN_MASK)
mouseMove() method will move mouse pointer to the specified X and Y coordinates.
Example:

robot.mouseMove(point.getX(), point.getY())
mousePress() method will press the right click of your mouse.
Example :

robot.mousePress(InputEvent.BUTTON3_DOWN_MASK)
Read More

25 :: Tell us how to login into any site if it’s showing any authentication pop-up for username and password?

You should pass the username and password with URL:

https://username:password@url

https://creds:test@www.test.com
Read More