Skip to content

Commit ddad95d

Browse files
inancgumusschalksnyman
authored andcommitted
Async frame.hover
1 parent 3da553b commit ddad95d

File tree

1 file changed

+38
-0
lines changed
  • docs/sources/next/javascript-api/k6-browser/frame

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: 'hover(selector[, options])'
3+
description: 'Browser module: frame.hover(selector[, options]) method'
4+
---
5+
6+
# hover(selector[, options])
7+
8+
{{% admonition type="warning" %}}
9+
10+
Use locator-based [`locator.hover([options])`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/hover/) instead.
11+
12+
{{% /admonition %}}
13+
14+
This method hovers over an element matching `selector`.
15+
16+
<TableWithNestedRows>
17+
18+
| Parameter | Type | Default | Description |
19+
| ------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
20+
| selector | string | `''` | A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. |
21+
| options | object | `null` | |
22+
| options.force | boolean | `false` | Setting this to `true` will bypass the actionability checks (`visible`, `stable`, `enabled`). |
23+
| options.modifiers | string[] | `null` | `Alt`, `Control`, `Meta` or `Shift` modifiers keys pressed during the action. If not specified, currently pressed modifiers are used. |
24+
| options.noWaitAfter | boolean | `false` | If set to `true` and a navigation occurs from performing this action, it will not wait for it to complete. |
25+
| options.position | object | `null` | A point to use relative to the top left corner of the element. If not supplied, a visible point of the element is used. |
26+
| options.position.x | number | `0` | The x coordinate. |
27+
| options.position.y | number | `0` | The y coordinate. |
28+
| options.strict | boolean | `false` | When `true`, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. |
29+
| options.timeout | number | `30000` | Maximum time in milliseconds. Pass `0` to disable the timeout. Default is overridden by the `setDefaultTimeout` option on [BrowserContext](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/browsercontext/) or [Page](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/). |
30+
| options.trial | boolean | `false` | Setting this to `true` will perform the actionability checks without performing the action. |
31+
32+
</TableWithNestedRows>
33+
34+
### Returns
35+
36+
| Type | Description |
37+
| --------------- | ---------------------------------------------------------- |
38+
| `Promise<void>` | A Promise that fulfills when the hover action is finished. |

0 commit comments

Comments
 (0)