1. If you wanted to access the element that has the text 'This element has an ID that changes every time the page is loaded' in it, then which of the following is used?
2. Method which selects the option which displays the text matching the parameter passed to it
3. Which of the following base classes should be extended while defining servlets for a hub in which you are required to access the internals of the Hub in Selenium-Grid?
4. Which of the following is the correct syntax of the command that is used for setting up Selenium-Grid and starting a hub with default parameters?
5. How to wait until an element is no longer attached to the DOM?
6. Which of the following is the correct syntax for defining an explicit wait for a set of common conditions using ExpectedConditions class?
7. If you wish to move backward in your browser's history, irrespective of the behavior of browser, then which of the following is the correct Java method to do so in WebDriver?
8. Which of the following combination of the WebDriver's sendKeysO is not correct?
9. Which of the following is the correct method for initializing Page Factory in Selenium?
10. Which of the following options can be used for performing a right-click operation in Selenium?
11. Which of the following Selenium commands is responsible for verifying the expected text and its corresponding HTML tag to be present on the page?
12. Which of the following drivers does/do NOT provide native XPath support?
13. What does the below lines of code meant for? WebDriver driver = new FirefoxDriverO; Selenium selenium = new WebDriverBackedSelenium(driver, "http://www.techbeamers.com/");
14. Which of the following is the correct syntax of the method that is used for directly accessing the alert box in Selenium?
15. When a confirmation is generated. which of the following options must be called to consume it in order to avoid failure of the next Selenium action?
16. Which of the following statements is correctly defining the Time-out test in TestNG?
17. Which of the following is the correct Java syntax for retrieving the innerText value contained within an element?
18. Which ofthe following methods makes an expectation for checking that an element, known to be present on the DOM of a page, is visible?
19. Which is not a valid setUp/tearDown level in TestNG framework?
20. how would you select only the element with the 2 classes: ‘container' and 'title’?
21. Suppose while recording test cases in Selenium IDE, you entered some values in a textbox. Which of the following commands must have been used to do so?
22. Which of the following Selenium actions simulates a user who pressed a key and hasn't released it yet?
23. Which of the following code can be used to create excel automation object using POI excel API?
24. Which of the following Selenium actions simulates a user moving the mouse pointer away from a specified element?
25. Which of the following statements is/are correct about Ul mapping in Selenium?
26. What will happen if you add an empty command and an empty comment in your test script in Selenium IDE?
27. Is it possible to enable JavaScript in HTMLUnitDriver during driver initialization? If yes, then how?
28. Which of the following Selenium commands is used for retrieving the messages of JavaScript question prompt dialog generated during the previous action?
29. Which Of the following Selenium commands should be run on command prompt for adding Internet Explorer Selenium Remote Controls to our Grid on Windows Operating System target?
30. Which Of the following exceptions occurs when an element is present in the DOM but interactions with that element will hit another element?
31. Which of the following is a valid select statement in Webdriver that selects a value from a drop down element?
32. Which of the following commands should be run from a command-line for adding Selenium to your Python environment?
33. The following command is used to add Selenium to which type of programming environment? gem install selenium-webdriver
34. Which of the following statements is false in the context of TestNG framework?
35. TestNG doesn't make it mandatory to declare @BeforeClass and @AfterClass, which is present in JUnit. Is it true or false?
36. Suppose you are using the record feature of Selenium IDE and you want to check the properties of a web page. Which of the following commands will be used to do so?
37. The clear() method of WebElement interface works on which of the following type of elements?
Selenium Automation MCQs | Topic-wise