Click-Element
Clicks on the first element whose locator matches the given value.
Powershell
Clicks on the first element whose locator matches the given value.
Syntax
Click-Element [-sessionId
Click-Element [-sessionId
Click-Element [-sessionId
Click-Element -using {ClassName | CssSelector | Id | Name | LinkText | PartialLinkText | TagName | XPath | PredicateString | ClassChain} -value
Parameters
name | description |
---|---|
sessionId | (Optional) The identifier of the session to route the command to. |
elementId | |
xpath | The xpath used to locate elements. |
using | |
value | |
marked | The marked attribute value used to locate elements. |
Examples
Click-Element -xpath "*[@marked='login']"
Click-Element -marked "login"
Click-Element -class "UIView"
C#
Declaration
OpenQA.Selenium.IWebElement::void Click()
Examples
var element = driver.FindElement(By.XPath("//*[@name='test']");
element.Click();
Last modified January 1, 0001