Table of Contents

Class WebElementFactory

Namespace
OpenQA.Selenium
Assembly
WebDriver.dll

Object used to create WebElement objects for a remote driver instance.

public class WebElementFactory
Inheritance
WebElementFactory
Inherited Members

Constructors

WebElementFactory(WebDriver)

Initializes a new instance of the WebElementFactory class.

public WebElementFactory(WebDriver parentDriver)

Parameters

parentDriver WebDriver

The WebDriver object used to locate the elements.

Properties

ParentDriver

Gets the WebDriver instance used to locate elements.

protected WebDriver ParentDriver { get; }

Property Value

WebDriver

Methods

ContainsElementReference(Dictionary<string, object>)

Gets a value indicating wether the specified dictionary represents a reference to a web element.

public bool ContainsElementReference(Dictionary<string, object> elementDictionary)

Parameters

elementDictionary Dictionary<string, object>

The dictionary to check.

Returns

bool

true if the dictionary contains an element reference; otherwise, false.

CreateElement(Dictionary<string, object>)

Creates a WebElement from a dictionary containing a reference to an element.

public virtual WebElement CreateElement(Dictionary<string, object> elementDictionary)

Parameters

elementDictionary Dictionary<string, object>

The dictionary containing the element reference.

Returns

WebElement

A WebElement containing the information from the specified dictionary.

GetElementId(Dictionary<string, object>)

Gets the internal ID associated with the element.

public string GetElementId(Dictionary<string, object> elementDictionary)

Parameters

elementDictionary Dictionary<string, object>

A dictionary containing the element reference.

Returns

string

The internal ID associated with the element.