Click or drag to resize

ISearchContextGetElementByCssSelector Method

Finds the first IElement object in the current search context by the given CSS selector.

Namespace:  DotNetBrowser.Dom
Assembly:  DotNetBrowser (in DotNetBrowser.dll) Version: 2.27.7
Syntax
C#
IElement GetElementByCssSelector(
	string cssSelector
)

Parameters

cssSelector
Type: SystemString
The CSS selector.

Return Value

Type: IElement
The first IElement object found in the current search context by the given CSS selector or null if no elements were found.
Exceptions
ExceptionCondition
ArgumentException The cssSelector is null, empty or contains only blank characters.
ObjectDisposedExceptionThe ISearchContext has already been disposed.
See Also