Top Selenium Interview Questions For Beginners In 2018
Recommended by 1 user
According to Business Wire, web testing continues to become increasingly popular, especially with the widespread use of web components and shadow DOM in apps, as well as Chrome, Mozilla and Edge blocking APIs. Selenium has earned the mettle of being the poster boy of web testing tools, with a whopping 300 percent increase in job postings over the past three years. There has never been a better time to attend Selenium interviews. To help you breeze through them, we have curated a list of probable Selenium interview questions and answers for the beginner level. In case you have attended Software Testing interviews in the recent past, we encourage you to add the Selenium interview questions that you faced in the comments tab below. All the best!
1. How does Selenium score over other automation tools like HP QTP, IBM RFT, and TestComplete?
|Features||HP QTP||IBM RFT||TestComplete||Selenium|
|Customer Support||Yes||Yes||Yes||Yes, Open source community|
|Coding Skills||Low||Low||Low||Very High|
|Environment Support||Only Windows||Only Windows||Windows only (7, Vista, Server 2008 or later OS)||Windows, Linux, Mac|
|Language Support||VB Script||Java and C#||VB Script, JS Script, Delphi Script, C++ & C#||Java, C#, Ruby, Python, Perl & PHP|
2. What is Selenium?
- Wikipedia defines Selenium as “a portable software testing framework for web applications. Selenium provides a record/playback tool for authoring tests without learning a test scripting language.”
- In other words, Selenium is a browser automation tool that allows you to automate operations such as Type, Click, and Selection from a web page drop down.
3. What is Selenium 1.0?
Selenium 1.0 is also known as Selenium Remote Control. It is essentially a virtual library that is available in multiple languages.
4. What is Selenium 2.0?
- Selenium 2.0 is also known as WebDriver. This is the latest offering of Selenium that aims to:
- Provide a better, more robust API compared to Selenium 1.0
- Overcome the Java script security restriction that hinders the performance of Selenium 1.0.
- Supports more UI operations such as drag and drop
5. What is Selenium IDE?
Selenium IDE is a record and playback tool which is distributed as a Firefox plugin. Selenium IDE can be used only with Firefox browser.
6. Which is the latest Selenium tool?
7. List the different Selenium tools.
- Selenium Integrated Development Environment (IDE)
- Selenium Remote Control (RC)
- Selenium WebDriver
- Selenium Grid
8. What kind of testing does Selenium support?
Selenium supports Functional Testing and Regression Testing.
9. What is Selenese?
Selenese is the language used to write test scripts in Selenium IDE.
10. What are the different ways in which Selenium IDE can be opened?
Selenium IDE can be opened either through the side bar or as a pop up window.
11. What is Selenium Grid?
Selenium grid is the functionality that lets you distribute your tests simultaneously across multiple machines. Selenium Grid helps in reducing the time taken for test execution, and provides instant feedback to stack holders.
12. When should one use Selenium Grid?
Selenium Grid could be used to execute the same or different test scripts on multiple platforms and browsers in parallel. It helps achieve distributed test execution, testing under different environments and saving execution timelines.
13. What is difference between Assert and Verify commands?
The Assert command checks is a particular condition is true or false. If the condition is true, the program control will execute the next test step. If the condition is false, the execution would stop and no further tests would be executed.
The Verify command also checks if a particular condition is true or false. Irrespective of the condition being true or false, the program execution doesn’t stop.
14. List the different types of locaters in Selenium.
- CSS Selector
15. What is the function of Xpath?
Xpath is a locater that is used to locate a web element based on its XML path. XML stands for Extensible Markup Language and is used to store, organize and transport arbitrary data. It stores data in a key-value, similar to HTML tags.
16. Explain the difference between single and double slash in X-path.
A single slash ( / ) begins selection from the document node, while a double slash ( // ) begins selection matching anywhere in the document.
17. List the different types of Drivers in WebDriver.
18. What is the difference between Verification and Assertion?
Verification and Assertion are two Check functionalities. Verification allows test execution to continue even when Check fails, while assertion stops the test execution.
19. List the parameters that one needs to pass in Selenium.
- Port Number
20. Explain the difference between Implicit Wait and Explicit Wait.
In Selenium, the Implicit Wait function sets a timeout for all successive web element searches. For a certain amount of time, it will attempt to look for an element repeatedly before throwing a NoSuchElementException. ExplicitWait, on the other hand, is a one-time function that is used for a particular search.
21. How does one submit a form in Selenium?
WebElement el = driver.findElement(By.id(“ElementID”)); el.submit();
22. How does one execute Java scripts function in Selenium?
23. How does one calculate the number of rows using Selenium 2.0?
String title = (String) js.executeScript(“pass your java scripts”);
24. How does one capture a page title in Selenium 2.0?
String title = driver.getTitle()
25. How does one store the current URL using Selenium 2.0?
String currentURL = driver.getCurrentUrl()
Edureka has a specially curated course on Testing with Selenium WebDriver that is co-created with real-life industry practitioners. The course deep dives into Selenium and WebDriver including TDD, TestNG, Sikuli, and JaCoCo. New batches for this course are starting so click here to learn more.
Got a question for us? Please mention it in the comments section and we will get back to you.