IWebElementExtensionsAsWebElement Method
Casts the source IWebElement to WebElement.
Namespace: DevCase.ThirdParty.Selenium.Extensions.IWebElementExtensionsAssembly: DevCase.net48.ThirdParty.Selenium (in DevCase.net48.ThirdParty.Selenium.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static WebElement AsWebElement(
this IWebElement element
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function AsWebElement (
element As IWebElement
) As WebElement
Dim element As IWebElement
Dim returnValue As WebElement
returnValue = element.AsWebElement()
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static WebElement^ AsWebElement(
IWebElement^ element
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member AsWebElement :
element : IWebElement -> WebElement
No code example is currently available or this language may not be supported.
- element IWebElement
-
An IWebElement that represents the element to cast.
WebElement
The resulting
WebElement.
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).
No code example is currently available or this language may not be supported.
Using svc As FirefoxDriverService = FirefoxDriverService.CreateDefaultService(),
drv As New FirefoxDriver(svc)
drv.Navigate().GoToUrl("https://www.domain.com/")
Dim element As WebElement = drv.FindElement(By.Id("name")).AsWebElement()
End Using
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.