Selenium WebDriver Quiz


This section contains 20 MCQs on the Selenium WebDriver interface. Also, check our series of MCQs and quizzes around selenium, testNG, cucumber, manual testing, etc. for free and assess your automation proficiency. Very useful in interviews and certification exam preparation.



Instructions

The test consists of 20 questions on selenium.

No negative marking for this test.

No Time limit

The pass percentage is 70%

The correct answer with a description will be displayed after the answer has been marked.

Submit the test to calculate your score once you are done with all the questions.

Complexity Level- Easy







Q1: Which one of the following is correct for WebDriver? Select the correct answer:







WebDriver is an interface. Correct answer is option-1






Q2: What would be the outcome if you try to run the below code?

WebDriver driver=new WebDriver();

Select the correct answer:













Q3: Which of the following is NOT a component of selenium?

Select the correct answer:

















Q4: By class in selenium is used to find locators using below strategies:


Select all that applies:































Q5: Select the correct implementing classes of the WebDriver interface


Select all that applies































Q6: Which of the below method can ensure that the WebElement is enabled or not ?


Select the correct answer:











Q7: Which of the below method verify the presence of a WebElement on the screen?


Select the correct answer:











Q8: The format to write a custom xpath

Select the correct answer:













Q9: What does the asterisk represent in the below statement ?
//*[@class='abcd']

Select the correct answer:











Q10. findElements("Locator") method returns ________

Select the correct answer:











Q 11. Select the correct statements about driver.close() and driver.quit()


















Q 12: Select the corrects statements about driver.navigate().to("url") and driver.get("url")

Select all that applies:



















Q 13: Select the correct statement to maximize the browser window













Q 14: What would be the exception thrown by the WebDriver if the web page is refreshed after the element was located?













Q 15: Consider the web page is still loading and the element is not yet on the screen at the time of the find operation. What would be the exception thrown by the WebDriver? ?













Q 16: The color of a WebElement can be found by using the following WebElement method-

Select the correct answer:












Q 17: Select the correct statement for a fluent wait-












Q 18: Select the correct statement about the below command:

d.manage().timeouts().pageLoadTimeout(1, TimeUnit.SECONDS);












Q 19: Complex user actions through mouse like - drag and drop, double-click, context-click, etc. can be performed with the help of:











Q 20: Which of the following classes provides helper methods to select and deselect options on a Select tag?