Selenium Interview Questions: Super 200 unique Questions

While interacting with people I came across few people who asked me about the Selenium interview questions which are expected to come in the recruitment process of the new Selenium Professionals. Since it is a well demanding topic, so I thought to write a well-described blog post which should not miss any corner of the Selenium interview questions.

The Selenium interview questions written here are totally based on the memory of my past interviews which I have attended either to get project inside the organization or to switch to the other companies. I have interviewed some resources too, so few questions written here are based on my experience as an interviewer and few questions collected from the fellow automation testers. Hence, this list of Selenium interview questions is the collections from different people.

Before I discuss the Selenium interview questions, I would like to guide you through the blueprints. Therefore, I basically categorized the entire questions based on their strength like Low, Medium, and High.  It will be convenient for you to revise them quickly during the interviews. Even many interviewers can take a reference to these Selenium interview questions to ask the candidates.

How to crack Vskills Professional Selenium Certifications?

Selenium Interview Questions

Low level Selenium Interview Questions

Question# 1: What is Selenium?

Answer: Selenium is an automation testing tool which is mainly used for the testing of Web-based applications.

Questions# 2: What are the components of Selenium?

Answer: Selenium has mainly four components, which are listed below:

  1. Selenium RC
  2. Selenium WebDriver
  3. Selenium Grid
  4. Selenium IDE

Questions# 3: Who developed Selenium?

Answer: Selenium was developed by Jason Huggins in the year 2004.

Questions# 4: What are the advantages and disadvantages of Selenium tool?

Answer: Advantages of Selenium are listed below:

  • Selenium is an open-source application
  • A user does not require the license to use it
  • We use different languages for Selenium like Java, Python, Ruby, C#, etc
  • Multi-browser testing can be easily implemented through Selenium
  • Selenium has a wide community to give and ask for the support
  • Selenium IDE offers Record and Play features
  • Distributed testing is done on different platform and OS through Selenium Grid

Some of the Disadvantages of Selenium are listed as below:

  • Desktop applications can’t be automated through Selenium
  • We require programming knowledge to create test scripts
  • External dependencies are required for logging, reporting, reading test data from external sources, etc

Questions# 5: What are the drivers available in Selenium for different browsers?

Answer: Available drivers are-

  • ChromeDriver
  • FirefoxDriver
  • InternetExplorerDriver
  • SafariDriver
  • Phantomjs
  • HTMLUnitDriver
  • Selendroid
  • Appium
  • iOSDriver

Questions# 6: What is required to run the Selenium Grid?

Answer: Selenium Standalone Server required to configure hub and node for Selenium Grid.

Questions# 7: Can we do functional and regression testing using Selenium?

Answer: Yes.

Question# 8: What is WebElement?

Answer: Objects on the Web page is called Web element where operations are performed.

Question# 9: How WebDriver identify WebElements?

Answer: Selenium WebDriver uses locators to identify web elements on the web page.

Question# 10: What are different types of locators?

Answer: There are nine types of locators available to identify web elements:

  1. Id
  2. Name
  3. CSSSelector
  4. XPath
  5. Tag name
  6. Link Text
  7. Partial link text
  8. Class Name
  9. JavaScript DOM

Know more about locators…

Question# 11: What is the XPath?

Answer: XPath stands for XML path. It is a query language to identify the nodes in the DOM.

Questions# 12: How many types of XPath available?

Answer: There are mainly two types of XPath available:

  1. Absolute XPath
  2. Relative XPath

Question# 13: What is Absolute XPath?

Answer: It is one of the ways to locate web element. It starts from the HTML tag till the element found. It is represented by single slash “/”.

Example: html/body/table/tbody/tr/th/a

The main disadvantage is, slight changes in location of the element will lead to failure.

Question# 14: What is Relative XPath?

Answer: Relative XPath is also a technique to load web elements. It is represented by the double slash “//”.

Example: //input[@id=’cool’]//div//input

It is used to handle dynamic objects.

Here are some of the awesome tutorials on XPath.

Question# 15: What are the tools available to identify web elements?

Answer: We use Firebug and Firepath in older Mozilla Firefox to inspect the web elements. Whereas, in Google Chrome we use either inbuilt browser inspector or Chrome plugin to inspect the elements.

Question# 16: Can we locate any web element by taking its partial attributes?

Answer: Yes. We can inspect any elements by its partial attributes using contains the method of XPath.

Example: //*[contains(@id,’house number’)]

Questions# 17: Can we move to the nth child of the web element?

Answer: Yes. We can do it with two techniques. Let’s have a look.

  • By assigning index: //*[@id=’lol’]//div[3]
  • By using position() method: //*[@id=’lol’]//div[position()=3]

Question# 18: How to identify element using its id in dynamic CSSSelector property?

Answer:  We use (#id) to identify the element using its id in CSSSelector property.

Question# 19: How to identify an element using its class name in dynamic CSSSelector property?

Answer:  We use (.className) to identify element using its id in CSSSelector property.

Question# 20: Can we move to nth-child using CSSSelector?

Answer: Yes. We use (:nth-child(n)) to move to the nth child.

Example: #lol>div:nth-child(3)

A complete guide to writing dynamic CSSSelector

Question# 21: What are the major differences between XPath and CSSSelector?

Answer: XPath traverses upward in the DOM, whereas, CSSSelector traverses downward in the DOM.

Selenium Interview Questions inviul

Medium level Selenium Interview Questions

Question# 22: What is the protocol name through which Selenium transfers data to the native browser?

Answer: JSON wire protocol.

Question# 23: What to do to open any browser?

Answer: We create the instance of the browser, like-

WebDriver driver = new ChromeDriver();

Question# 24: How to open/navigate to the URL?

Answer: We use driver.get(String URL) or driver.navigate().to(String URL) to open/navigate to the URL.

Question# 25: Which method is used to send texts to the textbox?

Answer: We use senKeys(“String text”) method to send texts to the textbox.

Questions# 26: Can we clear pre-defined texts from the textbox?

Answer: Yes. We can clear the text by using clear() method.

Example:

driver.findElement(By.id(“some id”)).clear();

Question# 27: How to click on any web element?

Answer: We use click() method to click on any web elements.

Example:

driver.findElement(By.id(“some id”)).click ();

Question# 28: How to click on the submit button?

Answer: We use click() and submit() method to click on submit button.

Example:

driver.findElement(By.id(“some id”)). submit();

Question# 29: How to Select any checkbox?

Answer: We use click() method to select any checkbox.

Question# 30: How to Select any radio button?

Answer: We use click() method to select any radio button.

Question# 31: What is the significance of driver.close()?

Answer: driver.close() command is used to close the current browser.

Question# 32: What is the significance of driver.quit()?

Answer: driver.quit() command is used to close all browsers opened by the current session of the WebDriver.

Question# 33: How to get the title of the Web page?

Answer: We use driver.getTitle() to get the title of the web page.

Question# 34: How to maximize the browser in Selenium?

Answer: driver.manage().window().maximize() used to maximize the browser.

Question# 35: What is WebDriver?

Answer: WebDriver is an interface.

Question# 36: What is the Selenium command to get the current URL?

Answer: We use driver.getCurrentUrl() command to get the current URL.

Question# 37: what is the difference between findElement and findElements?

Answer: finElement command used to identify single elements, where, the findElements command used to identify two or more than two elements, it stores them in a list.

Question# 38: How to switch to another window?

Answer: We first store id of the window by using command, driver.getWindowHandle() or driver.getWindowHandles(). These two command gives unique id(s) of the window then we finally use driver.switchTo().window(driver.getWindowHandle()) command to switch to the particular window.

Question# 39: What is the difference between getWindowHandle() and getWindowHandles()?

Answer: getWindowHandle returns String formatted id of the current page, whereas, getWindowHandles returns the same for all the other windows.

How to handle multiple windows in Selenium?

Question# 40: What is the command to switch to a frame?

Answer: 

driver.switchTo().frame();

How to handle frame in Selenium?

Question# 41: How to navigate back and forward in the browser using Selenium commands?

Answer: For forward, driver.navigate().forward();

For back, driver.navigate().back();

Question# 42: How to refresh the web page in Selnium?

Answer: We use following commands to refresh the web page:

  • navigate().refresh();
  • get(driver.getCurrentUrl);
  • navigate.to(driver.getCurrentUrl);

Question# 43: How to get text written over any web element?

Answer: We use getText() method to fetch the text for a particular web element.

Example:

String text = driver.findElement(By.id(“some id”)).getText();

How to getText using JavaScriptExecutor?

Question# 44: Can we get the value of the attribute in Selenium?

Answer: Yes. We get the value of the attributes by using getAttribute() method.

Example:

String text = driver.findElement(By.id(“some id”)). getAttribute(“data_value”);

Question# 45: How to get all the cookies from the browser?

Answer: 

driver.manage().getCookies();

Question# 46: Can we add and delete cookies using Selenium?

Answer: Yes. We can add and delete cookies.

We use driver.manage().addCookie(“Cookie value”) to add the cookies. We use following commands to delete cookies:

  • manage().deleteCookie(“Cookie value”) for specific cookie deletion
  • manage().deleteAllCookies() to delete all the cookies

Question# 47: What is Thread.sleep()?

Answer: Thread.sleep() is a java command to pause the execution for a specified time.

Question# 48: What is an Implicit wait?

Answer: It waits for a specified time while locating the next element before it throws the NoSuchElementPresent exception.

driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);

How to implement Implicit wait in Selenium WebDriver?

Question# 49: What is the difference between Thread.sleep() and Implicit wait?

Answer:  Thread.sleep() pauses the execution hence no logical execution goes behind it, whereas, Implicit wait waits for the element for a time, so it performs logical wait. If the element doesn’t appear then it throws an exception.

Question# 50: What is an Explicit wait?

Answer: It is another type of wait which is used to perform the synchronization operation. It waits for an element to appear for a specified time until certain conditions are met.

WebDriverWait wait = new WebDriverWait(driver, 10);

wait.until(ExpectedConditions.visibilityOfElementLocated(By locator);

How to implement Explicit wait in Selenium WebDriver?

Questions# 51: What is the Fluent wait?

Answer: It is also another type of wait which is used for synchronization. We define polling time to identify the element, along with the maximum time to wait.

How to implement Fluent wait in Selenium WebDriver?

Question# 52: What is Actions class in Selenium?

Answer: Actions class helps to perform different keyboard and mouse actions in Selenium.

Questions# 53: What are the different methods of the mouse operations of the Actions class?

Answer: Various actions methods for mouse operations are as follows:

Question# 54: How to implement Actions class?

Answer:

 Actions act = new Actions(driver);

act.moveToElement(WebElement element).build().perform();

Question# 55: Why do we use build() method in Actions class operation?

Answer: When we are performing many actions then we use the build() method to compile all the actions together. No need to use build() when we are performing a single action.

Question# 56: Can we verify tooltip texts in Selenium?

Answer: Yes, we can do so by using getAttribute() method.

Question# 57: Can we find all the links of the web page?

Answer: Yes. All the links generally written inside ‘<a …. /a>’ tag name. So we can find them all by locating with the tag name.

Example:

driver.findElements(By.tagName(“a”));

Question# 58: What are different types of Exceptions in Selenium?

Answer: Click here to read more about 20 types of exceptions that come in Selenium.

Question# 59: Why do we use DesiredCapabilities in Selenium?

Answer: DesiredCapabilities offers to set the properties specific to the browser in key-value pairs. It is mainly used to configure the Selenium Grid.

Question# 60: Can we capture Screenshots in Selenium while running tests?

Answer: Yes. Click here to know about taking the screenshot in Selenium

How to take screenshot using Robot class?

Question# 61: Can you write a command to handle drop-down in Selenium?

Answer: 

Select select = new Select(WebElement element);

Further, there are three different methods to select a value from the drop-down, which are listed below:

  • selectByVisibleText(“Text of the dropdown value”);
  • selectByIndex(“Index position of the dropdown value”);
  • selectByValue(“Value attribute”);

How to Select elements from dropdown?

Question# 62: How to identify whether the checkbox or any other web element is Selected or not?

Answer: We use isSelected() method. Its return type is Boolean.

Example:

boolean selecteTest = driver.findElement(By.id(“some id”)).isSelected();

Question# 63: How to identify whether any web element is displayed or not?

Answer: We use isDisplayed() method. Its return type is Boolean.

Example:

boolean selecteTest = driver.findElement(By.id(“some id”)). isDisplayed ();

Question# 64: How to verify whether an element is enabled to perform interaction or not?

Answer: We use isEnabled() method. Its return type is Boolean.

Example:

boolean selecteTest = driver.findElement(By.id(“some id”)). isEnabled ();

Question# 65: What are the differences between Implicit Wait and Explicit wait?

Answer: Click here to read…

Question# 66: How to handle windows pop-ups in Selenium?

Answer: Selenium is only responsible to handle web-based UI and pop-ups. We use the third-party tool like AutoIT to handle windows pop-ups.

Question# 67: What is Robot class?

Answer: Robot is an API which is mainly used to handle keyboard and mouse interaction with the web browser.

How to implement Robot class for Keyboard and Mouse interaction?

Question# 68: Can we perform keyboard actions in Selenium?

Answer: Yes. We can do it by using Actions class or Robot class.

Robot Class:
Robot rob = new Robot();

rob.keyPress(KeyEvent.VK_ENTER);

rob.keyRelease(KeyEvent.VK_ENTER);
Actions Class:
Actions act = new Actions(driver);

act.keyDown(Keys.ENTER);

act.keyUp(Keys.ENTER);

Question# 69: Can we upload a file in Selenium?

Answer: Yes. We can do so by using Actions class, Robot Class, AutoIT, and some other tools.

Question# 70: Can we execute JavaScript in Selenium?

Answer: Yes.

JavaScriptExecutor js = (JavaScriptExecutor) driver;

js.executeScript(argument, script);

Question# 71: How can we handle alerts in Selenium?

Answer: We can accept, dismiss and send text through an alert. Here is the sample code:

Alert alert = driver.switchTo().alert();

alert.accept();

alert.dismiss();

alert.sendKeys();

Question# 72: Do you know HtmlUnitDriver?

Answer: HtmlUnitDriver is a GUI less driver, it is one of the fastest browsers and it does not require the launching of any web browser.

Selenium Interview Questions inviul avinash

High-level Selenium Interview Questions

Question# 73: What is Automation Framework?

Answer: Automation framework is a set of rules to efficiently designing and executing the test case with better reporting and logging.

Question# 74: What are the different times of Automation Framework?

Answer: There are mainly four types of the framework used, which are as follows:

  1. Data Driven Framework
  2. Keyword Driver Framework
  3. Hybrid Framework
  4. Linear Framework

Question# 75: What is data-driven framework?

Answer: The entire test is driven by a different set of test data. Data-driven framework facilitates the uses of a different set of test data and these data are stored in an external file like Excel sheet, Properties file, Text file, CSV file, JSON file, etc, which is separated from the main test logic.

Question# 76: What is Keyword driven framework?

Answer: Test cases are driven by different types of action keywords which are stored in an external file. Like openBrowser(), clickElement(), etc.

Question# 77: What is the Hybrid framework?

Answer: A hybrid framework is a combination of two or more framework. Like, a framework which is the combination of Data-driven framework and Keyword driven framework.

Question# 78: What is Linear framework?

Answer: A linear framework is a simple framework which mentions all the test steps in a stepwise linear fashion.

Question# 79: What does POM stand for?

Answer: POM stands for Page Object Model.

Question# 80: What is POM?

Answer: As its name suggests, Page and its Object mode. POM is a class which consists of all the objects along with the methods which control the events in the page.

Question# 81: What are the significances of the POM?

Answer: Some of the significances of the POM are as below:

  • Reusability of the code
  • On UI changes, we just need to update this single POM page by avoiding changes to other pages
  • An efficient way to create the object repository

Question# 82: What is Page Factory Model?

Answer: A page factory model is another way of implementation of the page object model. We use @FindBy annotation to identify the web elements. Further, we initialize all those elements calling with the method- PageFactory.initElements().

Question# 83: What is the Object repository?

Answer: Object repository is the central system to collect locators of all the web elements. It is implemented by POM and Page Factory techniques.

Question# 84: What is Selenium Grid?

Answer: Selenium Grid is one of the components of the Selenium. It is used to distribute tests to different machines, platforms, and browsers.

Click here to know more about Selenium Grid.

Question# 85: What are the components of Selenium Grid?

Answer: There are mainly two components of Selenium Grid, which are-

  1. Hub
  2. Node

Question# 86: Can you tell me the advantages of Selenium Grid?

Answer: Some of the advantages are-

  • Parallel distribution of the test cases
  • Test cases are distributing on different machines
  • Selenium Grid supports different platforms too

Question# 87: What is the hub?

Answer: A hub is a central server which distributes the test cases to different machines.

Question# 88: What are the nodes?

Answer: Nodes are different machines, which are registered with the hub machines. They accept tests cases from the hub.

Question# 88: Why do we create a reference variable of WebDriver, instead of directly using ChromeDriver?

Answer: With a reference variable, we can use all the classes and methods written inside WebDriver.

Question# 89: What is TestNG?

Answer: TestNG is a testing framework, which is motivated by Junit. It is used to design the Automation framework to efficiently use and manage the test cases.

Question# 90: What is a testng.xml file?

Answer: testng.xml file is the configuration file to define Listeners, test groups, test suites, methods and test classes to run. It also passes the parameters inside the tests along with the setting of multiple tests in parallel and defining dependencies.

Question# 91: What are the advantages of using TestNG?

Answer: Some of the advantages of TestNG are listed below:

  • Running tests in parallel are easier
  • Creating test dependencies is convenient
  • We assign test execution priorities
  • TestNG allows the creation of test groups
  • Implementation of assertion is easy and efficient
  • Using @DataProvider annotation, we can manage a large amount of test data with ease
  • It supports default reporting and parameterization using @Parameters annotation

Question# 92: How to pass parameters in TestNG?

Answer: Click here to read more.

Question# 92: How to create a data driven framework using TestNG?

Answer: Click here to read more.

Question# 93: What is TestNG Listener?

Answer: TestNG has ITestListener interface. Listeners are basically used for effective logging and reporting on triggering of each event. @Listener annotation used to specify that particular test class has implemented ITestListener.

Question# 94: What is @Factory annotation in TestNG?

Answer: @Factory annotation is used to pass a large amount of test data at runtime to the test cases.

Question# 95: How to make one test method is dependent on other in TestNG?

Answer: We use the dependsOnMethods parameter with @Test annotation to create the dependencies on another test method.

Example: @Test(dependsOnMethods = {“first test”})

Question# 96: How to set priority of execution to the tests in TestNG?

Answer: @Test(priority=1)

Question# 97: What are different annotations in TestNG?

Answer: Annotations inside the TestNG are-

  • @BeforeSuite
  • @BeforeClass
  • @BeforeTest
  • @Test
  • @AfterTest
  • @AfterClass
  • @AfterSuite
  • @Factory

Question# 98: How to run multiple tests in parallel in TestNG?

Answer: We define thread-count and identifying parallel to methods, classes, or tests in testng.xml. Like-

<suite name=”inviulTest” parallel=”classes” thread-count=”3”>

Question# 99: What are different Assertions available in TestNG?

Answer: Assertions available in TestNG are-

  • assertEquals(String actual, String expected, String message)
  • assertNotEquals(String actual, String expected, String message)
  • assertTrue(boolean condition, String message)
  • assertFalse(boolean condition, String message)
  • assertNotNull(Object object)
  • true(boolean condition, String message)
  • fail(boolean condition, String message)

Question# 100: Which API we use to read test data from an Excel sheet?

Answer: Apache POI and JExcel API.

Question# 101: What is the difference between POI and JXL?

Answer: Click here to read the differences.

Question# 102: What is the API name which is used for logging?

Answer: We use Log4j for logging.

Question# 103: What is the difference between HSSFWorkbook and XSSFWorkbook?

Answer: HSSFWorkbook instantiated when we work on .xls document, whereas, XSSFWorkbook instantiated when we work on the .xlsx document.

Question# 104: How do we implement reporting in our test framework?

Answer: We use either Extent Reports or XSLT report for reporting in Selenium.

How to steup Extent Reports in Selenium project?

How to implement XSLT Reprots in Selenium Project?

Selenium Interview Questions avinash

Miscellaneous Selenium Interview Questions

Question# 105: What is Selenium IDE?

Answer: Selenium IDE is Firefox and Chrome plugin which is used to record and play the tests.

Download Selenium IDE for Google Chrome

Question# 106: What are Selenese?

Answer: Selenese is Selenium commands which are used in Selenium IDE to write scripts.

What is Selenese and how to use it?

Question# 107: What is the difference between assert and verify?

Answer: Assert and Verify is the command which is used to check whether the condition is true or false. If the condition is false, then Assert will abort the further execution whereas Verify will continue the execution by generating the failed log.

Question# 108: What is Junit?

Answer: Junit is the unit testing framework.

Question# 109: What is Automation Testing?

Answer: Automation testing is the process of testing the application using test automation tool to identify the defects. Functional testing, as well as Regression testing, are supported by Automation testing.

Question# 110: What are the programming languages supported by Selenium WebDriver?

Answer: Java, C#, Python, Ruby, PHP, and Perl

Question# 111: How do you identify the checkpoints in Selenium?

Answer: Checkpoints are basically a verification point which is used to determine the correct page. Some of the checkpoints could be-

Question# 112: What is same origin policy?

Answer: It is one of the security policy which permits access of data from one web page to another web page only when both the web pages share the same origin.

Question# 113: What is a regular expression?

Answer: It is the technique to identify dynamic objects with defining the same pattern.

Question# 114: How to perform network data capturing in Selenium?

Answer: We do perform network data capturing by using API in default Selenium class.

Question# 115: What is Maven?

Answer: Maven is a build automation tool which is used to create dependencies of the API and effectively manage the project.

Question# 116: How to define dependencies in Maven?

Answer: We define dependencies inside pom.xml file.

Example:

<dependency>

<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-java</artifactId>

<version>3.13.0</version>

</dependency>

Question# 117: Where does Selenium store variables?

Answer: Selenium stores variable in-

storedVars

Question# 118: What is the solution to run test suites in multiple environments?

Answer: Selenium Grid.

Question# 119: Which components allocate Selenium RC in Selenium Grid?

Answer: Hub.

Question# 120: Which default port Selenium hub uses?

Answer: Port 4444.

Question# 121: How many maximum numbers of browsers that can be run of node machine?

Answer: 5.

Question# 122: Which format of config file Selenium Grid uses?

Answer: JSON.

Question# 123: In which format source view display test scripts in Selenium IDE?

Answer: HTML format.

Question# 124: In which file format Maven Surefire plugin does not generate the report?

Answer: PDF format.

Question# 125: What is Jenkins?

Answer: Jenkins is the Continuous Integration server which is used to manage builds.

Click here to read more about Jenkins.

Question# 126: What is the minimum JDK version to install Maven?

Answer: Version 1.7.

Question# 127: What is the minimum Java version required to install Jenkins?

Answer: Java 8.

Question# 128: On which class EventFiringWebDriver acts?

Answer: WebDriver.

Question# 129: What is the return type of isSelected() method?

Answer: Boolean.

Question# 130: Which design technique do we use for System testing?

Answer: Dynamic testing.

Question# 131: What is the type of log collected from Java binding under Selenium?

Answer: Client log.

Question# 132: What is the alternative name of the Data Driven Framework?

Answer: Table driven framework.

Question# 133: Which type of application mainly Selenium interacts with?

Answer: DOM based application.

Question# 134: Which database stores information about configuration items?

Answer: Configuration management database.

Question# 135: When page load indefinitely then what will be the value of setScriptTimeout?

Answer: -1.

Question# 136: When page load indefinitely then what will be the value of pageLoadTimeout?

Answer: -1.

Question# 137: What is referred to as finding elements in UI?

Answer: Locators.

Question# 138: What are the number of parameters allowed by the action method?

Answer: 2.

Question# 139: What is the name of the prototype which is used to extend and create our own function?

Answer: PageBot.

Question# 140: What is the name of the exception when the targeted window does not exist after passing switch window command?

Answer: NoSuchWindowException.

Question# 141: What is the method to get the cookie with its name?

Answer: getCookieNamed.

Question# 142: Can Selenium Test Desktop based application?

Answer: No.

Question# 143: What is the accessor name to wait for a particular element?

Answer: waitForElement.

Question# 144: What is the name of the environment variable which is responsible to integrate Selenium and Maven?

Answer: JAVA_HOME.

Question# 145: Which command is used to extend the time limit of waitFor command?

Answer: setTimeout.

Question# 146: Which command is used to integrate AutoIT recorded file?

Answer: getRuntime.

Question# 147: What is the name of the command to verify specific text is present on the web page?

Answer: verifyTextPresent.

Question# 148: Is Selenium a licensed tool?

Answer: No.

Question# 149: How to identify dynamic web elements?

Answer: By using dynamic XPath and dynamic CSSSelector.

Question# 150: What will be the output when clickAndHold is not invoked but release method is invoked?

Answer: Driver will show undefined behavior.

Question# 151: Which locator is the simplest way to identify web elements?

Answer: Id and Name.

Question# 152: Which locator is the complex way to identify web elements?

Answer: XPath.

Question# 152: Which is the faster technique XPath or CSSSelector?

Answer: CSSSelector.

Question# 153: Which command line flag is used to change the driver property?

Answer: -D.

Question# 154: What is Experienced based test design technique

Answer: Exploratory testing and Error guessing.

Question# 155: Which testing technique is applied using inspection?

Answer: Static testing.

Question# 156: When will cursor moves if xOffSet has the negative value?

Answer: It will move to the left side.

Question# 157: How can you create your own Selenium commands?

Answer: We can create our own Selenium commands in JavaScript, but its name should be user-extensions.js.

Question# 158: Does the syntax of Globs is much wider than the Regular expression, true or false?

Answer: False.

Question# 159: What is the year when Selenium was launched?

Answer: Year 2004.

Question# 160: Which format the Selenium RC server is?

Answer: Java jar file.

Question# 161: What is the name of the Exception when element could not be found?

Answer: NoSuchElementException.

Question# 161: Does the syntax of Globs is the same as the Regular expression?

Answer: False.

Question# 162: What is the file format which is generated by Junit for reporting with Selenium RC?

Answer: XML format.

Question# 163: From which route Selenium RC received test commands?

Answer: Through the Selenium Server.

Question# 164: Which browser driver is missing in Selenium RC?

Answer: HtmlUnitDriver.

Question# 165: What is the name of the .Net test engine?

Answer: Nunit.

Question# 166: What is the specified pattern to use the globbing pattern?

Answer: glob.

Question# 167: What is the full form of AUT?

Answer: Application Under Test.

Question# 168: What is the java command to set property?

Answer: System.getProperty().

Question# 169: What is Cucumber?

Answer: Cucumber is a tool which supports Behaviour Driven Development (BDD) and Behaviour Driven Testing (BDT).

Question# 170: Which language is used in Cucumber?

Answer: Gherkin language.

Question# 171: What are the Gherkin keywords?

Answer: Given, When, And, Then.

Question# 172: What is the full form of AJAX?

Answer: Asynchronous Java and XML.

Question# 173: What is the full form of JSON?

Answer: JavaScript Object Notation.

Question# 174: Which Selenium version is the W3C recommendation?

Answer: Selenium 3.

Question# 175: What is the full form of CSS?

Answer: Cascading Style Sheet.

Question# 176: What other definitions are in pom.xml of Maven apart from creating dependencies?

Answer: Properties and Plugin.

Question# 177: What is Maven Surefire plugin?

Answer: It is used to execute the unit tests.

Question# 178: What is Maven compiler plugin?

Answer: It compiles the main source file.

Question# 179: What is RemoteWebDriver?

Answer: It is the implementation of WebDriver and it is used to run tests to the remote server.

Question# 180: What is the full form of HTML?

Answer: Hyper Text Markup Language.

Question# 181: From which site we download POI API?

Answer: apache.org

Question# 182: From which site we download Selenium JARs?

Answer: seleniumhq.org

Question# 183: What is the first step to automating any story?

Answer: First check and performs automation feasibility analysis.

Question# 184: What are the IDEs to implement WebDriver?

Answer: Eclipse, IntelliJ, etc.

Question# 185: What is the global Selenium conference name?

Answer: SeleniumConf.

Question# 186: Can we define the different port address to the Node machine apart from the default one?

Answer: Yes, by using -port 5536 (any port of your choice).

Question# 187: What are the table columns available in Test case panel of Selenium IDE?

Answer: Command, Target, and Value.

Question# 188: Does WebDriver support headless execution?

Answer: Yes.

Question# 189: What are the tools available for mobile testing in Selenium?

Answer: Appium, Selendroid, iOSDriver.

Question# 190: What is the command to configure hub in Selenium Grid through command line?

Answer: 

java -jar selenium-server-standalone-3.8.1.jar – role hub

Question# 191: What is the command to configure the node in Selenium Grid through command line?

Answer: 

java -jar selenium-server-standalone-3.8.1.jar – role node -hub http://ipAddressOfHub:4444/grid/register -port 5566

Question# 192: What is the command to configure hub in Selenium Grid JSON file?

Answer: 

java -jar selenium-server-standalone-3.14.0.jar -role hub -hubConfig myhub.json

Question# 193: What is the command to configure the node in Selenium Grid through a JSON file?

Answer:

 java -Dwebdriver.chrome.driver=”chromedriver.exe” -Dwebdriver.ie.driver=”IEDriverServer.exe” -Dwebdriver.gecko.driver=”geckodriver.exe” -jar selenium-server-standalone-3.14.0.jar -role node -nodeConfig selfnode.json

How to configure Selenium Grid using JSON file?

Question# 194: What exception WebDriver throws after time out?

Answer: TimeOutException.

Question# 195: Can we migrate tests from Selenium RC to Selenium WebDriver?

Answer: Yes.

Question# 196: Does Selenium IDE support export of recorded tests to the language of our choice?

Answer: Yes.

Question# 197: Can we execute the .exe file in Selenium?

Answer: Yes, through the getRuntime method.

Question# 198: Can we create a batch file of our entire Selenium project?

Answer: Yes, with extension .bat.

Question# 199: Can we integrate Selenium with any other automation tool?

Answer: Yes, LFT and Selenium can be used together.

Question# 200: What are assertion commands in Selenium?

Answer: assert, verify and waitFor.

This is all about 200 super Selenium Interview questions. Keep visiting this space for the addition of more questions. If I have missed anything, you can suggest some Selenium interview questions as well in a comment below.

Join Inviul fb group

2 Comments

Leave a Reply