1. Which of the following methods makes an expectation that a new window will be opened and have the number of windows handles increase?
2. 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?
3. Method which selects the option which displays the text matching the parameter passed to it
4. 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?
5. Which of the following commands is used for configuring implicit wait and which also allows the driver to wait for an element to appear in DOM for 15 seconds after an initial try?
6. How to select all Options that have a value matching the argument?
7. Which of the following is the correct Java syntax that is used for moving between named windows using WebDriver?
8. We use the dot (.) operator followed by either a ‘ or a +. The + tells the regular expression that there will be instances between 0 and n, while the * tells the regular expression that there will be instances between 1 and n.
9. Which of the following commands is used by Selenium grid for checking the ports used by all running programs on your machine?
10. 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?
11. Which of the following is a correct difference b/w getWindowHandles() and getWindowHandleO?
12. Which of the following WebDriver commands is used to check the presence of a web element?
13. Which two commands you can use to validate a button?
14. Which of the following methods makes an expectation for checking that the title contains a case- sensitive substring?
15. Which of the following Java commands will be used for locating the above element in WebDriver?
16. How to wait until an element is no longer attached to the DOM?
17. Which of the following is the correct syntax for defining an explicit wait for a set of common conditions using ExpectedConditions class?
18. 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?
19. Which of the following is the correct syntax of the method that is used for creating an explicit wait condition for an alert to be displayed on a page?
20. Which among the following is the most efficient location strategy in Selenium, in terms of test performance, such that it also makes your test code more readable?
21. Which of the following combination of the WebDriver's sendKeysO is not correct?
22. Which of the following is the correct method for initializing Page Factory in Selenium?
23. Which of the following options can be used for performing a right-click operation in Selenium?
24. ln Selenium-Grid, which of the following Selenium commands using Java can be used for changing the port used by hub to 4441?
25. Which of the following Selenium commands using Java can be used for accessing command-line help for Selenium-Grid?
26. Using Selenium, how can we click on an element at certain coordinates?
27. Which of the following Selenium commands is responsible for verifying the expected text and its corresponding HTML tag to be present on the page?
28. Which of the following drivers does/do NOT provide native XPath support?
29. What does the below lines of code meant for? WebDriver driver = new FirefoxDriverO; Selenium selenium = new WebDriverBackedSelenium(driver, "http://www.techbeamers.com/");
30. The FluentWait class is implementation of which of the following Selenium WebDriver interfaces?
31. While running tests with RemoteWebDriver or Selenium-Grid. you can take screenshots.
32. Which of the following is the correct syntax of the method that is used for performing double click on an element?
33. In Order to mouse hover on a web element using WebDriver? Is the below written code uses the correct syntax and code // lnstantiating Action Interface Actions actions=new Actions(driver); ll howering on the dropdown actionsmoveToElement(driver.findElement(By.id('id of the dropdown'))).perform(); // Clicking on one of the items in the list options WebElernent subLinkOption=driver.findElement(By.id('id of the sub |ink')); subLinkOption.click();
34. How to import Selenium's TimeoutException in Python?
35. While testing an application in Selenium, which of the following should either not be used at all or should be minimally used?
36. Which of the following WebDriver methods is used to change focus to an alert, a frame or a browser window?
37. Which of the following statements is incorrect?
38. Which of the following is the correct syntax of the method that is used for directly accessing the alert box in Selenium?
39. correct the WebDriver methods to manage web based alerts? 1.dismiss() 2.accept0 3.ignore() 4.sendKeys(String stringToSend) 5.getText()
40. Which method is used when you want to verify whether a certain check box, radio button, or Option in drop-down box is selected in Web driver Selenium ?
41. Which of the following Selenium methods defines whether an element is visible and enabled?
42. While working with multiple frames, when the test flow needs to be moved to another frame after the completion of an operation on the previous frame, which of the following methods should be called first?
43. 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?
44. Which of the following options should be used in your test case if you want the failure of any test to abort the current test case?
45. Which of the following is the correct command that causes the Node to be spawned and a new servlet 'org.abc.mydemo.AlINodes' to be added to the node?
46. Correct path for accessing all the servlets added to the node running on port 5555? Consider abc as the machine name or ip on which the node is running.
47. correct reason for using Selenium-Grid. i) For running tests against multiple browsers. ii) For running tests against browsers running on different operating systems. iii) For reducing the time taken by the test suite to complete a test pass. iv) For running the test using Internet Explorer Driver on Mac OS or Unix. v) For running tests with slow speed.
48. Which of the following statements is correctly defining the Time-out test in TestNG?
49. Which Of the following is correct about tag and attribute name for HtmlUnit Driver?
50. ln Selenium, up to how many parameters can be passed to an action method?
51. Which commands automatically available when you add a getTextLengthO method? 0 storeTextLength ii) assertNotTextLength iii) assertValueRepeated iv) verifyTextLength
52. Which of the following is the correct Java syntax for retrieving the innerText value contained within an element?
53. Correct Java command that can be used for locating the above—given element by class name?
54. Select navigation methods of WebDriver? 1. goto() 2. moveto() 3. forward() 4. back() 5. refresh()
55. Which ofthe following methods makes an expectation for checking that an element, known to be present on the DOM of a page, is visible?
56. 1.command checks whether an element is on the page or not and stops the test on failure whereas command carries on executing the tests. 2. command checks the visibility of element whereas command tests the condition for true or false.
57. Select the Correct Navigation Commands ? 1) navigate0.back0 Sample code: driver.navigate0.back(); 2) navigate0.fon~ard0 Sample code: driver.navigate0.fon~ard(); 3) navigate0.refresh() Sample code: drivennavigate0.refresh0; 4) navigateOtoO Sample code: driver.navigateO.to("https://goog|e.com");
58. Which Of the following Selenium commands can print a specified message into the third table cell Of your Selenese table and is also useful for debugging?
59. Which is not a valid setUp/tearDown level in TestNG framework?
60. Which Of the following commands is a Selenium accessors command?
61. how would you select only the element with the 2 classes: ‘container' and 'title’?
62. Which of the following Java commands is used for navigating to a webpage, say, http://wwwvabccom, using WebDriver?
63. Which of the following correctly describes the difference between Thread.Sleep() and Selenium.setSpeed()?
64. difference between methods of the seleniumwebdriver.common.action_chains.ActionChains class? A) sen d_keys(keys_to_send) B) send_keys_to_element(element, keys_to_send)
65. What does storeBOdyText ( variabIeName) function do in Selenium ?
66. 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?
67. Which of the following Selenium actions simulates a user who pressed a key and hasn't released it yet?
68. Which of the following code can be used to create excel automation object using POI excel API?
69. Which of the following methods can be used to check whether or not an element supports multi- selection?
70. Which of the following Selenium actions simulates a user moving the mouse pointer away from a specified element?
71. Which Of the following Selenium commands is used for returning the text from a specified cell in a table?
72. Anchor tag that defines a static button present in your web page and answer the question that follows it.
73. Which of the following statements is/are correct about Ul mapping in Selenium?
74. What will happen if you add an empty command and an empty comment in your test script in Selenium IDE?
75. Is it possible to enable JavaScript in HTMLUnitDriver during driver initialization? If yes, then how?
76. Which of the following Selenium commands is used for retrieving the messages of JavaScript question prompt dialog generated during the previous action?
77. While working on Selenium using Java. which of the following commands should be used for starting the test server using the ~userExtensions argument and passing in your example-extension.js file?
78. 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?
79. Which Of the following exceptions occurs when an element is present in the DOM but interactions with that element will hit another element?
80. Which of the following is a valid select statement in Webdriver that selects a value from a drop down element?
81. Which of the following is the correct syntax of CSS partial match that will use the 'checkName' part in the middle of the ID of an element 'abc_checkName_xyz' to match and find the element in Selenium?
82. Which of the following statement describes the most appropriate way to delete the cookies?
83. Which Of the following is the correct Java syntax for wrapping up the click on a page element and wait for page to load calls in a wrapper function in Selenium?
84. Which of the following commands should be run from a command-line for adding Selenium to your Python environment?
85. The following command is used to add Selenium to which type of programming environment? gem install selenium-webdriver
86. The user is trying to Capture An Element Loading After The Page Load , And have written the Following Lines of Codes. Will the Code Execute public void waitForElementPresent(String element, int timeout) throws Exception { for (int second = 0 ;; second++) { if (second >= timeout) fail('Timeout.Unable to find the Specified e1ement'+element); try { if (selenium.isElementPresent(element)) break; } catch (Exception e) { } Thread.sleep(1986); } }
87. types of exceptions thrown in web driver? 1.ElementNotSelectabIeException 2.8taleElementReferenceException 3.NoElementFoundException 4.NoSuchE|ementException 5.ElementNotVisibleException
88. Which of the following syntax would you use to locate an element using inner text?
89. Which of the following Options will select all the table elements irrespective of their position in the document?
90. Which of the following statements is false in the context of TestNG framework?
91. TestNG doesn't make it mandatory to declare @BeforeClass and @AfterClass, which is present in JUnit. Is it true or false?
92. What is the default port used by hub for listening to new requests in Selenium-Grid?
93. 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?
94. The clear() method of WebElement interface works on which of the following type of elements?
95. Which two of the following commands can be used if you want to verify the presence Of an image on a web page?
96. Which two of the following location strategies can be used if you want to locate an element with respect to another element on a page?
97. Which of the following methods are available on the interface of the LodableComponent class?
98. Which two of the following Selenium functions never throw an exception?