Click or drag to resize
Tesco SW, a.s.

StableWebElement Class

Obal pro IWebElement umožňující automatické znovunalezení elementu při jeho ztrátě (například při překreslování Reactem)
Remarks
Založeno na https://github.com/cezarypiatek/Tellurium/blob/master/Src/MvcPages/SeleniumUtils/StableWebElement.cs
Inheritance Hierarchy
SystemObject
  TescoSW.MW.UITests.Common.PageModelStableWebElement

Namespace:  TescoSW.MW.UITests.Common.PageModel
Assembly:  TescoSW.MW.UITests.Common (in TescoSW.MW.UITests.Common.dll) Version: 21.2.8103.33088
Syntax
C#
public class StableWebElement : IWebElement, 
	ISearchContext, ILocatable, ITakesScreenshot, IWrapsElement, IWrapsDriver

The StableWebElement type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCoordinates
Gets the coordinates identifying the location of this element using various frames of reference.
Public propertyDisplayed
Gets a value indicating whether or not this element is displayed.
Public propertyEnabled
Gets a value indicating whether or not this element is enabled.
Public propertyLocation
Gets a Point object containing the coordinates of the upper-left corner of this element relative to the upper-left corner of the page.
Public propertyLocationOnScreenOnceScrolledIntoView
Gets the location of an element on the screen, scrolling it into view if it is not currently on the screen.
Public propertySelected
Gets a value indicating whether or not this element is selected.
Public propertySize
Gets a Size object containing the height and width of this element.
Public propertyTagName
Gets the tag name of this element.
Public propertyText
Gets the innerText of this element, without any leading or trailing whitespace, and with other whitespace collapsed.
Public propertyWrappedDriver
Gets the IWebDriver used to find this element.
Public propertyWrappedElement
Gets the IWebElement wrapped by this object.
Top
Methods
  NameDescription
Public methodClear
Clears the content of this element.
Public methodClick
Clicks this element.
Public methodFindElement
Finds the first IWebElement using the given method.
Public methodFindElements
Finds all IWebElements within the current context using the given mechanism.
Public methodGetAttribute
Gets the value of the specified attribute for this element.
Public methodGetCssValue
Gets the value of a CSS property of this element.
Public methodGetDescription
Public methodGetProperty
Gets the value of a JavaScript property of this element.
Public methodGetScreenshot
Gets a Screenshot object representing the image of the page on the screen.
Public methodIsStale
Public methodRegenerateElement
Public methodSendKeys
Simulates typing text into the element.
Public methodSubmit
Submits this element to the web server.
Top
Extension Methods
  NameDescription
Public Extension MethodDelete
Vymaže obsah elementu přes přímou interakci s textovým polem
(Defined by ExtensionMethods.)
Public Extension MethodDeleteAndSendKeys
Vymaže obsah elementu přes přímou interakci s textovým polem a vloží do něj novou hodnotu
(Defined by ExtensionMethods.)
Public Extension MethodDeleteAndSendLongKeys
Vymaže obsah elementu přes přímou interakci s textovým polem a vloží do něj dlouhou novou hodnotu
(Defined by ExtensionMethods.)
Public Extension MethodFindElementOrNull
Najde element a pokud není nalezen, tak vrací místo výjimky null
(Defined by ExtensionMethods.)
Public Extension MethodFindStableElement
Vytvoří stabilní odkaz na html element
(Defined by ExtensionMethods.)
Public Extension MethodGetParent
Metoda vrací rodiče "IWebElement" objektu
(Defined by ExtensionMethods.)
Public Extension MethodHasAttribute
Zkontroluje, zda element obsahuje daný atribut
(Defined by ExtensionMethods.)
Public Extension MethodHasClassOrClassModifier
Metoda ověřuje, zda "IWebElement" objekt obsahuje třídu nebo modifikátor třídy s daným názvem - Příklad použití var randomField = By.CssSelector("..."); IWebElement randomIWebElement = driver.FindElement(randomField); bool result = randomIWebElement.HasClassOrClassModifier("Disabled");
(Defined by ExtensionMethods.)
Public Extension MethodSendKeysToDynamic
Pošle vstup do elementu (podobně jako IWebElement.SendKeys) pouze počítá s tím, že se element může v průběhu psaní překreslit (výkonově náročnější).
(Defined by ExtensionMethods.)
Public Extension MethodSetAttribute
Nastaví elementu atribut na zadanou hodnotu pomocí javascriptu
(Defined by ExtensionMethods.)
Public Extension MethodTryFindElementOrNull(By, Int32)Overloaded.
Pokusí se najít element a pokud není nalezen, tak vrací místo výjimky null
(Defined by ExtensionMethods.)
Public Extension MethodTryFindElementOrNull(By, Int32, Int32)Overloaded.
Pokusí se najít element a pokud není nalezen, tak vrací místo výjimky null
(Defined by ExtensionMethods.)
Public Extension MethodWaitForAttributeValue
Metoda ověřuje, zda má vlastnost objektu "IWebElement" požadovanou hodnotu - Příklad použití var randomFieldInput = By.CssSelector("..."); IWebElement randomIWebElement = driver.FindElement(randomFieldInput); randomIWebElement.WaitForAttributeValue("value", "testValue");
(Defined by ExtensionMethods.)
Public Extension MethodWaitForAttributeValueContains
Metoda ověřuje, zda vlastnost objektu "IWebElement" obsahuje požadovanou hodnotu - Příklad použití var randomFieldInput = By.CssSelector("..."); IWebElement randomIWebElement = driver.FindElement(randomFieldInput); randomIWebElement.WaitForAttributeValueContains("value", "testValue");
(Defined by ExtensionMethods.)
Public Extension MethodWaitForElementAttributeNotPresent
Ověřuje, zda element obsahuje zadaný atribut
(Defined by ExtensionMethods.)
Public Extension MethodWaitForElementAttributePresent
Ověřuje, zda element obsahuje zadaný atribut
(Defined by ExtensionMethods.)
Public Extension MethodWaitForElementClassOrClassModifierNotPresent
Ověřuje, zda element neobsahuje danou třídu nebo modifikátor třídy
(Defined by ExtensionMethods.)
Public Extension MethodWaitForElementClassOrClassModifierPresent
Metoda ověřuje, zda "IWebElement" objekt obsahuje danou třídu nebo modifikátor třídy
(Defined by ExtensionMethods.)
Public Extension MethodWaitForElementEndsWithValue
Ověřuje, zda element obsahuje hodnotu, která končí daným textovým řetězcem
(Defined by ExtensionMethods.)
Public Extension MethodWaitForElementNotValue
Ověřuje, zda má element danou hodnotu
(Defined by ExtensionMethods.)
Public Extension MethodWaitForElementNotVisible
Ověřuje, zda není element viditelný
(Defined by ExtensionMethods.)
Public Extension MethodWaitForElementStartsWithValue
Ověřuje, zda element obsahuje hodnotu, která začíná daným textovým řetězcem
(Defined by ExtensionMethods.)
Public Extension MethodWaitForElementValue
Ověřuje, zda element obsahuje hodnotu, která je shodná s daným textovým řetězcem
(Defined by ExtensionMethods.)
Public Extension MethodWaitForElementVisible
Metoda ověřuje, zda je "IWebElement" objekt viditelný
(Defined by ExtensionMethods.)
Public Extension MethodWaitForInputValue
Ověřuje, zda má element danou hodnotu elementu
(Defined by ExtensionMethods.)
Public Extension MethodWaitForTextContains
Ověří jestlim properta Text obsahuje hledaný řetězec
(Defined by ExtensionMethods.)
Top
See Also