An NDoc Documented Class Library

DefaultSelenium Class

Defines an object that runs Selenium commands.

Element Locators

Element Locators tell Selenium which HTML element a command refers to. The format of a locator is:

locatorType=argument

We support the following strategies for locating elements:

Without an explicit locator prefix, Selenium uses the following default strategies:

Element Filters

Element filters can be used with a locator to refine a list of candidate elements. They are currently used only in the 'name' element-locator.

Filters look much like locators, ie.

filterType=argument

Supported element-filters are:

value=valuePattern

Matches elements based on their values. This is particularly useful for refining a list of similarly-named toggle-buttons.

index=index

Selects a single element based on its position in the list (offset from zero).

String-match Patterns

Various Pattern syntaxes are available for matching string values:

If no pattern prefix is specified, Selenium assumes that it's a "glob" pattern.

For commands that return multiple values (such as verifySelectOptions), the string being matched is a comma-separated list of the return values, where both commas and backslashes in the values are backslash-escaped. When providing a pattern, the optional matching syntax (i.e. glob, regexp, etc.) is specified once, as usual, at the beginning of the pattern.

For a list of all members of this type, see DefaultSelenium Members.

System.Object
   Selenium.DefaultSelenium

public class DefaultSelenium : ISelenium

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Selenium

Assembly: ThoughtWorks.Selenium.Core (in ThoughtWorks.Selenium.Core.dll)

See Also

DefaultSelenium Members | Selenium Namespace