Method GetElementsByCssSelector
- Namespace
- DotNetBrowser.Dom
- Assembly
- DotNetBrowser.dll
GetElementsByCssSelector(string)
Finds all IElement objects in the current search context by the given
cssSelector
.
IEnumerable<IElement> GetElementsByCssSelector(string cssSelector)
Parameters
cssSelector
stringThe CSS selector.
Returns
- IEnumerable<IElement>
A collection of the IElement objects found in the current search context by the given
cssSelector
or an empty collection if no elements were found.
Exceptions
- ArgumentException
The
cssSelector
is null, empty or contains only blank characters.- ObjectDisposedException
The ISearchContext has already been disposed.