C# Class Selenium.SearchContext

Locators methods for WebDriver and WebElement
Afficher le fichier Open project: florentbr/SeleniumBasic

Private Properties

Свойство Type Description
FindAllElements WebElements
FindAnyElement WebElement
FindAnyElements WebElements
FindFirstElement WebElement
WaitAnyElementNotPresent void
WaitElementNotPresent void

Méthodes publiques

Méthode Description
FindElement ( Selenium.By by, int timeout = -1, bool raise = true ) : WebElement

Find the first WebElement using the given method.

FindElementBy ( Strategy strategy, string value, int timeout = -1, bool raise = true ) : WebElement

Finds the first child element matching the given mechanism and value.

FindElementByClass ( string classname, int timeout = -1, bool raise = true ) : WebElement

Finds the first element matching the specified CSS class.

FindElementByCss ( string cssselector, int timeout = -1, bool raise = true ) : WebElement

Finds the first element matching the specified CSS selector.

FindElementById ( string id, int timeout = -1, bool raise = true ) : WebElement

Finds the first element matching the specified id.

FindElementByLinkText ( string linktext, int timeout = -1, bool raise = true ) : WebElement

Finds the first element matching the specified link text.

FindElementByName ( string name, int timeout = -1, bool raise = true ) : WebElement

Finds the first element matching the specified name.

FindElementByPartialLinkText ( string partiallinktext, int timeout = -1, bool raise = true ) : WebElement

Finds the first of elements that match the part of the link text supplied

FindElementByTag ( string tagname, int timeout = -1, bool raise = true ) : WebElement

Finds the first element matching the specified tag name.

FindElementByXPath ( string xpath, int timeout = -1, bool raise = true ) : WebElement

Finds the first element matching the specified XPath query.

FindElements ( Selenium.By by, int minimum, int timeout ) : WebElements

Find all elements within the current context using the given mechanism.

FindElementsBy ( Strategy strategy, string value, int minimum, int timeout ) : WebElements

Finds all child elements matching the given mechanism and value.

FindElementsByClass ( string classname, int minimum, int timeout ) : WebElements

Finds elements matching the specified CSS class.

FindElementsByCss ( string cssselector, int minimum, int timeout ) : WebElements

Finds elements matching the specified CSS selector.

FindElementsById ( string id, int minimum, int timeout ) : WebElements

Finds elements matching the specified id.

FindElementsByLinkText ( string linktext, int minimum, int timeout ) : WebElements

Finds elements matching the specified link text.

FindElementsByName ( string name, int minimum, int timeout ) : WebElements

Finds elements matching the specified name.

FindElementsByPartialLinkText ( string partiallinktext, int minimum, int timeout ) : WebElements

Finds the first of elements that match the part of the link text supplied

FindElementsByTag ( string tagname, int minimum, int timeout ) : WebElements

Finds elements matching the specified tag name.

FindElementsByXPath ( string xpath, int minimum, int timeout ) : WebElements

Finds elements matching the specified XPath query.

IsElementPresent ( Selenium.By by, int timeout ) : bool

"Verifies that the specified element is somewhere on the page."

WaitNotElement ( Selenium.By by, int timeout = -1 ) : void

Waits for an element to be missing.

Private Methods

Méthode Description
FindAllElements ( Strategy strategy, string value, int minimum, int timeout ) : WebElements

Returns all the web elements matching the given method and value

FindAnyElement ( Selenium.By byAny, int timeout ) : WebElement
FindAnyElements ( Selenium.By byAny, int minimum, int timeout ) : WebElements
FindFirstElement ( Strategy strategy, string value, int timeout ) : WebElement

Returns a web element matching the given method and value or null if no element found

WaitAnyElementNotPresent ( Selenium.By byAny, int timeout ) : void

Returns a web element matching the given method and value

WaitElementNotPresent ( Strategy strategy, string value, int timeout ) : void

Returns a web element matching the given method and value

Method Details

FindElement() public méthode

Find the first WebElement using the given method.
public FindElement ( Selenium.By by, int timeout = -1, bool raise = true ) : WebElement
by Selenium.By Methode
timeout int Optional timeout in milliseconds
raise bool Optional - Raise an exception after the timeout when true
Résultat WebElement

FindElementBy() public méthode

Finds the first child element matching the given mechanism and value.
public FindElementBy ( Strategy strategy, string value, int timeout = -1, bool raise = true ) : WebElement
strategy Strategy The mechanism by which to find the elements.
value string The value to use to search for the elements.
timeout int Optional timeout in milliseconds
raise bool
Résultat WebElement

FindElementByClass() public méthode

Finds the first element matching the specified CSS class.
public FindElementByClass ( string classname, int timeout = -1, bool raise = true ) : WebElement
classname string Classname
timeout int Optional timeout in milliseconds
raise bool Optional - Raise an exception after the timeout when true
Résultat WebElement

FindElementByCss() public méthode

Finds the first element matching the specified CSS selector.
public FindElementByCss ( string cssselector, int timeout = -1, bool raise = true ) : WebElement
cssselector string CSS selector
timeout int Optional timeout in milliseconds
raise bool Optional - Raise an exception after the timeout when true
Résultat WebElement

FindElementById() public méthode

Finds the first element matching the specified id.
public FindElementById ( string id, int timeout = -1, bool raise = true ) : WebElement
id string Id
timeout int Optional timeout in milliseconds
raise bool Optional - Raise an exception after the timeout when true
Résultat WebElement

FindElementByLinkText() public méthode

Finds the first element matching the specified link text.
public FindElementByLinkText ( string linktext, int timeout = -1, bool raise = true ) : WebElement
linktext string Link text
timeout int Optional timeout in milliseconds
raise bool Optional - Raise an exception after the timeout when true
Résultat WebElement

FindElementByName() public méthode

Finds the first element matching the specified name.
public FindElementByName ( string name, int timeout = -1, bool raise = true ) : WebElement
name string Name
timeout int Optional timeout in milliseconds
raise bool Optional - Raise an exception after the timeout when true
Résultat WebElement

FindElementByPartialLinkText() public méthode

Finds the first of elements that match the part of the link text supplied
public FindElementByPartialLinkText ( string partiallinktext, int timeout = -1, bool raise = true ) : WebElement
partiallinktext string Partial link text
timeout int Optional timeout in milliseconds
raise bool Optional - Raise an exception after the timeout when true
Résultat WebElement

FindElementByTag() public méthode

Finds the first element matching the specified tag name.
public FindElementByTag ( string tagname, int timeout = -1, bool raise = true ) : WebElement
tagname string Tag name
timeout int Optional timeout in milliseconds
raise bool Optional - Raise an exception after the timeout when true
Résultat WebElement

FindElementByXPath() public méthode

Finds the first element matching the specified XPath query.
public FindElementByXPath ( string xpath, int timeout = -1, bool raise = true ) : WebElement
xpath string XPath
timeout int Optional timeout in milliseconds
raise bool Optional - Raise an exception after the timeout when true
Résultat WebElement

FindElements() public méthode

Find all elements within the current context using the given mechanism.
public FindElements ( Selenium.By by, int minimum, int timeout ) : WebElements
by Selenium.By The locating mechanism to use
minimum int Minimum number of elements to wait for
timeout int Optional timeout in milliseconds
Résultat WebElements

FindElementsBy() public méthode

Finds all child elements matching the given mechanism and value.
public FindElementsBy ( Strategy strategy, string value, int minimum, int timeout ) : WebElements
strategy Strategy The mechanism by which to find the elements.
value string The value to use to search for the elements.
minimum int Minimum of elements expected
timeout int Timeout in millisecond
Résultat WebElements

FindElementsByClass() public méthode

Finds elements matching the specified CSS class.
public FindElementsByClass ( string classname, int minimum, int timeout ) : WebElements
classname string Class name
minimum int Minimum number of elements to wait for
timeout int Optional timeout in milliseconds
Résultat WebElements

FindElementsByCss() public méthode

Finds elements matching the specified CSS selector.
public FindElementsByCss ( string cssselector, int minimum, int timeout ) : WebElements
cssselector string CSS selector
minimum int Minimum number of elements to wait for
timeout int Optional timeout in milliseconds
Résultat WebElements

FindElementsById() public méthode

Finds elements matching the specified id.
public FindElementsById ( string id, int minimum, int timeout ) : WebElements
id string Id
minimum int Minimum number of elements to wait for
timeout int Optional timeout in milliseconds
Résultat WebElements

FindElementsByLinkText() public méthode

Finds elements matching the specified link text.
public FindElementsByLinkText ( string linktext, int minimum, int timeout ) : WebElements
linktext string Link text
minimum int Minimum number of elements to wait for
timeout int Optional timeout in milliseconds
Résultat WebElements

FindElementsByName() public méthode

Finds elements matching the specified name.
public FindElementsByName ( string name, int minimum, int timeout ) : WebElements
name string Name
minimum int Minimum number of elements to wait for
timeout int Optional timeout in milliseconds
Résultat WebElements

FindElementsByPartialLinkText() public méthode

Finds the first of elements that match the part of the link text supplied
public FindElementsByPartialLinkText ( string partiallinktext, int minimum, int timeout ) : WebElements
partiallinktext string Partial link text
minimum int Minimum number of elements to wait for
timeout int Optional timeout in milliseconds
Résultat WebElements

FindElementsByTag() public méthode

Finds elements matching the specified tag name.
public FindElementsByTag ( string tagname, int minimum, int timeout ) : WebElements
tagname string Tag name
minimum int Minimum number of elements to wait for
timeout int Optional timeout in milliseconds
Résultat WebElements

FindElementsByXPath() public méthode

Finds elements matching the specified XPath query.
public FindElementsByXPath ( string xpath, int minimum, int timeout ) : WebElements
xpath string XPath
minimum int Minimum number of elements to wait for
timeout int Optional timeout in milliseconds
Résultat WebElements

IsElementPresent() public méthode

"Verifies that the specified element is somewhere on the page."
public IsElementPresent ( Selenium.By by, int timeout ) : bool
by Selenium.By An element loctor. string or By object
timeout int Optional timeout in milliseconds
Résultat bool

WaitNotElement() public méthode

Waits for an element to be missing.
public WaitNotElement ( Selenium.By by, int timeout = -1 ) : void
by Selenium.By Search mechanism
timeout int Optional - timeout in milliseconds
Résultat void