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
cssSelectorstringThe CSS selector.
Returns
- IEnumerable<IElement>
A collection of the IElement objects found in the current search context by the given
cssSelectoror an empty collection if no elements were found.
Exceptions
- ArgumentException
The
cssSelectoris null, empty or contains only blank characters.- ObjectDisposedException
The ISearchContext has already been disposed.