-
Notifications
You must be signed in to change notification settings - Fork 0
scroll
Scrolls the window or element to a particular set of coordinates inside a given window or element.
Web, Mobile Web.
- https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll
- https://developer.mozilla.org/en-US/docs/Web/API/Window/scroll
| 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. |
| Value | Description |
|---|---|
| number | The pixel along the vertical axis of the document/element that you want displayed in the upper left. |
| Value | Description |
|---|---|
| number | The pixel along the horizontal axis of the document/element that you want displayed in the upper left. |
| Value | Description |
|---|---|
| smooth, auto | Specifies whether the scrolling should animate smoothly, or happen instantly in a single jump. |
https://www.w3.org/TR/webdriver/#execute-script
Can be tested on
Scrolls the page overflow by 1000 pixels from top.
{
"action": "Scroll",
"argument": "1000"
}scroll {1000}
// option no.1
var actionRule = new ActionRule
{
Action = PluginsList.Scroll,
Argument = "1000"
};
// option no.2
var actionRule = new
{
Action = "Scroll",
Argument = "1000"
};action_rule = {
"action": "Scroll",
"argument": "1000"
}var actionRule = {
action: "Scroll",
argument: "1000"
};ActionRule actionRule = new ActionRule()
.setAction("Scroll")
.setArgument("1000");Can be tested on
Scrolls the page overflow by 1000 pixels from top.
{
"action": "Scroll",
"argument": "{{$ --top:1000}}"
}scroll {{$ --top:1000}}
// option no.1
var actionRule = new ActionRule
{
Action = PluginsList.Scroll,
Argument = "{{$ --top:1000}}"
};
// option no.2
var actionRule = new
{
Action = "Scroll",
Argument = "{{$ --top:1000}}"
};action_rule = {
"action": "Scroll",
"argument": "{{$ --top:1000}}"
}var actionRule = {
action: "Scroll",
argument: "{{$ --top:1000}}"
};ActionRule actionRule = new ActionRule()
.setAction("Scroll")
.setArgument("{{$ --top:1000}}");Can be tested on
Scroll the element overflow by 1000 pixels from top.
{
"action": "Scroll",
"argument": "1000",
"onElement": "text_area_enabled",
"locator": "Id"
}scroll {1000} on {text_area_enabled} using {id}
// option no.1
var actionRule = new ActionRule
{
Action = PluginsList.Scroll,
Argument = "1000",
OnElement = "text_area_enabled",
Locator = LocatorsList.Id
};
// option no.2
var actionRule = new
{
Action = "Scroll",
Argument = "1000",
OnElement = "text_area_enabled",
Locator = LocatorsList.Id
};action_rule = {
"action": "Scroll",
"argument": "1000",
"onElement": "text_area_enabled",
"locator": "Id"
}var actionRule = {
"action": "Scroll",
"argument": "1000",
"onElement": "text_area_enabled",
"locator": "Id"
};ActionRule actionRule = new ActionRule()
.setAction("Scroll")
.setArgument("1000")
.setOnElement("text_area_enabled")
.setLocator("Id");Can be tested on
Scroll the element overflow by 1000 pixels from top.
{
"action": "Scroll",
"argument": "{{$ --top:1000}}",
"onElement": "text_area_enabled",
"locator": "Id"
}scroll {{$ --top:1000}} on {text_area_enabled} using {id}
// option no.1
var actionRule = new ActionRule
{
Action = PluginsList.Scroll,
Argument = "{{$ --top:1000}}",
OnElement = "text_area_enabled",
Locator = LocatorsList.Id
};
// option no.2
var actionRule = new
{
Action = "Scroll",
Argument = "{{$ --top:1000}}",
OnElement = "text_area_enabled",
Locator = LocatorsList.Id
};action_rule = {
"action": "Scroll",
"argument": "{{$ --top:1000}}",
"onElement": "text_area_enabled",
"locator": "Id"
}var actionRule = {
"action": "Scroll",
"argument": "{{$ --top:1000}}",
"onElement": "text_area_enabled",
"locator": "Id"
};ActionRule actionRule = new ActionRule()
.setAction("Scroll")
.setArgument("{{$ --top:1000}}")
.setOnElement("text_area_enabled")
.setLocator("Id");Can be tested on
Scroll the element overflow by 1000 pixels from left.
{
"action": "Scroll",
"argument": "{{$ --left:1000}}",
"onElement": "text_area_enabled",
"locator": "Id"
}scroll {{$ --left:1000}} on {text_area_enabled} using {id}
// option no.1
var actionRule = new ActionRule
{
Action = PluginsList.Scroll,
Argument = "{{$ --left:1000}}",
OnElement = "text_area_enabled",
Locator = LocatorsList.Id
};
// option no.2
var actionRule = new
{
Action = "Scroll",
Argument = "{{$ --left:1000}}",
OnElement = "text_area_enabled",
Locator = LocatorsList.Id
};action_rule = {
"action": "Scroll",
"argument": "{{$ --left:1000}}",
"onElement": "text_area_enabled",
"locator": "Id"
}var actionRule = {
"action": "Scroll",
"argument": "{{$ --left:1000}}",
"onElement": "text_area_enabled",
"locator": "Id"
};ActionRule actionRule = new ActionRule()
.setAction("Scroll")
.setArgument("{{$ --left:1000}}")
.setOnElement("text_area_enabled")
.setLocator("Id");Can be tested on
Scroll the element overflow by 1000 pixels from top and 1000 from left.
{
"action": "Scroll",
"argument": "{{$ --top:1000 --left:1000}}",
"onElement": "text_area_enabled",
"locator": "Id"
}scroll {{$ --top:1000 --left:1000}} on {text_area_enabled} using {id}
// option no.1
var actionRule = new ActionRule
{
Action = PluginsList.Scroll,
Argument = "{{$ --top:1000 --left:1000}}",
OnElement = "text_area_enabled",
Locator = LocatorsList.Id
};
// option no.2
var actionRule = new
{
Action = "Scroll",
Argument = "{{$ --top:1000 --left:1000}}",
OnElement = "text_area_enabled",
Locator = LocatorsList.Id
};action_rule = {
"action": "Scroll",
"argument": "{{$ --top:1000 --left:1000}}",
"onElement": "text_area_enabled",
"locator": "Id"
}var actionRule = {
"action": "Scroll",
"argument": "{{$ --top:1000 --left:1000}}",
"onElement": "text_area_enabled",
"locator": "Id"
};ActionRule actionRule = new ActionRule()
.setAction("Scroll")
.setArgument("{{$ --top:1000 --left:1000}}")
.setOnElement("text_area_enabled")
.setLocator("Id");Can be tested on
Smoothly scroll the element overflow by 1000 pixels from top and 1000 from left.
{
"action": "Scroll",
"argument": "{{$ --top:1000 --left:1000 --behavior:smooth}}",
"onElement": "text_area_enabled",
"locator": "Id"
}scroll {{$ --top:1000 --left:1000 --behavior:smooth}} on {text_area_enabled} using {id}
// option no.1
var actionRule = new ActionRule
{
Action = PluginsList.Scroll,
Argument = "{{$ --top:1000 --left:1000 --behavior:smooth}}",
OnElement = "text_area_enabled",
Locator = LocatorsList.Id
};
// option no.2
var actionRule = new
{
Action = "Scroll",
Argument = "{{$ --top:1000 --left:1000 --behavior:smooth}}",
OnElement = "text_area_enabled",
Locator = LocatorsList.Id
};action_rule = {
"action": "Scroll",
"argument": "{{$ --top:1000 --left:1000 --behavior:smooth}}",
"onElement": "text_area_enabled",
"locator": "Id"
}var actionRule = {
"action": "Scroll",
"argument": "{{$ --top:1000 --left:1000 --behavior:smooth}}",
"onElement": "text_area_enabled",
"locator": "Id"
};ActionRule actionRule = new ActionRule()
.setAction("Scroll")
.setArgument("{{$ --top:1000 --left:1000 --behavior:smooth}}")
.setOnElement("text_area_enabled")
.setLocator("Id");Can be tested on
Smoothly scroll the page overflow by 1000 pixels from top.
{
"action": "Scroll",
"argument": "{{$ --top:1000 --behavior:smooth}}"
}scroll {{$ --top:1000 --behavior:smooth}}
// option no.1
var actionRule = new ActionRule
{
Action = PluginsList.Scroll,
Argument = "{{$ --top:1000 --behavior:smooth}}"
};
// option no.2
var actionRule = new
{
Action = "Scroll",
Argument = "{{$ --top:1000 --behavior:smooth}}"
};action_rule = {
"action": "Scroll",
"argument": "{{$ --top:1000 --behavior:smooth}}"
}var actionRule = {
"action": "Scroll",
"argument": "{{$ --top:1000 --behavior:smooth}}"
};ActionRule actionRule = new ActionRule()
.setAction("Scroll")
.setArgument("{{$ --top:1000 --behavior:smooth}}");