Test-Elements

Tests whether elements exist matching the given xpath.

Powershell

Tests whether elements exist matching the given xpath. Test-Elements does not take the implicit timeout into account. Returns: $true or $false depending on the existens of the element. Throws exception when the element is not found because there is a popup present.

Syntax

Test-Elements [-sessionId ] [-xpath] [-ignoreVisibility ] []

Test-Elements [-sessionId ] -using {ClassName | CssSelector | Id | Name | LinkText | PartialLinkText | TagName | XPath | PredicateString | ClassChain} -value [-ignoreVisibility ] []

Parameters

name description
sessionId (Optional) The identifier of the session to route the command to.
xpath The xpath for which to test the element.
using
value
ignoreVisibility (Optional) indicates whether non visible elements should be taken into account.

Examples

Test-Elements -xpath "*[@marked='login']"