@selenium/atoms 4.51.0 → 4.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -0
- package/dist/index.js.map +1 -1
- package/dist/typescript/accessibility-snapshot-wire.d.ts +4 -0
- package/dist/typescript/accessibility-snapshot-wire.d.ts.map +1 -0
- package/dist/typescript/accessibility-snapshot-wire.js +18 -0
- package/dist/typescript/accessibility-snapshot-wire.js.map +1 -0
- package/dist/typescript/accessibility-snapshot.d.ts +3 -0
- package/dist/typescript/accessibility-snapshot.d.ts.map +1 -0
- package/dist/typescript/accessibility-snapshot.js +18 -0
- package/dist/typescript/accessibility-snapshot.js.map +1 -0
- package/dist/typescript/active-element.d.ts +2 -0
- package/dist/typescript/active-element.d.ts.map +1 -0
- package/dist/typescript/active-element.js +19 -0
- package/dist/typescript/active-element.js.map +1 -0
- package/dist/typescript/clear-local-storage.d.ts +3 -0
- package/dist/typescript/clear-local-storage.d.ts.map +1 -0
- package/dist/typescript/clear-local-storage.js +25 -0
- package/dist/typescript/clear-local-storage.js.map +1 -0
- package/dist/typescript/clear-session-storage.d.ts +3 -0
- package/dist/typescript/clear-session-storage.d.ts.map +1 -0
- package/dist/typescript/clear-session-storage.js +25 -0
- package/dist/typescript/clear-session-storage.js.map +1 -0
- package/dist/typescript/clear.d.ts +3 -0
- package/dist/typescript/clear.d.ts.map +1 -0
- package/dist/typescript/clear.js +67 -0
- package/dist/typescript/clear.js.map +1 -0
- package/dist/typescript/click.d.ts +4 -0
- package/dist/typescript/click.d.ts.map +1 -0
- package/dist/typescript/click.js +52 -0
- package/dist/typescript/click.js.map +1 -0
- package/dist/typescript/core/accessibility/accname.d.ts +6 -0
- package/dist/typescript/core/accessibility/accname.d.ts.map +1 -0
- package/dist/typescript/core/accessibility/accname.js +537 -0
- package/dist/typescript/core/accessibility/accname.js.map +1 -0
- package/dist/typescript/core/accessibility/context.d.ts +43 -0
- package/dist/typescript/core/accessibility/context.d.ts.map +1 -0
- package/dist/typescript/core/accessibility/context.js +49 -0
- package/dist/typescript/core/accessibility/context.js.map +1 -0
- package/dist/typescript/core/accessibility/hidden.d.ts +39 -0
- package/dist/typescript/core/accessibility/hidden.d.ts.map +1 -0
- package/dist/typescript/core/accessibility/hidden.js +216 -0
- package/dist/typescript/core/accessibility/hidden.js.map +1 -0
- package/dist/typescript/core/accessibility/roles.d.ts +28 -0
- package/dist/typescript/core/accessibility/roles.d.ts.map +1 -0
- package/dist/typescript/core/accessibility/roles.js +381 -0
- package/dist/typescript/core/accessibility/roles.js.map +1 -0
- package/dist/typescript/core/accessibility/snapshot.d.ts +13 -0
- package/dist/typescript/core/accessibility/snapshot.d.ts.map +1 -0
- package/dist/typescript/core/accessibility/snapshot.js +55 -0
- package/dist/typescript/core/accessibility/snapshot.js.map +1 -0
- package/dist/typescript/core/accessibility/states.d.ts +18 -0
- package/dist/typescript/core/accessibility/states.d.ts.map +1 -0
- package/dist/typescript/core/accessibility/states.js +215 -0
- package/dist/typescript/core/accessibility/states.js.map +1 -0
- package/dist/typescript/core/accessibility/tree.d.ts +10 -0
- package/dist/typescript/core/accessibility/tree.d.ts.map +1 -0
- package/dist/typescript/core/accessibility/tree.js +261 -0
- package/dist/typescript/core/accessibility/tree.js.map +1 -0
- package/dist/typescript/core/accessibility/types.d.ts +30 -0
- package/dist/typescript/core/accessibility/types.d.ts.map +1 -0
- package/dist/typescript/core/accessibility/types.js +18 -0
- package/dist/typescript/core/accessibility/types.js.map +1 -0
- package/dist/typescript/core/accessibility/value.d.ts +4 -0
- package/dist/typescript/core/accessibility/value.d.ts.map +1 -0
- package/dist/typescript/core/accessibility/value.js +83 -0
- package/dist/typescript/core/accessibility/value.js.map +1 -0
- package/dist/typescript/core/accessibility/wire.d.ts +57 -0
- package/dist/typescript/core/accessibility/wire.d.ts.map +1 -0
- package/dist/typescript/core/accessibility/wire.js +72 -0
- package/dist/typescript/core/accessibility/wire.js.map +1 -0
- package/dist/typescript/core/attribute.d.ts +3 -0
- package/dist/typescript/core/attribute.d.ts.map +1 -0
- package/dist/typescript/core/attribute.js +60 -0
- package/dist/typescript/core/attribute.js.map +1 -0
- package/dist/typescript/core/color.d.ts +2 -0
- package/dist/typescript/core/color.d.ts.map +1 -0
- package/dist/typescript/core/color.js +248 -0
- package/dist/typescript/core/color.js.map +1 -0
- package/dist/typescript/core/editable.d.ts +5 -0
- package/dist/typescript/core/editable.d.ts.map +1 -0
- package/dist/typescript/core/editable.js +55 -0
- package/dist/typescript/core/editable.js.map +1 -0
- package/dist/typescript/core/element.d.ts +6 -0
- package/dist/typescript/core/element.d.ts.map +1 -0
- package/dist/typescript/core/element.js +97 -0
- package/dist/typescript/core/element.js.map +1 -0
- package/dist/typescript/core/enabled.d.ts +2 -0
- package/dist/typescript/core/enabled.d.ts.map +1 -0
- package/dist/typescript/core/enabled.js +69 -0
- package/dist/typescript/core/enabled.js.map +1 -0
- package/dist/typescript/core/error.d.ts +13 -0
- package/dist/typescript/core/error.d.ts.map +1 -0
- package/dist/typescript/core/error.js +40 -0
- package/dist/typescript/core/error.js.map +1 -0
- package/dist/typescript/core/events.d.ts +91 -0
- package/dist/typescript/core/events.d.ts.map +1 -0
- package/dist/typescript/core/events.js +131 -0
- package/dist/typescript/core/events.js.map +1 -0
- package/dist/typescript/core/focus.d.ts +4 -0
- package/dist/typescript/core/focus.d.ts.map +1 -0
- package/dist/typescript/core/focus.js +88 -0
- package/dist/typescript/core/focus.js.map +1 -0
- package/dist/typescript/core/focusable.d.ts +2 -0
- package/dist/typescript/core/focusable.d.ts.map +1 -0
- package/dist/typescript/core/focusable.js +36 -0
- package/dist/typescript/core/focusable.js.map +1 -0
- package/dist/typescript/core/form.d.ts +2 -0
- package/dist/typescript/core/form.d.ts.map +1 -0
- package/dist/typescript/core/form.js +76 -0
- package/dist/typescript/core/form.js.map +1 -0
- package/dist/typescript/core/frame.d.ts +8 -0
- package/dist/typescript/core/frame.d.ts.map +1 -0
- package/dist/typescript/core/frame.js +95 -0
- package/dist/typescript/core/frame.js.map +1 -0
- package/dist/typescript/core/geometry.d.ts +28 -0
- package/dist/typescript/core/geometry.d.ts.map +1 -0
- package/dist/typescript/core/geometry.js +134 -0
- package/dist/typescript/core/geometry.js.map +1 -0
- package/dist/typescript/core/inject.d.ts +21 -0
- package/dist/typescript/core/inject.d.ts.map +1 -0
- package/dist/typescript/core/inject.js +282 -0
- package/dist/typescript/core/inject.js.map +1 -0
- package/dist/typescript/core/interactable.d.ts +2 -0
- package/dist/typescript/core/interactable.d.ts.map +1 -0
- package/dist/typescript/core/interactable.js +27 -0
- package/dist/typescript/core/interactable.js.map +1 -0
- package/dist/typescript/core/keyboard.d.ts +15 -0
- package/dist/typescript/core/keyboard.d.ts.map +1 -0
- package/dist/typescript/core/keyboard.js +356 -0
- package/dist/typescript/core/keyboard.js.map +1 -0
- package/dist/typescript/core/keys.d.ts +65 -0
- package/dist/typescript/core/keys.d.ts.map +1 -0
- package/dist/typescript/core/keys.js +125 -0
- package/dist/typescript/core/keys.js.map +1 -0
- package/dist/typescript/core/locators.d.ts +6 -0
- package/dist/typescript/core/locators.d.ts.map +1 -0
- package/dist/typescript/core/locators.js +610 -0
- package/dist/typescript/core/locators.js.map +1 -0
- package/dist/typescript/core/mouse.d.ts +17 -0
- package/dist/typescript/core/mouse.d.ts.map +1 -0
- package/dist/typescript/core/mouse.js +186 -0
- package/dist/typescript/core/mouse.js.map +1 -0
- package/dist/typescript/core/overflow.d.ts +5 -0
- package/dist/typescript/core/overflow.d.ts.map +1 -0
- package/dist/typescript/core/overflow.js +133 -0
- package/dist/typescript/core/overflow.js.map +1 -0
- package/dist/typescript/core/scroll.d.ts +3 -0
- package/dist/typescript/core/scroll.d.ts.map +1 -0
- package/dist/typescript/core/scroll.js +77 -0
- package/dist/typescript/core/scroll.js.map +1 -0
- package/dist/typescript/core/shown.d.ts +3 -0
- package/dist/typescript/core/shown.d.ts.map +1 -0
- package/dist/typescript/core/shown.js +190 -0
- package/dist/typescript/core/shown.js.map +1 -0
- package/dist/typescript/core/storage.d.ts +14 -0
- package/dist/typescript/core/storage.d.ts.map +1 -0
- package/dist/typescript/core/storage.js +98 -0
- package/dist/typescript/core/storage.js.map +1 -0
- package/dist/typescript/core/style.d.ts +2 -0
- package/dist/typescript/core/style.d.ts.map +1 -0
- package/dist/typescript/core/style.js +32 -0
- package/dist/typescript/core/style.js.map +1 -0
- package/dist/typescript/core/useragent.d.ts +3 -0
- package/dist/typescript/core/useragent.d.ts.map +1 -0
- package/dist/typescript/core/useragent.js +31 -0
- package/dist/typescript/core/useragent.js.map +1 -0
- package/dist/typescript/default-content.d.ts +2 -0
- package/dist/typescript/default-content.d.ts.map +1 -0
- package/dist/typescript/default-content.js +20 -0
- package/dist/typescript/default-content.js.map +1 -0
- package/dist/typescript/execute-async-script.d.ts +2 -0
- package/dist/typescript/execute-async-script.d.ts.map +1 -0
- package/dist/typescript/execute-async-script.js +20 -0
- package/dist/typescript/execute-async-script.js.map +1 -0
- package/dist/typescript/execute-script.d.ts +2 -0
- package/dist/typescript/execute-script.d.ts.map +1 -0
- package/dist/typescript/execute-script.js +20 -0
- package/dist/typescript/execute-script.js.map +1 -0
- package/dist/typescript/find-element-fragment.d.ts +8 -0
- package/dist/typescript/find-element-fragment.d.ts.map +1 -0
- package/dist/typescript/find-element-fragment.js +39 -0
- package/dist/typescript/find-element-fragment.js.map +1 -0
- package/dist/typescript/find-element.d.ts +2 -0
- package/dist/typescript/find-element.d.ts.map +1 -0
- package/dist/typescript/find-element.js +18 -0
- package/dist/typescript/find-element.js.map +1 -0
- package/dist/typescript/find-elements.d.ts +1 -2
- package/dist/typescript/find-elements.d.ts.map +1 -1
- package/dist/typescript/find-elements.js +1 -289
- package/dist/typescript/find-elements.js.map +1 -1
- package/dist/typescript/frame-by-id-or-name.d.ts +2 -0
- package/dist/typescript/frame-by-id-or-name.d.ts.map +1 -0
- package/dist/typescript/frame-by-id-or-name.js +22 -0
- package/dist/typescript/frame-by-id-or-name.js.map +1 -0
- package/dist/typescript/frame-by-index.d.ts +2 -0
- package/dist/typescript/frame-by-index.d.ts.map +1 -0
- package/dist/typescript/frame-by-index.js +19 -0
- package/dist/typescript/frame-by-index.js.map +1 -0
- package/dist/typescript/get-attribute-value.d.ts +2 -0
- package/dist/typescript/get-attribute-value.d.ts.map +1 -0
- package/dist/typescript/get-attribute-value.js +22 -0
- package/dist/typescript/get-attribute-value.js.map +1 -0
- package/dist/typescript/get-effective-style.d.ts +3 -0
- package/dist/typescript/get-effective-style.d.ts.map +1 -0
- package/dist/typescript/get-effective-style.js +84 -0
- package/dist/typescript/get-effective-style.js.map +1 -0
- package/dist/typescript/get-element-from-cache.d.ts +2 -0
- package/dist/typescript/get-element-from-cache.d.ts.map +1 -0
- package/dist/typescript/get-element-from-cache.js +20 -0
- package/dist/typescript/get-element-from-cache.js.map +1 -0
- package/dist/typescript/get-frame-window.d.ts +2 -0
- package/dist/typescript/get-frame-window.d.ts.map +1 -0
- package/dist/typescript/get-frame-window.js +22 -0
- package/dist/typescript/get-frame-window.js.map +1 -0
- package/dist/typescript/get-local-storage-item.d.ts +3 -0
- package/dist/typescript/get-local-storage-item.d.ts.map +1 -0
- package/dist/typescript/get-local-storage-item.js +25 -0
- package/dist/typescript/get-local-storage-item.js.map +1 -0
- package/dist/typescript/get-local-storage-key.d.ts +3 -0
- package/dist/typescript/get-local-storage-key.d.ts.map +1 -0
- package/dist/typescript/get-local-storage-key.js +26 -0
- package/dist/typescript/get-local-storage-key.js.map +1 -0
- package/dist/typescript/get-local-storage-keys.d.ts +3 -0
- package/dist/typescript/get-local-storage-keys.d.ts.map +1 -0
- package/dist/typescript/get-local-storage-keys.js +25 -0
- package/dist/typescript/get-local-storage-keys.js.map +1 -0
- package/dist/typescript/get-local-storage-size.d.ts +3 -0
- package/dist/typescript/get-local-storage-size.d.ts.map +1 -0
- package/dist/typescript/get-local-storage-size.js +25 -0
- package/dist/typescript/get-local-storage-size.js.map +1 -0
- package/dist/typescript/get-location.d.ts +9 -0
- package/dist/typescript/get-location.d.ts.map +1 -0
- package/dist/typescript/get-location.js +49 -0
- package/dist/typescript/get-location.js.map +1 -0
- package/dist/typescript/get-session-storage-item.d.ts +3 -0
- package/dist/typescript/get-session-storage-item.d.ts.map +1 -0
- package/dist/typescript/get-session-storage-item.js +25 -0
- package/dist/typescript/get-session-storage-item.js.map +1 -0
- package/dist/typescript/get-session-storage-key.d.ts +3 -0
- package/dist/typescript/get-session-storage-key.d.ts.map +1 -0
- package/dist/typescript/get-session-storage-key.js +26 -0
- package/dist/typescript/get-session-storage-key.js.map +1 -0
- package/dist/typescript/get-session-storage-keys.d.ts +3 -0
- package/dist/typescript/get-session-storage-keys.d.ts.map +1 -0
- package/dist/typescript/get-session-storage-keys.js +25 -0
- package/dist/typescript/get-session-storage-keys.js.map +1 -0
- package/dist/typescript/get-session-storage-size.d.ts +3 -0
- package/dist/typescript/get-session-storage-size.d.ts.map +1 -0
- package/dist/typescript/get-session-storage-size.js +25 -0
- package/dist/typescript/get-session-storage-size.js.map +1 -0
- package/dist/typescript/get-size.d.ts +7 -0
- package/dist/typescript/get-size.d.ts.map +1 -0
- package/dist/typescript/get-size.js +36 -0
- package/dist/typescript/get-size.js.map +1 -0
- package/dist/typescript/get-text.d.ts +3 -0
- package/dist/typescript/get-text.d.ts.map +1 -0
- package/dist/typescript/get-text.js +294 -0
- package/dist/typescript/get-text.js.map +1 -0
- package/dist/typescript/get-top-left-coordinates.d.ts +4 -0
- package/dist/typescript/get-top-left-coordinates.d.ts.map +1 -0
- package/dist/typescript/get-top-left-coordinates.js +36 -0
- package/dist/typescript/get-top-left-coordinates.js.map +1 -0
- package/dist/typescript/is-displayed.d.ts +1 -2
- package/dist/typescript/is-displayed.d.ts.map +1 -1
- package/dist/typescript/is-displayed.js +3 -396
- package/dist/typescript/is-displayed.js.map +1 -1
- package/dist/typescript/is-editable.d.ts +2 -0
- package/dist/typescript/is-editable.d.ts.map +1 -0
- package/dist/typescript/is-editable.js +18 -0
- package/dist/typescript/is-editable.js.map +1 -0
- package/dist/typescript/is-enabled.d.ts +2 -0
- package/dist/typescript/is-enabled.d.ts.map +1 -0
- package/dist/typescript/is-enabled.js +18 -0
- package/dist/typescript/is-enabled.js.map +1 -0
- package/dist/typescript/is-focusable.d.ts +2 -0
- package/dist/typescript/is-focusable.d.ts.map +1 -0
- package/dist/typescript/is-focusable.js +20 -0
- package/dist/typescript/is-focusable.js.map +1 -0
- package/dist/typescript/is-interactable.d.ts +2 -0
- package/dist/typescript/is-interactable.d.ts.map +1 -0
- package/dist/typescript/is-interactable.js +19 -0
- package/dist/typescript/is-interactable.js.map +1 -0
- package/dist/typescript/is-selected.d.ts +3 -0
- package/dist/typescript/is-selected.d.ts.map +1 -0
- package/dist/typescript/is-selected.js +29 -0
- package/dist/typescript/is-selected.js.map +1 -0
- package/dist/typescript/remove-local-storage-item.d.ts +3 -0
- package/dist/typescript/remove-local-storage-item.d.ts.map +1 -0
- package/dist/typescript/remove-local-storage-item.js +25 -0
- package/dist/typescript/remove-local-storage-item.js.map +1 -0
- package/dist/typescript/remove-session-storage-item.d.ts +3 -0
- package/dist/typescript/remove-session-storage-item.d.ts.map +1 -0
- package/dist/typescript/remove-session-storage-item.js +25 -0
- package/dist/typescript/remove-session-storage-item.js.map +1 -0
- package/dist/typescript/set-local-storage-item.d.ts +3 -0
- package/dist/typescript/set-local-storage-item.d.ts.map +1 -0
- package/dist/typescript/set-local-storage-item.js +26 -0
- package/dist/typescript/set-local-storage-item.js.map +1 -0
- package/dist/typescript/set-session-storage-item.d.ts +3 -0
- package/dist/typescript/set-session-storage-item.d.ts.map +1 -0
- package/dist/typescript/set-session-storage-item.js +26 -0
- package/dist/typescript/set-session-storage-item.js.map +1 -0
- package/dist/typescript/submit.d.ts +3 -0
- package/dist/typescript/submit.d.ts.map +1 -0
- package/dist/typescript/submit.js +50 -0
- package/dist/typescript/submit.js.map +1 -0
- package/dist/typescript/type.d.ts +3 -0
- package/dist/typescript/type.d.ts.map +1 -0
- package/dist/typescript/type.js +201 -0
- package/dist/typescript/type.js.map +1 -0
- package/index.ts +44 -0
- package/package.json +306 -5
- package/typescript/accessibility-snapshot-wire.ts +20 -0
- package/typescript/accessibility-snapshot.ts +21 -0
- package/typescript/active-element.ts +19 -0
- package/typescript/clear-local-storage.ts +27 -0
- package/typescript/clear-session-storage.ts +27 -0
- package/typescript/clear.ts +73 -0
- package/typescript/click.ts +55 -0
- package/typescript/core/accessibility/accname.ts +587 -0
- package/typescript/core/accessibility/context.ts +116 -0
- package/typescript/core/accessibility/hidden.ts +242 -0
- package/typescript/core/accessibility/roles.ts +410 -0
- package/typescript/core/accessibility/snapshot.ts +61 -0
- package/typescript/core/accessibility/states.ts +233 -0
- package/typescript/core/accessibility/tree.ts +306 -0
- package/typescript/core/accessibility/types.ts +52 -0
- package/typescript/core/accessibility/value.ts +89 -0
- package/typescript/core/accessibility/wire.ts +123 -0
- package/typescript/core/attribute.ts +68 -0
- package/typescript/core/color.ts +257 -0
- package/typescript/core/editable.ts +63 -0
- package/typescript/core/element.ts +110 -0
- package/typescript/core/enabled.ts +76 -0
- package/typescript/core/error.ts +41 -0
- package/typescript/core/events.ts +268 -0
- package/typescript/core/focus.ts +92 -0
- package/typescript/core/focusable.ts +38 -0
- package/typescript/core/form.ts +81 -0
- package/typescript/core/frame.ts +105 -0
- package/typescript/core/geometry.ts +183 -0
- package/typescript/core/inject.ts +336 -0
- package/typescript/core/interactable.ts +30 -0
- package/typescript/core/keyboard.ts +369 -0
- package/typescript/core/keys.ts +204 -0
- package/typescript/core/locators.ts +704 -0
- package/typescript/core/mouse.ts +211 -0
- package/typescript/core/overflow.ts +172 -0
- package/typescript/core/scroll.ts +92 -0
- package/typescript/core/shown.ts +233 -0
- package/typescript/core/storage.ts +111 -0
- package/typescript/core/style.ts +32 -0
- package/typescript/core/useragent.ts +33 -0
- package/typescript/default-content.ts +20 -0
- package/typescript/execute-async-script.ts +20 -0
- package/typescript/execute-script.ts +20 -0
- package/typescript/find-element-fragment.ts +45 -0
- package/typescript/find-element.ts +18 -0
- package/typescript/find-elements.ts +1 -326
- package/typescript/frame-by-id-or-name.ts +22 -0
- package/typescript/frame-by-index.ts +19 -0
- package/typescript/get-attribute-value.ts +22 -0
- package/typescript/get-effective-style.ts +93 -0
- package/typescript/get-element-from-cache.ts +20 -0
- package/typescript/get-frame-window.ts +22 -0
- package/typescript/get-local-storage-item.ts +27 -0
- package/typescript/get-local-storage-key.ts +28 -0
- package/typescript/get-local-storage-keys.ts +27 -0
- package/typescript/get-local-storage-size.ts +27 -0
- package/typescript/get-location.ts +63 -0
- package/typescript/get-session-storage-item.ts +27 -0
- package/typescript/get-session-storage-key.ts +28 -0
- package/typescript/get-session-storage-keys.ts +27 -0
- package/typescript/get-session-storage-size.ts +27 -0
- package/typescript/get-size.ts +43 -0
- package/typescript/get-text.ts +353 -0
- package/typescript/get-top-left-coordinates.ts +38 -0
- package/typescript/is-displayed.ts +3 -498
- package/typescript/is-editable.ts +18 -0
- package/typescript/is-enabled.ts +18 -0
- package/typescript/is-focusable.ts +20 -0
- package/typescript/is-interactable.ts +19 -0
- package/typescript/is-selected.ts +31 -0
- package/typescript/remove-local-storage-item.ts +27 -0
- package/typescript/remove-session-storage-item.ts +27 -0
- package/typescript/set-local-storage-item.ts +28 -0
- package/typescript/set-session-storage-item.ts +28 -0
- package/typescript/submit.ts +53 -0
- package/typescript/type.ts +210 -0
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selenium/atoms",
|
|
3
|
-
"version": "4.51.0",
|
|
4
3
|
"description": "Browser injection atoms for Selenium WebDriver",
|
|
5
4
|
"type": "module",
|
|
6
5
|
"main": "./dist/index.js",
|
|
@@ -19,16 +18,316 @@
|
|
|
19
18
|
"types": "./dist/typescript/find-elements.d.ts",
|
|
20
19
|
"default": "./dist/typescript/find-elements.js"
|
|
21
20
|
},
|
|
21
|
+
"./find-element": {
|
|
22
|
+
"types": "./dist/typescript/find-element.d.ts",
|
|
23
|
+
"default": "./dist/typescript/find-element.js"
|
|
24
|
+
},
|
|
25
|
+
"./active-element": {
|
|
26
|
+
"types": "./dist/typescript/active-element.d.ts",
|
|
27
|
+
"default": "./dist/typescript/active-element.js"
|
|
28
|
+
},
|
|
29
|
+
"./default-content": {
|
|
30
|
+
"types": "./dist/typescript/default-content.d.ts",
|
|
31
|
+
"default": "./dist/typescript/default-content.js"
|
|
32
|
+
},
|
|
33
|
+
"./frame-by-id-or-name": {
|
|
34
|
+
"types": "./dist/typescript/frame-by-id-or-name.d.ts",
|
|
35
|
+
"default": "./dist/typescript/frame-by-id-or-name.js"
|
|
36
|
+
},
|
|
37
|
+
"./frame-by-index": {
|
|
38
|
+
"types": "./dist/typescript/frame-by-index.d.ts",
|
|
39
|
+
"default": "./dist/typescript/frame-by-index.js"
|
|
40
|
+
},
|
|
41
|
+
"./get-frame-window": {
|
|
42
|
+
"types": "./dist/typescript/get-frame-window.d.ts",
|
|
43
|
+
"default": "./dist/typescript/get-frame-window.js"
|
|
44
|
+
},
|
|
22
45
|
"./is-displayed": {
|
|
23
46
|
"types": "./dist/typescript/is-displayed.d.ts",
|
|
24
47
|
"default": "./dist/typescript/is-displayed.js"
|
|
48
|
+
},
|
|
49
|
+
"./is-enabled": {
|
|
50
|
+
"types": "./dist/typescript/is-enabled.d.ts",
|
|
51
|
+
"default": "./dist/typescript/is-enabled.js"
|
|
52
|
+
},
|
|
53
|
+
"./is-selected": {
|
|
54
|
+
"types": "./dist/typescript/is-selected.d.ts",
|
|
55
|
+
"default": "./dist/typescript/is-selected.js"
|
|
56
|
+
},
|
|
57
|
+
"./is-editable": {
|
|
58
|
+
"types": "./dist/typescript/is-editable.d.ts",
|
|
59
|
+
"default": "./dist/typescript/is-editable.js"
|
|
60
|
+
},
|
|
61
|
+
"./is-focusable": {
|
|
62
|
+
"types": "./dist/typescript/is-focusable.d.ts",
|
|
63
|
+
"default": "./dist/typescript/is-focusable.js"
|
|
64
|
+
},
|
|
65
|
+
"./is-interactable": {
|
|
66
|
+
"types": "./dist/typescript/is-interactable.d.ts",
|
|
67
|
+
"default": "./dist/typescript/is-interactable.js"
|
|
68
|
+
},
|
|
69
|
+
"./get-attribute-value": {
|
|
70
|
+
"types": "./dist/typescript/get-attribute-value.d.ts",
|
|
71
|
+
"default": "./dist/typescript/get-attribute-value.js"
|
|
72
|
+
},
|
|
73
|
+
"./get-size": {
|
|
74
|
+
"types": "./dist/typescript/get-size.d.ts",
|
|
75
|
+
"default": "./dist/typescript/get-size.js"
|
|
76
|
+
},
|
|
77
|
+
"./get-location": {
|
|
78
|
+
"types": "./dist/typescript/get-location.d.ts",
|
|
79
|
+
"default": "./dist/typescript/get-location.js"
|
|
80
|
+
},
|
|
81
|
+
"./get-effective-style": {
|
|
82
|
+
"types": "./dist/typescript/get-effective-style.d.ts",
|
|
83
|
+
"default": "./dist/typescript/get-effective-style.js"
|
|
84
|
+
},
|
|
85
|
+
"./get-value-of-css-property": {
|
|
86
|
+
"types": "./dist/typescript/get-effective-style.d.ts",
|
|
87
|
+
"default": "./dist/typescript/get-effective-style.js"
|
|
88
|
+
},
|
|
89
|
+
"./get-top-left-coordinates": {
|
|
90
|
+
"types": "./dist/typescript/get-top-left-coordinates.d.ts",
|
|
91
|
+
"default": "./dist/typescript/get-top-left-coordinates.js"
|
|
92
|
+
},
|
|
93
|
+
"./get-text": {
|
|
94
|
+
"types": "./dist/typescript/get-text.d.ts",
|
|
95
|
+
"default": "./dist/typescript/get-text.js"
|
|
96
|
+
},
|
|
97
|
+
"./get-local-storage-item": {
|
|
98
|
+
"types": "./dist/typescript/get-local-storage-item.d.ts",
|
|
99
|
+
"default": "./dist/typescript/get-local-storage-item.js"
|
|
100
|
+
},
|
|
101
|
+
"./get-local-storage-key": {
|
|
102
|
+
"types": "./dist/typescript/get-local-storage-key.d.ts",
|
|
103
|
+
"default": "./dist/typescript/get-local-storage-key.js"
|
|
104
|
+
},
|
|
105
|
+
"./get-local-storage-keys": {
|
|
106
|
+
"types": "./dist/typescript/get-local-storage-keys.d.ts",
|
|
107
|
+
"default": "./dist/typescript/get-local-storage-keys.js"
|
|
108
|
+
},
|
|
109
|
+
"./get-local-storage-size": {
|
|
110
|
+
"types": "./dist/typescript/get-local-storage-size.d.ts",
|
|
111
|
+
"default": "./dist/typescript/get-local-storage-size.js"
|
|
112
|
+
},
|
|
113
|
+
"./set-local-storage-item": {
|
|
114
|
+
"types": "./dist/typescript/set-local-storage-item.d.ts",
|
|
115
|
+
"default": "./dist/typescript/set-local-storage-item.js"
|
|
116
|
+
},
|
|
117
|
+
"./remove-local-storage-item": {
|
|
118
|
+
"types": "./dist/typescript/remove-local-storage-item.d.ts",
|
|
119
|
+
"default": "./dist/typescript/remove-local-storage-item.js"
|
|
120
|
+
},
|
|
121
|
+
"./clear-local-storage": {
|
|
122
|
+
"types": "./dist/typescript/clear-local-storage.d.ts",
|
|
123
|
+
"default": "./dist/typescript/clear-local-storage.js"
|
|
124
|
+
},
|
|
125
|
+
"./get-session-storage-item": {
|
|
126
|
+
"types": "./dist/typescript/get-session-storage-item.d.ts",
|
|
127
|
+
"default": "./dist/typescript/get-session-storage-item.js"
|
|
128
|
+
},
|
|
129
|
+
"./get-session-storage-key": {
|
|
130
|
+
"types": "./dist/typescript/get-session-storage-key.d.ts",
|
|
131
|
+
"default": "./dist/typescript/get-session-storage-key.js"
|
|
132
|
+
},
|
|
133
|
+
"./get-session-storage-keys": {
|
|
134
|
+
"types": "./dist/typescript/get-session-storage-keys.d.ts",
|
|
135
|
+
"default": "./dist/typescript/get-session-storage-keys.js"
|
|
136
|
+
},
|
|
137
|
+
"./get-session-storage-size": {
|
|
138
|
+
"types": "./dist/typescript/get-session-storage-size.d.ts",
|
|
139
|
+
"default": "./dist/typescript/get-session-storage-size.js"
|
|
140
|
+
},
|
|
141
|
+
"./set-session-storage-item": {
|
|
142
|
+
"types": "./dist/typescript/set-session-storage-item.d.ts",
|
|
143
|
+
"default": "./dist/typescript/set-session-storage-item.js"
|
|
144
|
+
},
|
|
145
|
+
"./remove-session-storage-item": {
|
|
146
|
+
"types": "./dist/typescript/remove-session-storage-item.d.ts",
|
|
147
|
+
"default": "./dist/typescript/remove-session-storage-item.js"
|
|
148
|
+
},
|
|
149
|
+
"./clear-session-storage": {
|
|
150
|
+
"types": "./dist/typescript/clear-session-storage.d.ts",
|
|
151
|
+
"default": "./dist/typescript/clear-session-storage.js"
|
|
152
|
+
},
|
|
153
|
+
"./execute-script": {
|
|
154
|
+
"types": "./dist/typescript/execute-script.d.ts",
|
|
155
|
+
"default": "./dist/typescript/execute-script.js"
|
|
156
|
+
},
|
|
157
|
+
"./execute-async-script": {
|
|
158
|
+
"types": "./dist/typescript/execute-async-script.d.ts",
|
|
159
|
+
"default": "./dist/typescript/execute-async-script.js"
|
|
160
|
+
},
|
|
161
|
+
"./get-element-from-cache": {
|
|
162
|
+
"types": "./dist/typescript/get-element-from-cache.d.ts",
|
|
163
|
+
"default": "./dist/typescript/get-element-from-cache.js"
|
|
164
|
+
},
|
|
165
|
+
"./find-element-fragment": {
|
|
166
|
+
"types": "./dist/typescript/find-element-fragment.d.ts",
|
|
167
|
+
"default": "./dist/typescript/find-element-fragment.js"
|
|
168
|
+
},
|
|
169
|
+
"./click": {
|
|
170
|
+
"types": "./dist/typescript/click.d.ts",
|
|
171
|
+
"default": "./dist/typescript/click.js"
|
|
172
|
+
},
|
|
173
|
+
"./type": {
|
|
174
|
+
"types": "./dist/typescript/type.d.ts",
|
|
175
|
+
"default": "./dist/typescript/type.js"
|
|
176
|
+
},
|
|
177
|
+
"./clear": {
|
|
178
|
+
"types": "./dist/typescript/clear.d.ts",
|
|
179
|
+
"default": "./dist/typescript/clear.js"
|
|
180
|
+
},
|
|
181
|
+
"./submit": {
|
|
182
|
+
"types": "./dist/typescript/submit.d.ts",
|
|
183
|
+
"default": "./dist/typescript/submit.js"
|
|
184
|
+
},
|
|
185
|
+
"./accessibility-snapshot": {
|
|
186
|
+
"types": "./dist/typescript/accessibility-snapshot.d.ts",
|
|
187
|
+
"default": "./dist/typescript/accessibility-snapshot.js"
|
|
188
|
+
},
|
|
189
|
+
"./accessibility-snapshot-wire": {
|
|
190
|
+
"types": "./dist/typescript/accessibility-snapshot-wire.d.ts",
|
|
191
|
+
"default": "./dist/typescript/accessibility-snapshot-wire.js"
|
|
25
192
|
}
|
|
26
193
|
},
|
|
27
194
|
"typesVersions": {
|
|
28
195
|
"*": {
|
|
29
|
-
"get-attribute": [
|
|
30
|
-
|
|
31
|
-
|
|
196
|
+
"get-attribute": [
|
|
197
|
+
"./dist/typescript/get-attribute.d.ts"
|
|
198
|
+
],
|
|
199
|
+
"find-elements": [
|
|
200
|
+
"./dist/typescript/find-elements.d.ts"
|
|
201
|
+
],
|
|
202
|
+
"find-element": [
|
|
203
|
+
"./dist/typescript/find-element.d.ts"
|
|
204
|
+
],
|
|
205
|
+
"active-element": [
|
|
206
|
+
"./dist/typescript/active-element.d.ts"
|
|
207
|
+
],
|
|
208
|
+
"default-content": [
|
|
209
|
+
"./dist/typescript/default-content.d.ts"
|
|
210
|
+
],
|
|
211
|
+
"frame-by-id-or-name": [
|
|
212
|
+
"./dist/typescript/frame-by-id-or-name.d.ts"
|
|
213
|
+
],
|
|
214
|
+
"frame-by-index": [
|
|
215
|
+
"./dist/typescript/frame-by-index.d.ts"
|
|
216
|
+
],
|
|
217
|
+
"get-frame-window": [
|
|
218
|
+
"./dist/typescript/get-frame-window.d.ts"
|
|
219
|
+
],
|
|
220
|
+
"is-displayed": [
|
|
221
|
+
"./dist/typescript/is-displayed.d.ts"
|
|
222
|
+
],
|
|
223
|
+
"is-enabled": [
|
|
224
|
+
"./dist/typescript/is-enabled.d.ts"
|
|
225
|
+
],
|
|
226
|
+
"is-selected": [
|
|
227
|
+
"./dist/typescript/is-selected.d.ts"
|
|
228
|
+
],
|
|
229
|
+
"is-editable": [
|
|
230
|
+
"./dist/typescript/is-editable.d.ts"
|
|
231
|
+
],
|
|
232
|
+
"is-focusable": [
|
|
233
|
+
"./dist/typescript/is-focusable.d.ts"
|
|
234
|
+
],
|
|
235
|
+
"is-interactable": [
|
|
236
|
+
"./dist/typescript/is-interactable.d.ts"
|
|
237
|
+
],
|
|
238
|
+
"get-attribute-value": [
|
|
239
|
+
"./dist/typescript/get-attribute-value.d.ts"
|
|
240
|
+
],
|
|
241
|
+
"get-size": [
|
|
242
|
+
"./dist/typescript/get-size.d.ts"
|
|
243
|
+
],
|
|
244
|
+
"get-location": [
|
|
245
|
+
"./dist/typescript/get-location.d.ts"
|
|
246
|
+
],
|
|
247
|
+
"get-effective-style": [
|
|
248
|
+
"./dist/typescript/get-effective-style.d.ts"
|
|
249
|
+
],
|
|
250
|
+
"get-value-of-css-property": [
|
|
251
|
+
"./dist/typescript/get-effective-style.d.ts"
|
|
252
|
+
],
|
|
253
|
+
"get-top-left-coordinates": [
|
|
254
|
+
"./dist/typescript/get-top-left-coordinates.d.ts"
|
|
255
|
+
],
|
|
256
|
+
"get-text": [
|
|
257
|
+
"./dist/typescript/get-text.d.ts"
|
|
258
|
+
],
|
|
259
|
+
"get-local-storage-item": [
|
|
260
|
+
"./dist/typescript/get-local-storage-item.d.ts"
|
|
261
|
+
],
|
|
262
|
+
"get-local-storage-key": [
|
|
263
|
+
"./dist/typescript/get-local-storage-key.d.ts"
|
|
264
|
+
],
|
|
265
|
+
"get-local-storage-keys": [
|
|
266
|
+
"./dist/typescript/get-local-storage-keys.d.ts"
|
|
267
|
+
],
|
|
268
|
+
"get-local-storage-size": [
|
|
269
|
+
"./dist/typescript/get-local-storage-size.d.ts"
|
|
270
|
+
],
|
|
271
|
+
"set-local-storage-item": [
|
|
272
|
+
"./dist/typescript/set-local-storage-item.d.ts"
|
|
273
|
+
],
|
|
274
|
+
"remove-local-storage-item": [
|
|
275
|
+
"./dist/typescript/remove-local-storage-item.d.ts"
|
|
276
|
+
],
|
|
277
|
+
"clear-local-storage": [
|
|
278
|
+
"./dist/typescript/clear-local-storage.d.ts"
|
|
279
|
+
],
|
|
280
|
+
"get-session-storage-item": [
|
|
281
|
+
"./dist/typescript/get-session-storage-item.d.ts"
|
|
282
|
+
],
|
|
283
|
+
"get-session-storage-key": [
|
|
284
|
+
"./dist/typescript/get-session-storage-key.d.ts"
|
|
285
|
+
],
|
|
286
|
+
"get-session-storage-keys": [
|
|
287
|
+
"./dist/typescript/get-session-storage-keys.d.ts"
|
|
288
|
+
],
|
|
289
|
+
"get-session-storage-size": [
|
|
290
|
+
"./dist/typescript/get-session-storage-size.d.ts"
|
|
291
|
+
],
|
|
292
|
+
"set-session-storage-item": [
|
|
293
|
+
"./dist/typescript/set-session-storage-item.d.ts"
|
|
294
|
+
],
|
|
295
|
+
"remove-session-storage-item": [
|
|
296
|
+
"./dist/typescript/remove-session-storage-item.d.ts"
|
|
297
|
+
],
|
|
298
|
+
"clear-session-storage": [
|
|
299
|
+
"./dist/typescript/clear-session-storage.d.ts"
|
|
300
|
+
],
|
|
301
|
+
"execute-script": [
|
|
302
|
+
"./dist/typescript/execute-script.d.ts"
|
|
303
|
+
],
|
|
304
|
+
"execute-async-script": [
|
|
305
|
+
"./dist/typescript/execute-async-script.d.ts"
|
|
306
|
+
],
|
|
307
|
+
"get-element-from-cache": [
|
|
308
|
+
"./dist/typescript/get-element-from-cache.d.ts"
|
|
309
|
+
],
|
|
310
|
+
"find-element-fragment": [
|
|
311
|
+
"./dist/typescript/find-element-fragment.d.ts"
|
|
312
|
+
],
|
|
313
|
+
"click": [
|
|
314
|
+
"./dist/typescript/click.d.ts"
|
|
315
|
+
],
|
|
316
|
+
"type": [
|
|
317
|
+
"./dist/typescript/type.d.ts"
|
|
318
|
+
],
|
|
319
|
+
"clear": [
|
|
320
|
+
"./dist/typescript/clear.d.ts"
|
|
321
|
+
],
|
|
322
|
+
"submit": [
|
|
323
|
+
"./dist/typescript/submit.d.ts"
|
|
324
|
+
],
|
|
325
|
+
"accessibility-snapshot": [
|
|
326
|
+
"./dist/typescript/accessibility-snapshot.d.ts"
|
|
327
|
+
],
|
|
328
|
+
"accessibility-snapshot-wire": [
|
|
329
|
+
"./dist/typescript/accessibility-snapshot-wire.d.ts"
|
|
330
|
+
]
|
|
32
331
|
}
|
|
33
332
|
},
|
|
34
333
|
"engines": {
|
|
@@ -38,6 +337,7 @@
|
|
|
38
337
|
"dist/",
|
|
39
338
|
"index.ts",
|
|
40
339
|
"typescript/",
|
|
340
|
+
"!typescript/testing/",
|
|
41
341
|
"LICENSE",
|
|
42
342
|
"NOTICE",
|
|
43
343
|
"README.md"
|
|
@@ -51,5 +351,6 @@
|
|
|
51
351
|
"access": "public",
|
|
52
352
|
"registry": "https://registry.npmjs.org/"
|
|
53
353
|
},
|
|
54
|
-
"license": "Apache-2.0"
|
|
354
|
+
"license": "Apache-2.0",
|
|
355
|
+
"version": "4.53.0"
|
|
55
356
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
// or more contributor license agreements. See the NOTICE file
|
|
3
|
+
// distributed with this work for additional information
|
|
4
|
+
// regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
// to you under the Apache License, Version 2.0 (the
|
|
6
|
+
// "License"); you may not use this file except in compliance
|
|
7
|
+
// with the License. You may obtain a copy of the License at
|
|
8
|
+
//
|
|
9
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
//
|
|
11
|
+
// Unless required by applicable law or agreed to in writing,
|
|
12
|
+
// software distributed under the License is distributed on an
|
|
13
|
+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
// KIND, either express or implied. See the License for the
|
|
15
|
+
// specific language governing permissions and limitations
|
|
16
|
+
// under the License.
|
|
17
|
+
|
|
18
|
+
export type { SnapshotOptions } from './core/accessibility/types.js'
|
|
19
|
+
export type { WireError, WireNode, WireSnapshot } from './core/accessibility/wire.js'
|
|
20
|
+
export { default } from './core/accessibility/wire.js'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
// or more contributor license agreements. See the NOTICE file
|
|
3
|
+
// distributed with this work for additional information
|
|
4
|
+
// regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
// to you under the Apache License, Version 2.0 (the
|
|
6
|
+
// "License"); you may not use this file except in compliance
|
|
7
|
+
// with the License. You may obtain a copy of the License at
|
|
8
|
+
//
|
|
9
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
//
|
|
11
|
+
// Unless required by applicable law or agreed to in writing,
|
|
12
|
+
// software distributed under the License is distributed on an
|
|
13
|
+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
// KIND, either express or implied. See the License for the
|
|
15
|
+
// specific language governing permissions and limitations
|
|
16
|
+
// under the License.
|
|
17
|
+
|
|
18
|
+
// The implementation lives in core/accessibility/ because it spans several
|
|
19
|
+
// modules; an atom entry point only re-exports.
|
|
20
|
+
export type { AccessibilityNode, SnapshotOptions, StateValue } from './core/accessibility/types.js'
|
|
21
|
+
export { default } from './core/accessibility/snapshot.js'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
// or more contributor license agreements. See the NOTICE file
|
|
3
|
+
// distributed with this work for additional information
|
|
4
|
+
// regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
// to you under the Apache License, Version 2.0 (the
|
|
6
|
+
// "License"); you may not use this file except in compliance
|
|
7
|
+
// with the License. You may obtain a copy of the License at
|
|
8
|
+
//
|
|
9
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
//
|
|
11
|
+
// Unless required by applicable law or agreed to in writing,
|
|
12
|
+
// software distributed under the License is distributed on an
|
|
13
|
+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
// KIND, either express or implied. See the License for the
|
|
15
|
+
// specific language governing permissions and limitations
|
|
16
|
+
// under the License.
|
|
17
|
+
|
|
18
|
+
// The focused element, or the body when nothing is focused.
|
|
19
|
+
export { activeElement as default } from './core/frame.js'
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
// or more contributor license agreements. See the NOTICE file
|
|
3
|
+
// distributed with this work for additional information
|
|
4
|
+
// regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
// to you under the Apache License, Version 2.0 (the
|
|
6
|
+
// "License"); you may not use this file except in compliance
|
|
7
|
+
// with the License. You may obtain a copy of the License at
|
|
8
|
+
//
|
|
9
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
//
|
|
11
|
+
// Unless required by applicable law or agreed to in writing,
|
|
12
|
+
// software distributed under the License is distributed on an
|
|
13
|
+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
// KIND, either express or implied. See the License for the
|
|
15
|
+
// specific language governing permissions and limitations
|
|
16
|
+
// under the License.
|
|
17
|
+
|
|
18
|
+
import { getLocalStorage } from './core/storage.js'
|
|
19
|
+
|
|
20
|
+
// Empties the store.
|
|
21
|
+
//
|
|
22
|
+
// optWindow targets a frame other than the one the atom is running in.
|
|
23
|
+
function clearLocalStorage(optWindow?: Window): void {
|
|
24
|
+
getLocalStorage(optWindow).clear()
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default clearLocalStorage
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
// or more contributor license agreements. See the NOTICE file
|
|
3
|
+
// distributed with this work for additional information
|
|
4
|
+
// regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
// to you under the Apache License, Version 2.0 (the
|
|
6
|
+
// "License"); you may not use this file except in compliance
|
|
7
|
+
// with the License. You may obtain a copy of the License at
|
|
8
|
+
//
|
|
9
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
//
|
|
11
|
+
// Unless required by applicable law or agreed to in writing,
|
|
12
|
+
// software distributed under the License is distributed on an
|
|
13
|
+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
// KIND, either express or implied. See the License for the
|
|
15
|
+
// specific language governing permissions and limitations
|
|
16
|
+
// under the License.
|
|
17
|
+
|
|
18
|
+
import { getSessionStorage } from './core/storage.js'
|
|
19
|
+
|
|
20
|
+
// Empties the store.
|
|
21
|
+
//
|
|
22
|
+
// optWindow targets a frame other than the one the atom is running in.
|
|
23
|
+
function clearSessionStorage(optWindow?: Window): void {
|
|
24
|
+
getSessionStorage(optWindow).clear()
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default clearSessionStorage
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
// or more contributor license agreements. See the NOTICE file
|
|
3
|
+
// distributed with this work for additional information
|
|
4
|
+
// regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
// to you under the Apache License, Version 2.0 (the
|
|
6
|
+
// "License"); you may not use this file except in compliance
|
|
7
|
+
// with the License. You may obtain a copy of the License at
|
|
8
|
+
//
|
|
9
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
//
|
|
11
|
+
// Unless required by applicable law or agreed to in writing,
|
|
12
|
+
// software distributed under the License is distributed on an
|
|
13
|
+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
// KIND, either express or implied. See the License for the
|
|
15
|
+
// specific language governing permissions and limitations
|
|
16
|
+
// under the License.
|
|
17
|
+
|
|
18
|
+
import { isContentEditable, isEditable } from './core/editable.js'
|
|
19
|
+
import { ELEMENT_NOT_INTERACTABLE, INVALID_ELEMENT_STATE, botError } from './core/error.js'
|
|
20
|
+
import { EventType, fire } from './core/events.js'
|
|
21
|
+
import { focusOnElement } from './core/focus.js'
|
|
22
|
+
import { isInteractable } from './core/interactable.js'
|
|
23
|
+
|
|
24
|
+
type TextField = HTMLInputElement | HTMLTextAreaElement
|
|
25
|
+
|
|
26
|
+
// Empties an editable element the way W3C Element Clear does: focus it, empty
|
|
27
|
+
// it, then take focus away so the page sees the edit committed.
|
|
28
|
+
//
|
|
29
|
+
// Differences from bot.action.clear, toward what clearing by hand produces:
|
|
30
|
+
// - input fires before change; bot.action.clear fired change alone. Its
|
|
31
|
+
// inputType is what select-all then Backspace reports: neither engine keeps
|
|
32
|
+
// the spec's generic "deleteContent" on a constructed InputEvent.
|
|
33
|
+
// - A number field holding unparseable text (value reads as "") is detected
|
|
34
|
+
// by validity.badInput rather than the type attribute, and gets the same
|
|
35
|
+
// events and blur as any other field.
|
|
36
|
+
// - contenteditable is emptied outright and fires input. The single space
|
|
37
|
+
// bot.action.clear left behind in Firefox kept the caret alive in Firefox 3.
|
|
38
|
+
// - The IE range-input and blur branches are gone.
|
|
39
|
+
function clear(element: Element): void {
|
|
40
|
+
if (!isInteractable(element)) {
|
|
41
|
+
throw botError(ELEMENT_NOT_INTERACTABLE, 'Element is not currently interactable and may not be manipulated')
|
|
42
|
+
}
|
|
43
|
+
if (!isEditable(element)) {
|
|
44
|
+
throw botError(INVALID_ELEMENT_STATE, 'Element must be user-editable in order to clear it.')
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (isContentEditable(element)) {
|
|
48
|
+
if (element.textContent || element.children.length) {
|
|
49
|
+
focusOnElement(element)
|
|
50
|
+
element.textContent = ''
|
|
51
|
+
fire(element, EventType.INPUT, { inputType: 'deleteContentBackward', data: null })
|
|
52
|
+
unfocus(element)
|
|
53
|
+
}
|
|
54
|
+
return
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const field = element as TextField
|
|
58
|
+
const badInput = !!(field as HTMLInputElement).validity?.badInput
|
|
59
|
+
if (field.value || badInput) {
|
|
60
|
+
focusOnElement(field)
|
|
61
|
+
field.value = ''
|
|
62
|
+
fire(field, EventType.INPUT, { inputType: 'deleteContentBackward', data: null })
|
|
63
|
+
fire(field, EventType.CHANGE, undefined)
|
|
64
|
+
unfocus(field)
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Focusing the body cannot take focus, so this blurs whatever has it.
|
|
69
|
+
function unfocus(element: Element): void {
|
|
70
|
+
focusOnElement(element.ownerDocument.body)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export default clear
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
// or more contributor license agreements. See the NOTICE file
|
|
3
|
+
// distributed with this work for additional information
|
|
4
|
+
// regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
// to you under the Apache License, Version 2.0 (the
|
|
6
|
+
// "License"); you may not use this file except in compliance
|
|
7
|
+
// with the License. You may obtain a copy of the License at
|
|
8
|
+
//
|
|
9
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
//
|
|
11
|
+
// Unless required by applicable law or agreed to in writing,
|
|
12
|
+
// software distributed under the License is distributed on an
|
|
13
|
+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
// KIND, either express or implied. See the License for the
|
|
15
|
+
// specific language governing permissions and limitations
|
|
16
|
+
// under the License.
|
|
17
|
+
|
|
18
|
+
import { ELEMENT_NOT_INTERACTABLE, botError } from './core/error.js'
|
|
19
|
+
import { type Coordinate, getClientRect } from './core/geometry.js'
|
|
20
|
+
import { Mouse } from './core/mouse.js'
|
|
21
|
+
import { scrollIntoView } from './core/scroll.js'
|
|
22
|
+
import isShown from './core/shown.js'
|
|
23
|
+
|
|
24
|
+
// Clicks the element with the primary button: scrolls it into view, moves a
|
|
25
|
+
// fresh mouse to `optCoords` (relative to the element's top-left) or its
|
|
26
|
+
// centre, presses and releases. See core/mouse.ts for the events produced.
|
|
27
|
+
//
|
|
28
|
+
// bot.action.click also took a mouse to reuse and a flag forcing mouseup onto
|
|
29
|
+
// a non-interactable element. Neither crosses the wire, so they are not kept.
|
|
30
|
+
function click(element: Element, optCoords?: Coordinate | null): void {
|
|
31
|
+
if (!isShown(element, /* optIgnoreOpacity= */ true)) {
|
|
32
|
+
throw botError(ELEMENT_NOT_INTERACTABLE, 'Element is not currently visible and may not be manipulated')
|
|
33
|
+
}
|
|
34
|
+
scrollIntoView(element, optCoords || undefined)
|
|
35
|
+
const mouse = new Mouse()
|
|
36
|
+
mouse.move(element, optCoords || interactableCentre(element))
|
|
37
|
+
mouse.pressButton()
|
|
38
|
+
mouse.releaseButton()
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// An element with no area of its own (an empty inline wrapper, say) is aimed
|
|
42
|
+
// at through its offsetParent's size, as bot.action.getInteractableSize did.
|
|
43
|
+
function interactableCentre(element: Element): Coordinate {
|
|
44
|
+
let node: Element = element
|
|
45
|
+
for (;;) {
|
|
46
|
+
const rect = getClientRect(node)
|
|
47
|
+
const parent = (node as HTMLElement).offsetParent
|
|
48
|
+
if ((rect.width > 0 && rect.height > 0) || !parent) {
|
|
49
|
+
return { x: rect.width / 2, y: rect.height / 2 }
|
|
50
|
+
}
|
|
51
|
+
node = parent
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default click
|