October 2018
Intermediate to advanced
192 pages
5h 12m
English
SearchContext is the interface that has been designed to find elements in the DOM using a locator mechanism. SearchContext has two public methods:
When Selenium returns a WebElement, it does not return an object of the WebElement, since the WebElement is an interface. Rather, it returns an object of RemoteWebElement, which is the implementation class of the WebElement interface.
What if the locator mechanism does not return any elements? In this case, findElement will always throw a NoSuchElementException. The ...
Read now
Unlock full access