IWebDriverExtensionsFindElementsByPartialText(IWebDriver, String, StringComparison) Method
Finds a list of elements that match the partial text supplied.
Namespace: DevCase.ThirdParty.Selenium.Extensions.IWebDriverExtensionsAssembly: 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 ReadOnlyCollection<IWebElement> FindElementsByPartialText(
this IWebDriver drv,
string text,
StringComparison stringComparison
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function FindElementsByPartialText (
drv As IWebDriver,
text As String,
stringComparison As StringComparison
) As ReadOnlyCollection(Of IWebElement)
Dim drv As IWebDriver
Dim text As String
Dim stringComparison As StringComparison
Dim returnValue As ReadOnlyCollection(Of IWebElement)
returnValue = drv.FindElementsByPartialText(text,
stringComparison)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static ReadOnlyCollection<IWebElement^>^ FindElementsByPartialText(
IWebDriver^ drv,
String^ text,
StringComparison stringComparison
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member FindElementsByPartialText :
drv : IWebDriver *
text : string *
stringComparison : StringComparison -> ReadOnlyCollection<IWebElement>
No code example is currently available or this language may not be supported.
- drv IWebDriver
-
The source IWebDriver.
- text String
-
The partial text to match in the element.
- stringComparison StringComparison
-
Specifies the culture, case, and sort rules to be used.
ReadOnlyCollectionIWebElementReadOnlyCollectionT of Elements that match the object so that you can interact that object.
In Visual Basic and C#, you can call this method as an instance method on any object of type
IWebDriver. 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 elements As ReadOnlyCollection(Of IWebElement) =
drv.FindElementsByPartialText("text", StringComparison.OrdinalIgnoreCase)
For Each element As IWebElement In elements
Console.WriteLine($"({element.Location.ToString()}) '{element.TagName}' Text: {element.Text}")
Loop
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.