Method GetElementByCssSelector
- Namespace
- DotNetBrowser.Dom
- Assembly
- DotNetBrowser.dll
GetElementByCssSelector(string)
Finds the first IElement object in the current search context by the given CSS selector.
IElement GetElementByCssSelector(string cssSelector)
Parameters
cssSelector
stringThe CSS selector.
Returns
- IElement
The first IElement object found in the current search context by the given CSS selector or
null
if no elements were found.
Exceptions
- ArgumentException
The
cssSelector
is null, empty or contains only blank characters.- ObjectDisposedException
The ISearchContext has already been disposed.