-
Notifications
You must be signed in to change notification settings - Fork 0
click
Clicks the mouse at the last known mouse coordinates or on the specified element. If the click causes a new page to load, the Click method will attempt to block until the page has loaded.
Web, Mobile Web, Mobile Native or any other Web Driver implementation which implements Click.
| Property | Description |
|---|---|
| argument | Plugin conditions and additional information. |
| onElement | The locator value by which the element will be found. |
| locator | The locator type by which the element will be found. |
Repeats the click action until condition is met.
| Value | Description |
|---|---|
| no_alert | If alert pops when clicking is performed, dismiss alert and repeat the click action. |
https://www.w3.org/TR/webdriver/#actions
Can be tested on
Clicks the mouse on the specified element.
{
"action": "Click",
"onElement": "//a[.='Departments']"
}click on {//a[.='Departments']}
// option no.1
var actionRule = new ActionRule
{
Action = PluginsList.Click,
OnElement = "//a[.='Departments']"
};
// option no.2
var actionRule = new
{
Action = "Click",
OnElement = "//a[.='Departments']"
};action_rule = {
"action": "Click",
"onElement": "//a[.='Departments']"
}var actionRule = {
action: "Click",
onElement: "//a[.='Departments']"
};ActionRule actionRule = new ActionRule()
.setAction("Click")
.setOnElement("//a[.='Departments']");Can be tested on
Clicks the mouse at the last known mouse coordinates.
{
"action": "Click"
}click
// option no.1
var actionRule = new ActionRule
{
Action = PluginsList.Click
};
// option no.2
var actionRule = new
{
Action = "Click"
};action_rule = {
"action": "Click"
}var actionRule = {
action: "Click"
};ActionRule actionRule = new ActionRule().setAction("Click");Can be tested on
Clicks the mouse on the specified element. If alert is present after that click, it will be dismissed and the click action repeats. The action repeats until no alert or until page load timeout reached.
This is a Web only action (not for native). This action is currently not supported by the following:
- iOS + Safari
- Internet Explorer 11
{
"action": "Click",
"argument": "{{$ --until:no_alert}}",
"onElement": "pop_alert",
"locator": "Id"
}click {{$ --until:no_alert}} on {pop_alert} using {id}
// option no.1
var actionRule = new ActionRule
{
Action = PluginsList.Click,
Argument = "{{$ --until:no_alert}}",
OnElement = "pop_alert",
Locator = LocatorsList.Id
};
// option no.2
var actionRule = new
{
Action = "Click",
Argument = "{{$ --until:no_alert}}",
OnElement = "pop_alert",
Locator = "Id"
};action_rule = {
"action": "Click",
"argument": "{{$ --until:no_alert}}",
"onElement": "pop_alert",
"locator": "Id"
}var actionRule = {
action: "Click",
argument: "{{$ --until:no_alert}}",
onElement: "pop_alert",
locator: "Id"
};ActionRule actionRule = new ActionRule()
.setAction("Click")
.setArgument("{{$ --until:no_alert}}")
.setOnElement("pop_alert")
.setLocator("Id");