 | 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
Syntaxpublic 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:
Booleanpravdivostní 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