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

ExtensionMethodsHasClass Method

Metoda ověřuje, zda "IWebElement" objekt obsahuje třídu s daným názvem - Příklad použití var randomField = By.CssSelector("..."); IWebElement randomIWebElement = driver.FindElement(randomField); bool result = randomIWebElement.HasClass("Disabled");

Namespace:  TescoSW.MW.UITests.Common
Assembly:  TescoSW.MW.UITests.Common (in TescoSW.MW.UITests.Common.dll) Version: 15.2.7099.36746
Syntax
C#
public static bool HasClass(
	this IWebElement el,
	string className
)

Parameters

el
Type: IWebElement
"IWebElement" objekt
className
Type: SystemString
název ověřované třídy

Return Value

Type: Boolean
pravdivostní hodnota

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IWebElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also