Last Updated On
Selenium Quiz – You can test your knowledge with this Selenium Quiz. We have created this Selenium WebDriver Quiz Online Test to help you master Selenium.
Selenium Multiple Choice Questions – MCQ2
Answers
1) 6) All of the above
2) 1) Selenium (IDE)
3) 4) Selenium Grid
4) 2) No
To learn more about findElement and findElements, please refer to this Difference between FindElement and FindElements in WebDriver
5) 1) findElement
6) 1) findElement
7) 2) No. It will not throw an exception. It will return an empty list
8) 2) Absolute XPath
9) 2) Element Not Visible Exception
10) 2) All the tags in the DOM after the current node
11) 2) All the descendants of the current node including children, grandchildren
12) 3) Find all the anchor tags in the entire DOM which are falling after the list item whose id is ‘firstItem’
13) 1) Find all the child nodes (with any tags) of the list item whose id is ‘firstItem’
14) 3) Type Text
To learn more about the Locators in Selenium, please refer to this Locators in Selenium – Locate by ID, ClassName, Name, TagName, LinkText, PartialLinkText.
15) 1) Pattern Matching
To learn more about the Locators in Selenium, please refer to this Locators in Selenium – Locate by ID, ClassName, Name, TagName, LinkText, PartialLinkText.
16) 1) //input[@id=’your_input_id’]/following-sibling::input
17) 1) ((JavascriptExecutor) driver).executeScript(“arguments[0].scrollIntoView(true);”, element);
18) 2) No protocol is specified, so an exception will be thrown
19) 2) SearchContext
20) 3) getCssValue(“”)
21) 2) Select
To learn more about the Select class, please fer to this How to Select value from Drop down list or perform Multiple Selection Operations in WebDriver
22) 1) Select dropdown = new Select(<WebElement>)
To learn more about the Select class, please fer to this How to Select value from Drop down list or perform Multiple Selection Operations in WebDriver
23) 1) Yes
24) 2) selectByIndex()
25) 1)forward() 2) back() 3) refresh()
To learn more about the Navigation methods, please refer to this WebDriver Navigation Commands – Navigate, Forward, Back, Refresh in WebDriver