Table of Contents

Method GetElementById

Namespace
DotNetBrowser.Dom
Assembly
DotNetBrowser.dll

GetElementById(string)

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

IElement GetElementById(string id)

Parameters

id string

a string that represents the id attribute of the HTML element.

Returns

IElement

The first IElement object found in the current search context by the given id or null if no elements were found.

Exceptions

ArgumentException

The id is null, empty or contains only blank characters.

ObjectDisposedException

The ISearchContext has already been disposed.