C# Class OpenQA.Selenium.By

Afficher le fichier Open project: asynchrony/Selenium2 Class Usage Examples

Méthodes publiques

Méthode Description
ClassName ( string classNameToFind ) : By

Gets a mechanism to find elements by their CSS class.

If an element has many classes then this will match against each of them. For example if the value is "one two onone", then the following values for the className parameter will match: "one" and "two".

CssSelector ( string cssSelectorToFind ) : By

Gets a mechanism to find elements by their cascading stylesheet (CSS) selector.

Equals ( object obj ) : bool

Determines whether the specified Object is equal to the current Object.

FindElement ( ISearchContext context ) : IWebElement

Finds the first element matching the criteria.

FindElements ( ISearchContext context ) : ReadOnlyCollection

Finds all elements matching the criteria.

GetHashCode ( ) : int

Serves as a hash function for a particular type.

Id ( string idToFind ) : By

Gets a mechanism to find elements by their ID.

LinkText ( string linkTextToFind ) : By

Gets a mechanism to find elements by their link text.

Name ( string nameToFind ) : By

Gets a mechanism to find elements by their name.

PartialLinkText ( string partialLinkTextToFind ) : By

Gets a mechanism to find elements by a partial match on their link text.

TagName ( string tagNameToFind ) : By

Gets a mechanism to find elements by their tag name.

ToString ( ) : string

Gets a string representation of the finder.

XPath ( string xpathToFind ) : By

Gets a mechanism to find elements by an XPath query.

Method Details

ClassName() public static méthode

Gets a mechanism to find elements by their CSS class.
If an element has many classes then this will match against each of them. For example if the value is "one two onone", then the following values for the className parameter will match: "one" and "two".
public static ClassName ( string classNameToFind ) : By
classNameToFind string The CSS class to find.
Résultat By

CssSelector() public static méthode

Gets a mechanism to find elements by their cascading stylesheet (CSS) selector.
public static CssSelector ( string cssSelectorToFind ) : By
cssSelectorToFind string The CSS selector to find.
Résultat By

Equals() public méthode

Determines whether the specified Object is equal to the current Object.
public Equals ( object obj ) : bool
obj object The Object to compare with the /// current Object.
Résultat bool

FindElement() public méthode

Finds the first element matching the criteria.
public FindElement ( ISearchContext context ) : IWebElement
context ISearchContext An object to use to search for the elements.
Résultat IWebElement

FindElements() public méthode

Finds all elements matching the criteria.
public FindElements ( ISearchContext context ) : ReadOnlyCollection
context ISearchContext An object to use to search for the elements.
Résultat ReadOnlyCollection

GetHashCode() public méthode

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
Résultat int

Id() public static méthode

Gets a mechanism to find elements by their ID.
public static Id ( string idToFind ) : By
idToFind string The ID to find.
Résultat By

LinkText() public static méthode

Gets a mechanism to find elements by their link text.
public static LinkText ( string linkTextToFind ) : By
linkTextToFind string The link text to find.
Résultat By

Name() public static méthode

Gets a mechanism to find elements by their name.
public static Name ( string nameToFind ) : By
nameToFind string The name to find.
Résultat By

PartialLinkText() public static méthode

Gets a mechanism to find elements by a partial match on their link text.
public static PartialLinkText ( string partialLinkTextToFind ) : By
partialLinkTextToFind string The partial link text to find.
Résultat By

TagName() public static méthode

Gets a mechanism to find elements by their tag name.
public static TagName ( string tagNameToFind ) : By
tagNameToFind string The tag name to find.
Résultat By

ToString() public méthode

Gets a string representation of the finder.
public ToString ( ) : string
Résultat string

XPath() public static méthode

Gets a mechanism to find elements by an XPath query.
public static XPath ( string xpathToFind ) : By
xpathToFind string The XPath query to use.
Résultat By