askui 0.20.2 → 0.20.4
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/dist/cjs/core/model/custom-element-json.d.ts +1 -1
- package/dist/cjs/core/ui-control-commands/action.d.ts +5 -1
- package/dist/cjs/core/ui-control-commands/action.js +3 -2
- package/dist/cjs/core/ui-control-commands/control-command.js +1 -1
- package/dist/cjs/execution/dsl.d.ts +531 -164
- package/dist/cjs/execution/dsl.js +540 -165
- package/dist/esm/core/model/custom-element-json.d.ts +1 -1
- package/dist/esm/core/ui-control-commands/action.d.ts +5 -1
- package/dist/esm/core/ui-control-commands/action.js +3 -2
- package/dist/esm/core/ui-control-commands/control-command.js +1 -1
- package/dist/esm/execution/dsl.d.ts +531 -164
- package/dist/esm/execution/dsl.js +540 -165
- package/package.json +1 -1
- package/dist/cjs/core/annotation/annotation-writer.js.map +0 -1
- package/dist/cjs/core/annotation/annotation.js.map +0 -1
- package/dist/cjs/core/inference-response/inference-response.js.map +0 -1
- package/dist/cjs/core/inference-response/invalid-model-type-error.js.map +0 -1
- package/dist/cjs/core/inference-response/model-type.js.map +0 -1
- package/dist/cjs/core/model/annotation-result/annotation-interface.js.map +0 -1
- package/dist/cjs/core/model/annotation-result/boundary-box.js.map +0 -1
- package/dist/cjs/core/model/annotation-result/detected-element.js.map +0 -1
- package/dist/cjs/core/model/custom-element-json.js.map +0 -1
- package/dist/cjs/core/model/custom-element.js.map +0 -1
- package/dist/cjs/core/reporting/default-step.js.map +0 -1
- package/dist/cjs/core/reporting/index.js.map +0 -1
- package/dist/cjs/core/reporting/instruction.js.map +0 -1
- package/dist/cjs/core/reporting/reporter-config.js.map +0 -1
- package/dist/cjs/core/reporting/reporter.js.map +0 -1
- package/dist/cjs/core/reporting/snapshot-detail-level.js.map +0 -1
- package/dist/cjs/core/reporting/snapshot.js.map +0 -1
- package/dist/cjs/core/reporting/step-reporter.js.map +0 -1
- package/dist/cjs/core/reporting/step-run.js.map +0 -1
- package/dist/cjs/core/reporting/step-status-end.js.map +0 -1
- package/dist/cjs/core/reporting/step-status.js.map +0 -1
- package/dist/cjs/core/reporting/step.js.map +0 -1
- package/dist/cjs/core/runner-protocol/index.js.map +0 -1
- package/dist/cjs/core/runner-protocol/request/capture-screenshot-request.js.map +0 -1
- package/dist/cjs/core/runner-protocol/request/control-request.js.map +0 -1
- package/dist/cjs/core/runner-protocol/request/get-server-process-pid.js.map +0 -1
- package/dist/cjs/core/runner-protocol/request/index.js.map +0 -1
- package/dist/cjs/core/runner-protocol/request/interactive-annotation-request.js.map +0 -1
- package/dist/cjs/core/runner-protocol/request/read-recording-request.js.map +0 -1
- package/dist/cjs/core/runner-protocol/request/runner-protocol-request.js.map +0 -1
- package/dist/cjs/core/runner-protocol/request/start-recording-request.js.map +0 -1
- package/dist/cjs/core/runner-protocol/request/stop-recording-request.js.map +0 -1
- package/dist/cjs/core/runner-protocol/response/index.js.map +0 -1
- package/dist/cjs/core/ui-control-commands/action.js.map +0 -1
- package/dist/cjs/core/ui-control-commands/control-command-code.js.map +0 -1
- package/dist/cjs/core/ui-control-commands/control-command.js.map +0 -1
- package/dist/cjs/core/ui-control-commands/index.js.map +0 -1
- package/dist/cjs/core/ui-control-commands/input-event.js.map +0 -1
- package/dist/cjs/execution/config-error.js.map +0 -1
- package/dist/cjs/execution/control-command-error.js.map +0 -1
- package/dist/cjs/execution/credentials-args.js.map +0 -1
- package/dist/cjs/execution/dsl.js.map +0 -1
- package/dist/cjs/execution/execution-runtime.js.map +0 -1
- package/dist/cjs/execution/index.js.map +0 -1
- package/dist/cjs/execution/inference-client.js.map +0 -1
- package/dist/cjs/execution/inference-response-error.js.map +0 -1
- package/dist/cjs/execution/is-image-required-interface.js.map +0 -1
- package/dist/cjs/execution/misc.js.map +0 -1
- package/dist/cjs/execution/model-composition-branch.js.map +0 -1
- package/dist/cjs/execution/read-environment-credentials.js.map +0 -1
- package/dist/cjs/execution/read-recording-response-stream-handler.js.map +0 -1
- package/dist/cjs/execution/repeat-error.js.map +0 -1
- package/dist/cjs/execution/ui-control-client-dependency-builder.js.map +0 -1
- package/dist/cjs/execution/ui-control-client.js.map +0 -1
- package/dist/cjs/execution/ui-controller-client-connection-state.js.map +0 -1
- package/dist/cjs/execution/ui-controller-client-error.js.map +0 -1
- package/dist/cjs/execution/ui-controller-client-interface.js.map +0 -1
- package/dist/cjs/execution/ui-controller-client.js.map +0 -1
- package/dist/cjs/lib/download-binaries.js.map +0 -1
- package/dist/cjs/lib/index.js.map +0 -1
- package/dist/cjs/lib/interactive_cli/add-script-package-json.d.ts +0 -1
- package/dist/cjs/lib/interactive_cli/add-script-package-json.js +0 -39
- package/dist/cjs/lib/interactive_cli/add-script-package-json.js.map +0 -1
- package/dist/cjs/lib/interactive_cli/cli-options-interface.js.map +0 -1
- package/dist/cjs/lib/interactive_cli/cli.js.map +0 -1
- package/dist/cjs/lib/interactive_cli/create-example-project.js.map +0 -1
- package/dist/cjs/lib/interactive_cli/index.js.map +0 -1
- package/dist/cjs/lib/libfuse-error.js.map +0 -1
- package/dist/cjs/lib/logger.js.map +0 -1
- package/dist/cjs/lib/timeout-error.js.map +0 -1
- package/dist/cjs/lib/ui-controller-args.js.map +0 -1
- package/dist/cjs/lib/ui-controller-darwin.js.map +0 -1
- package/dist/cjs/lib/ui-controller-facade.js.map +0 -1
- package/dist/cjs/lib/ui-controller-linux.js.map +0 -1
- package/dist/cjs/lib/ui-controller-win32.js.map +0 -1
- package/dist/cjs/lib/ui-controller.js.map +0 -1
- package/dist/cjs/lib/unkown-error.js.map +0 -1
- package/dist/cjs/lib/wayland-error.js.map +0 -1
- package/dist/cjs/main.js.map +0 -1
- package/dist/cjs/shared/index.js.map +0 -1
- package/dist/cjs/shared/log-levels.js.map +0 -1
- package/dist/cjs/shared/proxy-agent-args.js.map +0 -1
- package/dist/cjs/utils/analytics/analytics-interface.js.map +0 -1
- package/dist/cjs/utils/analytics/analytics.js.map +0 -1
- package/dist/cjs/utils/analytics/index.js.map +0 -1
- package/dist/cjs/utils/analytics/installation-timestamp-create-error.js.map +0 -1
- package/dist/cjs/utils/analytics/installation-timestamp-get-error.js.map +0 -1
- package/dist/cjs/utils/analytics/installation-timestamp.js.map +0 -1
- package/dist/cjs/utils/analytics/user-identifier-interface.js.map +0 -1
- package/dist/cjs/utils/analytics/user-identifier.js.map +0 -1
- package/dist/cjs/utils/base_64_image/base-64-image-error.js.map +0 -1
- package/dist/cjs/utils/base_64_image/base-64-image-string-error.js.map +0 -1
- package/dist/cjs/utils/base_64_image/base-64-image.js.map +0 -1
- package/dist/cjs/utils/base_64_image/sharp.js.map +0 -1
- package/dist/cjs/utils/http/credentials.js.map +0 -1
- package/dist/cjs/utils/http/custom-errors/authentication-http-client-error.js.map +0 -1
- package/dist/cjs/utils/http/custom-errors/client-http-client-error.js.map +0 -1
- package/dist/cjs/utils/http/custom-errors/general-http-client-error.js.map +0 -1
- package/dist/cjs/utils/http/custom-errors/http-client-error.js.map +0 -1
- package/dist/cjs/utils/http/custom-errors/index.js.map +0 -1
- package/dist/cjs/utils/http/custom-errors/server-http-client-error.js.map +0 -1
- package/dist/cjs/utils/http/custom-errors/unkown-http-client-error.js.map +0 -1
- package/dist/cjs/utils/http/http-client-got.js.map +0 -1
- package/dist/cjs/utils/http/index.js.map +0 -1
- package/dist/cjs/utils/image-resize-errors/image-resizing-base-error.js.map +0 -1
- package/dist/cjs/utils/image-resize-errors/index.js.map +0 -1
- package/dist/cjs/utils/path.js.map +0 -1
- package/dist/cjs/utils/proxy/proxy-builder.js.map +0 -1
- package/dist/cjs/utils/resized-image-interface.js.map +0 -1
- package/dist/cjs/utils/transformations.js.map +0 -1
- package/dist/esm/core/annotation/annotation-writer.js.map +0 -1
- package/dist/esm/core/annotation/annotation.js.map +0 -1
- package/dist/esm/core/inference-response/inference-response.js.map +0 -1
- package/dist/esm/core/inference-response/invalid-model-type-error.js.map +0 -1
- package/dist/esm/core/inference-response/model-type.js.map +0 -1
- package/dist/esm/core/model/annotation-result/annotation-interface.js.map +0 -1
- package/dist/esm/core/model/annotation-result/boundary-box.js.map +0 -1
- package/dist/esm/core/model/annotation-result/detected-element.js.map +0 -1
- package/dist/esm/core/model/custom-element-json.js.map +0 -1
- package/dist/esm/core/model/custom-element.js.map +0 -1
- package/dist/esm/core/reporting/default-step.js.map +0 -1
- package/dist/esm/core/reporting/index.js.map +0 -1
- package/dist/esm/core/reporting/instruction.js.map +0 -1
- package/dist/esm/core/reporting/reporter-config.js.map +0 -1
- package/dist/esm/core/reporting/reporter.js.map +0 -1
- package/dist/esm/core/reporting/snapshot-detail-level.js.map +0 -1
- package/dist/esm/core/reporting/snapshot.js.map +0 -1
- package/dist/esm/core/reporting/step-reporter.js.map +0 -1
- package/dist/esm/core/reporting/step-run.js.map +0 -1
- package/dist/esm/core/reporting/step-status-end.js.map +0 -1
- package/dist/esm/core/reporting/step-status.js.map +0 -1
- package/dist/esm/core/reporting/step.js.map +0 -1
- package/dist/esm/core/runner-protocol/index.js.map +0 -1
- package/dist/esm/core/runner-protocol/request/capture-screenshot-request.js.map +0 -1
- package/dist/esm/core/runner-protocol/request/control-request.js.map +0 -1
- package/dist/esm/core/runner-protocol/request/get-server-process-pid.js.map +0 -1
- package/dist/esm/core/runner-protocol/request/index.js.map +0 -1
- package/dist/esm/core/runner-protocol/request/interactive-annotation-request.js.map +0 -1
- package/dist/esm/core/runner-protocol/request/read-recording-request.js.map +0 -1
- package/dist/esm/core/runner-protocol/request/runner-protocol-request.js.map +0 -1
- package/dist/esm/core/runner-protocol/request/start-recording-request.js.map +0 -1
- package/dist/esm/core/runner-protocol/request/stop-recording-request.js.map +0 -1
- package/dist/esm/core/runner-protocol/response/index.js.map +0 -1
- package/dist/esm/core/ui-control-commands/action.js.map +0 -1
- package/dist/esm/core/ui-control-commands/control-command-code.js.map +0 -1
- package/dist/esm/core/ui-control-commands/control-command.js.map +0 -1
- package/dist/esm/core/ui-control-commands/index.js.map +0 -1
- package/dist/esm/core/ui-control-commands/input-event.js.map +0 -1
- package/dist/esm/execution/config-error.js.map +0 -1
- package/dist/esm/execution/control-command-error.js.map +0 -1
- package/dist/esm/execution/credentials-args.js.map +0 -1
- package/dist/esm/execution/dsl.js.map +0 -1
- package/dist/esm/execution/execution-runtime.js.map +0 -1
- package/dist/esm/execution/index.js.map +0 -1
- package/dist/esm/execution/inference-client.js.map +0 -1
- package/dist/esm/execution/inference-response-error.js.map +0 -1
- package/dist/esm/execution/is-image-required-interface.js.map +0 -1
- package/dist/esm/execution/misc.js.map +0 -1
- package/dist/esm/execution/model-composition-branch.js.map +0 -1
- package/dist/esm/execution/read-environment-credentials.js.map +0 -1
- package/dist/esm/execution/read-recording-response-stream-handler.js.map +0 -1
- package/dist/esm/execution/repeat-error.js.map +0 -1
- package/dist/esm/execution/ui-control-client-dependency-builder.js.map +0 -1
- package/dist/esm/execution/ui-control-client.js.map +0 -1
- package/dist/esm/execution/ui-controller-client-connection-state.js.map +0 -1
- package/dist/esm/execution/ui-controller-client-error.js.map +0 -1
- package/dist/esm/execution/ui-controller-client-interface.js.map +0 -1
- package/dist/esm/execution/ui-controller-client.js.map +0 -1
- package/dist/esm/lib/download-binaries.js.map +0 -1
- package/dist/esm/lib/index.js.map +0 -1
- package/dist/esm/lib/interactive_cli/add-script-package-json.d.ts +0 -1
- package/dist/esm/lib/interactive_cli/add-script-package-json.js +0 -32
- package/dist/esm/lib/interactive_cli/add-script-package-json.js.map +0 -1
- package/dist/esm/lib/interactive_cli/cli-options-interface.js.map +0 -1
- package/dist/esm/lib/interactive_cli/cli.js.map +0 -1
- package/dist/esm/lib/interactive_cli/create-example-project.js.map +0 -1
- package/dist/esm/lib/interactive_cli/index.js.map +0 -1
- package/dist/esm/lib/libfuse-error.js.map +0 -1
- package/dist/esm/lib/logger.js.map +0 -1
- package/dist/esm/lib/timeout-error.js.map +0 -1
- package/dist/esm/lib/ui-controller-args.js.map +0 -1
- package/dist/esm/lib/ui-controller-darwin.js.map +0 -1
- package/dist/esm/lib/ui-controller-facade.js.map +0 -1
- package/dist/esm/lib/ui-controller-linux.js.map +0 -1
- package/dist/esm/lib/ui-controller-win32.js.map +0 -1
- package/dist/esm/lib/ui-controller.js.map +0 -1
- package/dist/esm/lib/unkown-error.js.map +0 -1
- package/dist/esm/lib/wayland-error.js.map +0 -1
- package/dist/esm/main.js.map +0 -1
- package/dist/esm/shared/index.js.map +0 -1
- package/dist/esm/shared/log-levels.js.map +0 -1
- package/dist/esm/shared/proxy-agent-args.js.map +0 -1
- package/dist/esm/utils/analytics/analytics-interface.js.map +0 -1
- package/dist/esm/utils/analytics/analytics.js.map +0 -1
- package/dist/esm/utils/analytics/index.js.map +0 -1
- package/dist/esm/utils/analytics/installation-timestamp-create-error.js.map +0 -1
- package/dist/esm/utils/analytics/installation-timestamp-get-error.js.map +0 -1
- package/dist/esm/utils/analytics/installation-timestamp.js.map +0 -1
- package/dist/esm/utils/analytics/user-identifier-interface.js.map +0 -1
- package/dist/esm/utils/analytics/user-identifier.js.map +0 -1
- package/dist/esm/utils/base_64_image/base-64-image-error.js.map +0 -1
- package/dist/esm/utils/base_64_image/base-64-image-string-error.js.map +0 -1
- package/dist/esm/utils/base_64_image/base-64-image.js.map +0 -1
- package/dist/esm/utils/base_64_image/sharp.js.map +0 -1
- package/dist/esm/utils/http/credentials.js.map +0 -1
- package/dist/esm/utils/http/custom-errors/authentication-http-client-error.js.map +0 -1
- package/dist/esm/utils/http/custom-errors/client-http-client-error.js.map +0 -1
- package/dist/esm/utils/http/custom-errors/general-http-client-error.js.map +0 -1
- package/dist/esm/utils/http/custom-errors/http-client-error.js.map +0 -1
- package/dist/esm/utils/http/custom-errors/index.js.map +0 -1
- package/dist/esm/utils/http/custom-errors/server-http-client-error.js.map +0 -1
- package/dist/esm/utils/http/custom-errors/unkown-http-client-error.js.map +0 -1
- package/dist/esm/utils/http/http-client-got.js.map +0 -1
- package/dist/esm/utils/http/index.js.map +0 -1
- package/dist/esm/utils/image-resize-errors/image-resizing-base-error.js.map +0 -1
- package/dist/esm/utils/image-resize-errors/index.js.map +0 -1
- package/dist/esm/utils/path.js.map +0 -1
- package/dist/esm/utils/proxy/proxy-builder.js.map +0 -1
- package/dist/esm/utils/resized-image-interface.js.map +0 -1
- package/dist/esm/utils/transformations.js.map +0 -1
- package/dist/example_projects_templates/configs/jasmine.config.json +0 -12
|
@@ -180,7 +180,7 @@ export declare class FluentFilters extends FluentBase {
|
|
|
180
180
|
* .customElement({
|
|
181
181
|
* customImage: './logo.png', // required
|
|
182
182
|
* name: 'myLogo', // optional
|
|
183
|
-
* threshold: 0.
|
|
183
|
+
* threshold: 0.5, // optional, defaults to 0.5
|
|
184
184
|
* stopThreshold: 0.9, // optional, defaults to 0.9
|
|
185
185
|
* rotationDegreePerStep: 0, // optional, defaults to 0
|
|
186
186
|
* imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
|
|
@@ -196,7 +196,7 @@ export declare class FluentFilters extends FluentBase {
|
|
|
196
196
|
* - **name** (*`string`, optional*):
|
|
197
197
|
* - A unique name that can be used for filtering for the custom element. If not given, any text inside the custom image will be detected via OCR.
|
|
198
198
|
* - **threshold** (*`number`, optional*):
|
|
199
|
-
* - A threshold for how much a UI element needs to be similar to the custom element as defined by the image. Takes values between `0.0` (== all elements are recognized as the custom element which is probably not what you want) and `1.0` (== elements need to look exactly like the `customImage` which is unlikely to be achieved as even minor differences count). Defaults to `0.
|
|
199
|
+
* - A threshold for how much a UI element needs to be similar to the custom element as defined by the image. Takes values between `0.0` (== all elements are recognized as the custom element which is probably not what you want) and `1.0` (== elements need to look exactly like the `customImage` which is unlikely to be achieved as even minor differences count). Defaults to `0.5`.
|
|
200
200
|
* - **stopThreshold** (*`number`, optional*):
|
|
201
201
|
* - A threshold for when to stop searching for UI elements similar to the custom element. As soon as UI elements have been found that are at least as similar as the `stopThreshold`, the search is going to stop. After that elements are filtered using the `threshold`. Because of that the `stopThreshold` should be greater than or equal to `threshold`. It is primarily to be used as a speed improvement (by lowering the value). Takes values between `0.0` and `1.0`. Defaults to `0.9`.
|
|
202
202
|
* - **rotationDegreePerStep** (*`number`, optional*):
|
|
@@ -312,7 +312,7 @@ export declare class FluentFilters extends FluentBase {
|
|
|
312
312
|
* await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
|
|
313
313
|
* ```
|
|
314
314
|
*
|
|
315
|
-
* 
|
|
316
316
|
*
|
|
317
317
|
*
|
|
318
318
|
*
|
|
@@ -337,7 +337,7 @@ export declare class FluentFilters extends FluentBase {
|
|
|
337
337
|
* await aui.moveMouseTo().text().withExactText('Password').exec()
|
|
338
338
|
* ```
|
|
339
339
|
*
|
|
340
|
-
* 
|
|
341
341
|
*
|
|
342
342
|
*
|
|
343
343
|
*
|
|
@@ -373,7 +373,7 @@ export declare class FluentFilters extends FluentBase {
|
|
|
373
373
|
* **Important: _Matching only returns the best matching element when you use it with `get()`_**
|
|
374
374
|
*
|
|
375
375
|
* A bit of playing around to find a matching description is sometimes needed:
|
|
376
|
-
*
|
|
376
|
+
* For example, `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
|
|
377
377
|
* Generally, the more detail the better.
|
|
378
378
|
*
|
|
379
379
|
* We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
|
|
@@ -539,17 +539,46 @@ export declare class FluentFiltersOrRelations extends FluentFilters {
|
|
|
539
539
|
*
|
|
540
540
|
* **Examples:**
|
|
541
541
|
* ```typescript
|
|
542
|
-
*
|
|
543
|
-
* |
|
|
544
|
-
*
|
|
542
|
+
* ---------- --------- ---------
|
|
543
|
+
* | button | | text0 | | text3 |
|
|
544
|
+
* ---------- --------- --------- ---------
|
|
545
|
+
* | text1 | ---------
|
|
546
|
+
* --------- | text2 |
|
|
547
|
+
* ---------
|
|
545
548
|
*
|
|
546
|
-
* //
|
|
547
|
-
*
|
|
548
|
-
* ...
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
* //
|
|
552
|
-
* ...
|
|
549
|
+
* // General explanation for element_center_line
|
|
550
|
+
* // This will find text0 and text3
|
|
551
|
+
* ...text().rightOf(..., 'element_center_line').button()
|
|
552
|
+
*
|
|
553
|
+
* // General explanation for element_edge_area
|
|
554
|
+
* // This will find text0, text1 and text3
|
|
555
|
+
* ...text().rightOf(..., 'element_edge_area').button()
|
|
556
|
+
*
|
|
557
|
+
* // General explanation and display_edge_area
|
|
558
|
+
* // This will find text0, text1, text2 and text3
|
|
559
|
+
* ...text().rightOf(..., 'display_edge_area').button()
|
|
560
|
+
*
|
|
561
|
+
* // More examples:
|
|
562
|
+
* // Returns text0 because it is the first element rightOf button
|
|
563
|
+
* ...text().rightOf().button()
|
|
564
|
+
* ...text().rightOf(0).button()
|
|
565
|
+
* ...text().rightOf(0, 'element_edge_area').button()
|
|
566
|
+
*
|
|
567
|
+
* // Returns text3 because it is the second text touched by the
|
|
568
|
+
* // horizontal line from the center of button
|
|
569
|
+
* // Notice: text1 is not touched!
|
|
570
|
+
* ...text().rightOf(1, 'element_center_line').button()
|
|
571
|
+
*
|
|
572
|
+
* // Returns text3 because it is the third text touched by the
|
|
573
|
+
* // vertical area rightOf the y-axis of button
|
|
574
|
+
* // Notice: text2 is not touched!
|
|
575
|
+
* ...text().rightOf(2, 'element_edge_area').button()
|
|
576
|
+
*
|
|
577
|
+
* // Returns text2 because it is the third element rightOf button
|
|
578
|
+
* ...text().rightOf(2, 'display_edge_area').button()
|
|
579
|
+
*
|
|
580
|
+
* // Returns no element because button is rightOf the texts
|
|
581
|
+
* ...button().rightOf().text()
|
|
553
582
|
* ```
|
|
554
583
|
* 
|
|
555
584
|
*
|
|
@@ -571,17 +600,46 @@ export declare class FluentFiltersOrRelations extends FluentFilters {
|
|
|
571
600
|
*
|
|
572
601
|
* **Examples:**
|
|
573
602
|
* ```typescript
|
|
574
|
-
*
|
|
575
|
-
* |
|
|
576
|
-
*
|
|
603
|
+
* --------- --------- ----------
|
|
604
|
+
* | text3 | | text0 | | button |
|
|
605
|
+
* --------- --------- --------- ----------
|
|
606
|
+
* --------- | text1 |
|
|
607
|
+
* | text2 | ---------
|
|
608
|
+
* ---------
|
|
609
|
+
*
|
|
610
|
+
* // General explanation for element_center_line
|
|
611
|
+
* // This will find text0 and text3
|
|
612
|
+
* ...text().leftOf(..., 'element_center_line').button()
|
|
613
|
+
*
|
|
614
|
+
* // General explanation for element_edge_area
|
|
615
|
+
* // This will find text0, text1 and text3
|
|
616
|
+
* ...text().leftOf(..., 'element_edge_area').button()
|
|
617
|
+
*
|
|
618
|
+
* // General explanation and display_edge_area
|
|
619
|
+
* // This will find text0, text1, text2 and text3
|
|
620
|
+
* ...text().leftOf(..., 'display_edge_area').button()
|
|
621
|
+
*
|
|
622
|
+
* // More examples:
|
|
623
|
+
* // Returns text0 because it is the first element leftOf button
|
|
624
|
+
* ...text().leftOf().button()
|
|
625
|
+
* ...text().leftOf(0).button()
|
|
626
|
+
* ...text().leftOf(0, 'element_edge_area').button()
|
|
627
|
+
*
|
|
628
|
+
* // Returns text3 because it is the second text touched by the
|
|
629
|
+
* // horizontal line from the center of button
|
|
630
|
+
* // Notice: text1 is not touched!
|
|
631
|
+
* ...text().leftOf(1, 'element_center_line').button()
|
|
632
|
+
*
|
|
633
|
+
* // Returns text3 because it is the third text touched by the
|
|
634
|
+
* // vertical area leftOf the y-axis of button
|
|
635
|
+
* // Notice: text2 is not touched!
|
|
636
|
+
* ...text().leftOf(2, 'element_edge_area').button()
|
|
637
|
+
*
|
|
638
|
+
* // Returns text2 because it is the third element leftOf button
|
|
639
|
+
* ...text().leftOf(2, 'display_edge_area').button()
|
|
577
640
|
*
|
|
578
|
-
* // Returns
|
|
579
|
-
* ...
|
|
580
|
-
* ...leftEl().leftOf(0).rightEl()
|
|
581
|
-
* // Returns leftEl1 because leftEl1 is the second element left of rightEl
|
|
582
|
-
* ...leftEl().leftOf(1).rightEl()
|
|
583
|
-
* // Returns no element because rightEl is left of leftEl
|
|
584
|
-
* ...rightEl().leftOf().leftEl()
|
|
641
|
+
* // Returns no element because button is rightOf the texts
|
|
642
|
+
* ...button().leftOf().text()
|
|
585
643
|
* ```
|
|
586
644
|
* 
|
|
587
645
|
*
|
|
@@ -603,22 +661,54 @@ export declare class FluentFiltersOrRelations extends FluentFilters {
|
|
|
603
661
|
*
|
|
604
662
|
* **Examples:**
|
|
605
663
|
* ```typescript
|
|
606
|
-
*
|
|
607
|
-
* |
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
* |
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
*
|
|
615
|
-
*
|
|
664
|
+
* ------------
|
|
665
|
+
* | text |
|
|
666
|
+
* ------------
|
|
667
|
+
* ------------
|
|
668
|
+
* | button0 |
|
|
669
|
+
* ------------
|
|
670
|
+
* -----------
|
|
671
|
+
* | button1 |
|
|
672
|
+
* -----------
|
|
673
|
+
* -----------
|
|
674
|
+
* | button2 |
|
|
675
|
+
* -----------
|
|
676
|
+
* ------------
|
|
677
|
+
* | button3 |
|
|
678
|
+
* ------------
|
|
679
|
+
*
|
|
680
|
+
* // General explanation for element_center_line
|
|
681
|
+
* // This will find button0 and button3
|
|
682
|
+
* ...button().below(..., 'element_center_line').text()
|
|
683
|
+
*
|
|
684
|
+
* // General explanation for element_edge_area
|
|
685
|
+
* // This will find button0, button1 and button3
|
|
686
|
+
* ...button().below(..., 'element_edge_area').text()
|
|
687
|
+
*
|
|
688
|
+
* // General explanation and display_edge_area
|
|
689
|
+
* // This will find button0, button1, button2 and button3
|
|
690
|
+
* ...button().below(..., 'display_edge_area').text()
|
|
691
|
+
*
|
|
692
|
+
* // More examples:
|
|
616
693
|
* // Returns button0 because button0 is the first button below text
|
|
617
694
|
* ...button().below().text()
|
|
618
695
|
* ...button().below(0).text()
|
|
619
|
-
*
|
|
620
|
-
*
|
|
621
|
-
* // Returns
|
|
696
|
+
* ...button().below(0, 'element_edge_area').text()
|
|
697
|
+
*
|
|
698
|
+
* // Returns button3 because it is the second button touched by the
|
|
699
|
+
* // vertical line from the center of text
|
|
700
|
+
* // Notice: button1 is not touched
|
|
701
|
+
* ...button().below(1, 'element_center_line').text()
|
|
702
|
+
*
|
|
703
|
+
* // Returns button3 because it is the third button touched by the
|
|
704
|
+
* // vertical area below the x-axis of text
|
|
705
|
+
* // Notice: button2 is not touched!
|
|
706
|
+
* ...button().below(2, 'element_edge_area').text()
|
|
707
|
+
*
|
|
708
|
+
* // Returns button2 because it is the third element below text
|
|
709
|
+
* ...button().below(2, 'display_edge_area').text()
|
|
710
|
+
*
|
|
711
|
+
* // Returns no element because text is above the buttons
|
|
622
712
|
* ...text().below().button()
|
|
623
713
|
* ```
|
|
624
714
|
* 
|
|
@@ -641,22 +731,54 @@ export declare class FluentFiltersOrRelations extends FluentFilters {
|
|
|
641
731
|
*
|
|
642
732
|
* **Examples:**
|
|
643
733
|
* ```typescript
|
|
644
|
-
*
|
|
645
|
-
* |
|
|
646
|
-
*
|
|
647
|
-
*
|
|
648
|
-
*
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
*
|
|
654
|
-
*
|
|
734
|
+
* ------------
|
|
735
|
+
* | text3 |
|
|
736
|
+
* ------------
|
|
737
|
+
* ------------
|
|
738
|
+
* | text2 |
|
|
739
|
+
* ------------
|
|
740
|
+
* ------------
|
|
741
|
+
* | text1 |
|
|
742
|
+
* ------------
|
|
743
|
+
* ------------
|
|
744
|
+
* | text0 |
|
|
745
|
+
* ------------
|
|
746
|
+
* ------------
|
|
747
|
+
* | button |
|
|
748
|
+
* ------------
|
|
749
|
+
*
|
|
750
|
+
* // General explanation for element_center_line
|
|
751
|
+
* // This will find text0 and text3
|
|
752
|
+
* ...text().above(..., 'element_center_line').button()
|
|
753
|
+
*
|
|
754
|
+
* // General explanation for element_edge_area
|
|
755
|
+
* // This will find text0, text1 and text3
|
|
756
|
+
* ...text().above(..., 'element_edge_area').button()
|
|
757
|
+
*
|
|
758
|
+
* // General explanation and display_edge_area
|
|
759
|
+
* // This will find text0, text1, text2 and text3
|
|
760
|
+
* ...text().above(..., 'display_edge_area').button()
|
|
761
|
+
*
|
|
762
|
+
* // More examples:
|
|
763
|
+
* // Returns text0 because it is the first element above button
|
|
655
764
|
* ...text().above().button()
|
|
656
765
|
* ...text().above(0).button()
|
|
657
|
-
*
|
|
658
|
-
*
|
|
659
|
-
* // Returns
|
|
766
|
+
* ...text().above(0, 'element_edge_area').button()
|
|
767
|
+
*
|
|
768
|
+
* // Returns text3 because it is the second text touched by the
|
|
769
|
+
* // vertical line from the center of button
|
|
770
|
+
* // Notice: text1 is not touched!
|
|
771
|
+
* ...text().above(1, 'element_center_line').button()
|
|
772
|
+
*
|
|
773
|
+
* // Returns text3 because it is the third text touched by the
|
|
774
|
+
* // vertical area above the x-axis of button
|
|
775
|
+
* // Notice: text2 is not touched!
|
|
776
|
+
* ...text().above(2, 'element_edge_area').button()
|
|
777
|
+
*
|
|
778
|
+
* // Returns text2 because it is the third element above button
|
|
779
|
+
* ...text().above(2, 'display_edge_area').button()
|
|
780
|
+
*
|
|
781
|
+
* // Returns no element because button is below the texts
|
|
660
782
|
* ...button().above().text()
|
|
661
783
|
* ```
|
|
662
784
|
* 
|
|
@@ -868,7 +990,7 @@ export declare class FluentFiltersCondition extends FluentBase {
|
|
|
868
990
|
* .customElement({
|
|
869
991
|
* customImage: './logo.png', // required
|
|
870
992
|
* name: 'myLogo', // optional
|
|
871
|
-
* threshold: 0.
|
|
993
|
+
* threshold: 0.5, // optional, defaults to 0.5
|
|
872
994
|
* stopThreshold: 0.9, // optional, defaults to 0.9
|
|
873
995
|
* rotationDegreePerStep: 0, // optional, defaults to 0
|
|
874
996
|
* imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
|
|
@@ -884,7 +1006,7 @@ export declare class FluentFiltersCondition extends FluentBase {
|
|
|
884
1006
|
* - **name** (*`string`, optional*):
|
|
885
1007
|
* - A unique name that can be used for filtering for the custom element. If not given, any text inside the custom image will be detected via OCR.
|
|
886
1008
|
* - **threshold** (*`number`, optional*):
|
|
887
|
-
* - A threshold for how much a UI element needs to be similar to the custom element as defined by the image. Takes values between `0.0` (== all elements are recognized as the custom element which is probably not what you want) and `1.0` (== elements need to look exactly like the `customImage` which is unlikely to be achieved as even minor differences count). Defaults to `0.
|
|
1009
|
+
* - A threshold for how much a UI element needs to be similar to the custom element as defined by the image. Takes values between `0.0` (== all elements are recognized as the custom element which is probably not what you want) and `1.0` (== elements need to look exactly like the `customImage` which is unlikely to be achieved as even minor differences count). Defaults to `0.5`.
|
|
888
1010
|
* - **stopThreshold** (*`number`, optional*):
|
|
889
1011
|
* - A threshold for when to stop searching for UI elements similar to the custom element. As soon as UI elements have been found that are at least as similar as the `stopThreshold`, the search is going to stop. After that elements are filtered using the `threshold`. Because of that the `stopThreshold` should be greater than or equal to `threshold`. It is primarily to be used as a speed improvement (by lowering the value). Takes values between `0.0` and `1.0`. Defaults to `0.9`.
|
|
890
1012
|
* - **rotationDegreePerStep** (*`number`, optional*):
|
|
@@ -1000,7 +1122,7 @@ export declare class FluentFiltersCondition extends FluentBase {
|
|
|
1000
1122
|
* await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
|
|
1001
1123
|
* ```
|
|
1002
1124
|
*
|
|
1003
|
-
* 
|
|
1004
1126
|
*
|
|
1005
1127
|
*
|
|
1006
1128
|
*
|
|
@@ -1025,7 +1147,7 @@ export declare class FluentFiltersCondition extends FluentBase {
|
|
|
1025
1147
|
* await aui.moveMouseTo().text().withExactText('Password').exec()
|
|
1026
1148
|
* ```
|
|
1027
1149
|
*
|
|
1028
|
-
* 
|
|
1029
1151
|
*
|
|
1030
1152
|
*
|
|
1031
1153
|
*
|
|
@@ -1061,7 +1183,7 @@ export declare class FluentFiltersCondition extends FluentBase {
|
|
|
1061
1183
|
* **Important: _Matching only returns the best matching element when you use it with `get()`_**
|
|
1062
1184
|
*
|
|
1063
1185
|
* A bit of playing around to find a matching description is sometimes needed:
|
|
1064
|
-
*
|
|
1186
|
+
* For example, `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
|
|
1065
1187
|
* Generally, the more detail the better.
|
|
1066
1188
|
*
|
|
1067
1189
|
* We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
|
|
@@ -1227,17 +1349,46 @@ export declare class FluentFiltersOrRelationsCondition extends FluentFiltersCond
|
|
|
1227
1349
|
*
|
|
1228
1350
|
* **Examples:**
|
|
1229
1351
|
* ```typescript
|
|
1230
|
-
*
|
|
1231
|
-
* |
|
|
1232
|
-
*
|
|
1352
|
+
* ---------- --------- ---------
|
|
1353
|
+
* | button | | text0 | | text3 |
|
|
1354
|
+
* ---------- --------- --------- ---------
|
|
1355
|
+
* | text1 | ---------
|
|
1356
|
+
* --------- | text2 |
|
|
1357
|
+
* ---------
|
|
1358
|
+
*
|
|
1359
|
+
* // General explanation for element_center_line
|
|
1360
|
+
* // This will find text0 and text3
|
|
1361
|
+
* ...text().rightOf(..., 'element_center_line').button()
|
|
1362
|
+
*
|
|
1363
|
+
* // General explanation for element_edge_area
|
|
1364
|
+
* // This will find text0, text1 and text3
|
|
1365
|
+
* ...text().rightOf(..., 'element_edge_area').button()
|
|
1366
|
+
*
|
|
1367
|
+
* // General explanation and display_edge_area
|
|
1368
|
+
* // This will find text0, text1, text2 and text3
|
|
1369
|
+
* ...text().rightOf(..., 'display_edge_area').button()
|
|
1370
|
+
*
|
|
1371
|
+
* // More examples:
|
|
1372
|
+
* // Returns text0 because it is the first element rightOf button
|
|
1373
|
+
* ...text().rightOf().button()
|
|
1374
|
+
* ...text().rightOf(0).button()
|
|
1375
|
+
* ...text().rightOf(0, 'element_edge_area').button()
|
|
1376
|
+
*
|
|
1377
|
+
* // Returns text3 because it is the second text touched by the
|
|
1378
|
+
* // horizontal line from the center of button
|
|
1379
|
+
* // Notice: text1 is not touched!
|
|
1380
|
+
* ...text().rightOf(1, 'element_center_line').button()
|
|
1233
1381
|
*
|
|
1234
|
-
* // Returns
|
|
1235
|
-
*
|
|
1236
|
-
*
|
|
1237
|
-
*
|
|
1238
|
-
*
|
|
1239
|
-
* // Returns
|
|
1240
|
-
* ...
|
|
1382
|
+
* // Returns text3 because it is the third text touched by the
|
|
1383
|
+
* // vertical area rightOf the y-axis of button
|
|
1384
|
+
* // Notice: text2 is not touched!
|
|
1385
|
+
* ...text().rightOf(2, 'element_edge_area').button()
|
|
1386
|
+
*
|
|
1387
|
+
* // Returns text2 because it is the third element rightOf button
|
|
1388
|
+
* ...text().rightOf(2, 'display_edge_area').button()
|
|
1389
|
+
*
|
|
1390
|
+
* // Returns no element because button is rightOf the texts
|
|
1391
|
+
* ...button().rightOf().text()
|
|
1241
1392
|
* ```
|
|
1242
1393
|
* 
|
|
1243
1394
|
*
|
|
@@ -1259,17 +1410,46 @@ export declare class FluentFiltersOrRelationsCondition extends FluentFiltersCond
|
|
|
1259
1410
|
*
|
|
1260
1411
|
* **Examples:**
|
|
1261
1412
|
* ```typescript
|
|
1262
|
-
*
|
|
1263
|
-
* |
|
|
1264
|
-
*
|
|
1413
|
+
* --------- --------- ----------
|
|
1414
|
+
* | text3 | | text0 | | button |
|
|
1415
|
+
* --------- --------- --------- ----------
|
|
1416
|
+
* --------- | text1 |
|
|
1417
|
+
* | text2 | ---------
|
|
1418
|
+
* ---------
|
|
1419
|
+
*
|
|
1420
|
+
* // General explanation for element_center_line
|
|
1421
|
+
* // This will find text0 and text3
|
|
1422
|
+
* ...text().leftOf(..., 'element_center_line').button()
|
|
1423
|
+
*
|
|
1424
|
+
* // General explanation for element_edge_area
|
|
1425
|
+
* // This will find text0, text1 and text3
|
|
1426
|
+
* ...text().leftOf(..., 'element_edge_area').button()
|
|
1427
|
+
*
|
|
1428
|
+
* // General explanation and display_edge_area
|
|
1429
|
+
* // This will find text0, text1, text2 and text3
|
|
1430
|
+
* ...text().leftOf(..., 'display_edge_area').button()
|
|
1431
|
+
*
|
|
1432
|
+
* // More examples:
|
|
1433
|
+
* // Returns text0 because it is the first element leftOf button
|
|
1434
|
+
* ...text().leftOf().button()
|
|
1435
|
+
* ...text().leftOf(0).button()
|
|
1436
|
+
* ...text().leftOf(0, 'element_edge_area').button()
|
|
1437
|
+
*
|
|
1438
|
+
* // Returns text3 because it is the second text touched by the
|
|
1439
|
+
* // horizontal line from the center of button
|
|
1440
|
+
* // Notice: text1 is not touched!
|
|
1441
|
+
* ...text().leftOf(1, 'element_center_line').button()
|
|
1265
1442
|
*
|
|
1266
|
-
* // Returns
|
|
1267
|
-
*
|
|
1268
|
-
*
|
|
1269
|
-
*
|
|
1270
|
-
*
|
|
1271
|
-
* // Returns
|
|
1272
|
-
* ...
|
|
1443
|
+
* // Returns text3 because it is the third text touched by the
|
|
1444
|
+
* // vertical area leftOf the y-axis of button
|
|
1445
|
+
* // Notice: text2 is not touched!
|
|
1446
|
+
* ...text().leftOf(2, 'element_edge_area').button()
|
|
1447
|
+
*
|
|
1448
|
+
* // Returns text2 because it is the third element leftOf button
|
|
1449
|
+
* ...text().leftOf(2, 'display_edge_area').button()
|
|
1450
|
+
*
|
|
1451
|
+
* // Returns no element because button is rightOf the texts
|
|
1452
|
+
* ...button().leftOf().text()
|
|
1273
1453
|
* ```
|
|
1274
1454
|
* 
|
|
1275
1455
|
*
|
|
@@ -1291,22 +1471,54 @@ export declare class FluentFiltersOrRelationsCondition extends FluentFiltersCond
|
|
|
1291
1471
|
*
|
|
1292
1472
|
* **Examples:**
|
|
1293
1473
|
* ```typescript
|
|
1294
|
-
*
|
|
1295
|
-
* |
|
|
1296
|
-
*
|
|
1297
|
-
*
|
|
1298
|
-
* |
|
|
1299
|
-
*
|
|
1300
|
-
*
|
|
1301
|
-
*
|
|
1302
|
-
*
|
|
1303
|
-
*
|
|
1474
|
+
* ------------
|
|
1475
|
+
* | text |
|
|
1476
|
+
* ------------
|
|
1477
|
+
* ------------
|
|
1478
|
+
* | button0 |
|
|
1479
|
+
* ------------
|
|
1480
|
+
* -----------
|
|
1481
|
+
* | button1 |
|
|
1482
|
+
* -----------
|
|
1483
|
+
* -----------
|
|
1484
|
+
* | button2 |
|
|
1485
|
+
* -----------
|
|
1486
|
+
* ------------
|
|
1487
|
+
* | button3 |
|
|
1488
|
+
* ------------
|
|
1489
|
+
*
|
|
1490
|
+
* // General explanation for element_center_line
|
|
1491
|
+
* // This will find button0 and button3
|
|
1492
|
+
* ...button().below(..., 'element_center_line').text()
|
|
1493
|
+
*
|
|
1494
|
+
* // General explanation for element_edge_area
|
|
1495
|
+
* // This will find button0, button1 and button3
|
|
1496
|
+
* ...button().below(..., 'element_edge_area').text()
|
|
1497
|
+
*
|
|
1498
|
+
* // General explanation and display_edge_area
|
|
1499
|
+
* // This will find button0, button1, button2 and button3
|
|
1500
|
+
* ...button().below(..., 'display_edge_area').text()
|
|
1501
|
+
*
|
|
1502
|
+
* // More examples:
|
|
1304
1503
|
* // Returns button0 because button0 is the first button below text
|
|
1305
1504
|
* ...button().below().text()
|
|
1306
1505
|
* ...button().below(0).text()
|
|
1307
|
-
*
|
|
1308
|
-
*
|
|
1309
|
-
* // Returns
|
|
1506
|
+
* ...button().below(0, 'element_edge_area').text()
|
|
1507
|
+
*
|
|
1508
|
+
* // Returns button3 because it is the second button touched by the
|
|
1509
|
+
* // vertical line from the center of text
|
|
1510
|
+
* // Notice: button1 is not touched
|
|
1511
|
+
* ...button().below(1, 'element_center_line').text()
|
|
1512
|
+
*
|
|
1513
|
+
* // Returns button3 because it is the third button touched by the
|
|
1514
|
+
* // vertical area below the x-axis of text
|
|
1515
|
+
* // Notice: button2 is not touched!
|
|
1516
|
+
* ...button().below(2, 'element_edge_area').text()
|
|
1517
|
+
*
|
|
1518
|
+
* // Returns button2 because it is the third element below text
|
|
1519
|
+
* ...button().below(2, 'display_edge_area').text()
|
|
1520
|
+
*
|
|
1521
|
+
* // Returns no element because text is above the buttons
|
|
1310
1522
|
* ...text().below().button()
|
|
1311
1523
|
* ```
|
|
1312
1524
|
* 
|
|
@@ -1329,22 +1541,54 @@ export declare class FluentFiltersOrRelationsCondition extends FluentFiltersCond
|
|
|
1329
1541
|
*
|
|
1330
1542
|
* **Examples:**
|
|
1331
1543
|
* ```typescript
|
|
1332
|
-
*
|
|
1333
|
-
* |
|
|
1334
|
-
*
|
|
1335
|
-
*
|
|
1336
|
-
*
|
|
1337
|
-
*
|
|
1338
|
-
*
|
|
1339
|
-
*
|
|
1340
|
-
*
|
|
1341
|
-
*
|
|
1342
|
-
*
|
|
1544
|
+
* ------------
|
|
1545
|
+
* | text3 |
|
|
1546
|
+
* ------------
|
|
1547
|
+
* ------------
|
|
1548
|
+
* | text2 |
|
|
1549
|
+
* ------------
|
|
1550
|
+
* ------------
|
|
1551
|
+
* | text1 |
|
|
1552
|
+
* ------------
|
|
1553
|
+
* ------------
|
|
1554
|
+
* | text0 |
|
|
1555
|
+
* ------------
|
|
1556
|
+
* ------------
|
|
1557
|
+
* | button |
|
|
1558
|
+
* ------------
|
|
1559
|
+
*
|
|
1560
|
+
* // General explanation for element_center_line
|
|
1561
|
+
* // This will find text0 and text3
|
|
1562
|
+
* ...text().above(..., 'element_center_line').button()
|
|
1563
|
+
*
|
|
1564
|
+
* // General explanation for element_edge_area
|
|
1565
|
+
* // This will find text0, text1 and text3
|
|
1566
|
+
* ...text().above(..., 'element_edge_area').button()
|
|
1567
|
+
*
|
|
1568
|
+
* // General explanation and display_edge_area
|
|
1569
|
+
* // This will find text0, text1, text2 and text3
|
|
1570
|
+
* ...text().above(..., 'display_edge_area').button()
|
|
1571
|
+
*
|
|
1572
|
+
* // More examples:
|
|
1573
|
+
* // Returns text0 because it is the first element above button
|
|
1343
1574
|
* ...text().above().button()
|
|
1344
1575
|
* ...text().above(0).button()
|
|
1345
|
-
*
|
|
1346
|
-
*
|
|
1347
|
-
* // Returns
|
|
1576
|
+
* ...text().above(0, 'element_edge_area').button()
|
|
1577
|
+
*
|
|
1578
|
+
* // Returns text3 because it is the second text touched by the
|
|
1579
|
+
* // vertical line from the center of button
|
|
1580
|
+
* // Notice: text1 is not touched!
|
|
1581
|
+
* ...text().above(1, 'element_center_line').button()
|
|
1582
|
+
*
|
|
1583
|
+
* // Returns text3 because it is the third text touched by the
|
|
1584
|
+
* // vertical area above the x-axis of button
|
|
1585
|
+
* // Notice: text2 is not touched!
|
|
1586
|
+
* ...text().above(2, 'element_edge_area').button()
|
|
1587
|
+
*
|
|
1588
|
+
* // Returns text2 because it is the third element above button
|
|
1589
|
+
* ...text().above(2, 'display_edge_area').button()
|
|
1590
|
+
*
|
|
1591
|
+
* // Returns no element because button is below the texts
|
|
1348
1592
|
* ...button().above().text()
|
|
1349
1593
|
* ```
|
|
1350
1594
|
* 
|
|
@@ -1458,7 +1702,7 @@ declare class ExecCondition extends Exec {
|
|
|
1458
1702
|
export declare abstract class FluentCommand extends FluentBase {
|
|
1459
1703
|
constructor();
|
|
1460
1704
|
/**
|
|
1461
|
-
* Expects a condition,
|
|
1705
|
+
* Expects a condition, for example, `exists()` or `notExits()`.
|
|
1462
1706
|
*
|
|
1463
1707
|
* Use the structure `expect().<your filter>.(exists()|notExists())` as shown in the examples below.
|
|
1464
1708
|
*
|
|
@@ -1496,7 +1740,7 @@ export declare abstract class FluentCommand extends FluentBase {
|
|
|
1496
1740
|
* await aui.moveMouseTo().text().withText('Grinning_Face').exec()
|
|
1497
1741
|
* ```
|
|
1498
1742
|
*
|
|
1499
|
-
* 
|
|
1500
1744
|
*
|
|
1501
1745
|
*
|
|
1502
1746
|
*
|
|
@@ -1532,7 +1776,7 @@ export declare abstract class FluentCommand extends FluentBase {
|
|
|
1532
1776
|
* await aui.scrollInside(0,-500).text().withText('Bottom sheet').exec();
|
|
1533
1777
|
* ```
|
|
1534
1778
|
*
|
|
1535
|
-
* 
|
|
1536
1780
|
*
|
|
1537
1781
|
* @param {number} x_offset - A (positive/negative) x direction.
|
|
1538
1782
|
* @param {number} y_offset - A (positive/negative) y direction.
|
|
@@ -1604,7 +1848,7 @@ export declare abstract class FluentCommand extends FluentBase {
|
|
|
1604
1848
|
* await aui.moveMouseRelatively(0, 50).exec();
|
|
1605
1849
|
* ```
|
|
1606
1850
|
*
|
|
1607
|
-
* 
|
|
1608
1852
|
*
|
|
1609
1853
|
* @param {number} x_offset - A (positive/negative) x direction.
|
|
1610
1854
|
* @param {number} y_offset - A (positive/negative) y direction.
|
|
@@ -1669,11 +1913,12 @@ export declare abstract class FluentCommand extends FluentBase {
|
|
|
1669
1913
|
* await aui.execOnShell("chrome").exec();
|
|
1670
1914
|
* ```
|
|
1671
1915
|
*
|
|
1672
|
-
* @param {string}
|
|
1916
|
+
* @param {string} shellCommand - A shell command which is executed.
|
|
1917
|
+
* @param {number} [timeoutInMilliseconds=1] - A timeout in milliseconds.
|
|
1673
1918
|
*
|
|
1674
1919
|
* @return {Exec}
|
|
1675
1920
|
*/
|
|
1676
|
-
execOnShell(
|
|
1921
|
+
execOnShell(shellCommand: string, timeoutInMilliseconds?: number): Exec;
|
|
1677
1922
|
/**
|
|
1678
1923
|
* Clicks with left mouse key.
|
|
1679
1924
|
*
|
|
@@ -1735,7 +1980,7 @@ export declare abstract class FluentCommand extends FluentBase {
|
|
|
1735
1980
|
* await aui.mouseDoubleLeftClick().exec();
|
|
1736
1981
|
* ```
|
|
1737
1982
|
*
|
|
1738
|
-
* 
|
|
1739
1984
|
*
|
|
1740
1985
|
* @return {Exec}
|
|
1741
1986
|
*/
|
|
@@ -1877,7 +2122,7 @@ export declare abstract class FluentCommand extends FluentBase {
|
|
|
1877
2122
|
* await aui.pressAndroidTwoKey('volume_down', 'power').exec();
|
|
1878
2123
|
* ```
|
|
1879
2124
|
*
|
|
1880
|
-
* 
|
|
1881
2126
|
*
|
|
1882
2127
|
* @param {ANDROID_KEY} first_key - A Android key
|
|
1883
2128
|
* @param {ANDROID_KEY} second_key - A Android key
|
|
@@ -2059,7 +2304,7 @@ export declare class FluentFiltersGetter extends FluentBase {
|
|
|
2059
2304
|
* .customElement({
|
|
2060
2305
|
* customImage: './logo.png', // required
|
|
2061
2306
|
* name: 'myLogo', // optional
|
|
2062
|
-
* threshold: 0.
|
|
2307
|
+
* threshold: 0.5, // optional, defaults to 0.5
|
|
2063
2308
|
* stopThreshold: 0.9, // optional, defaults to 0.9
|
|
2064
2309
|
* rotationDegreePerStep: 0, // optional, defaults to 0
|
|
2065
2310
|
* imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
|
|
@@ -2075,7 +2320,7 @@ export declare class FluentFiltersGetter extends FluentBase {
|
|
|
2075
2320
|
* - **name** (*`string`, optional*):
|
|
2076
2321
|
* - A unique name that can be used for filtering for the custom element. If not given, any text inside the custom image will be detected via OCR.
|
|
2077
2322
|
* - **threshold** (*`number`, optional*):
|
|
2078
|
-
* - A threshold for how much a UI element needs to be similar to the custom element as defined by the image. Takes values between `0.0` (== all elements are recognized as the custom element which is probably not what you want) and `1.0` (== elements need to look exactly like the `customImage` which is unlikely to be achieved as even minor differences count). Defaults to `0.
|
|
2323
|
+
* - A threshold for how much a UI element needs to be similar to the custom element as defined by the image. Takes values between `0.0` (== all elements are recognized as the custom element which is probably not what you want) and `1.0` (== elements need to look exactly like the `customImage` which is unlikely to be achieved as even minor differences count). Defaults to `0.5`.
|
|
2079
2324
|
* - **stopThreshold** (*`number`, optional*):
|
|
2080
2325
|
* - A threshold for when to stop searching for UI elements similar to the custom element. As soon as UI elements have been found that are at least as similar as the `stopThreshold`, the search is going to stop. After that elements are filtered using the `threshold`. Because of that the `stopThreshold` should be greater than or equal to `threshold`. It is primarily to be used as a speed improvement (by lowering the value). Takes values between `0.0` and `1.0`. Defaults to `0.9`.
|
|
2081
2326
|
* - **rotationDegreePerStep** (*`number`, optional*):
|
|
@@ -2191,7 +2436,7 @@ export declare class FluentFiltersGetter extends FluentBase {
|
|
|
2191
2436
|
* await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
|
|
2192
2437
|
* ```
|
|
2193
2438
|
*
|
|
2194
|
-
* 
|
|
2195
2440
|
*
|
|
2196
2441
|
*
|
|
2197
2442
|
*
|
|
@@ -2216,7 +2461,7 @@ export declare class FluentFiltersGetter extends FluentBase {
|
|
|
2216
2461
|
* await aui.moveMouseTo().text().withExactText('Password').exec()
|
|
2217
2462
|
* ```
|
|
2218
2463
|
*
|
|
2219
|
-
* 
|
|
2220
2465
|
*
|
|
2221
2466
|
*
|
|
2222
2467
|
*
|
|
@@ -2252,7 +2497,7 @@ export declare class FluentFiltersGetter extends FluentBase {
|
|
|
2252
2497
|
* **Important: _Matching only returns the best matching element when you use it with `get()`_**
|
|
2253
2498
|
*
|
|
2254
2499
|
* A bit of playing around to find a matching description is sometimes needed:
|
|
2255
|
-
*
|
|
2500
|
+
* For example, `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
|
|
2256
2501
|
* Generally, the more detail the better.
|
|
2257
2502
|
*
|
|
2258
2503
|
* We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
|
|
@@ -2418,17 +2663,46 @@ export declare class FluentFiltersOrRelationsGetter extends FluentFiltersGetter
|
|
|
2418
2663
|
*
|
|
2419
2664
|
* **Examples:**
|
|
2420
2665
|
* ```typescript
|
|
2421
|
-
*
|
|
2422
|
-
* |
|
|
2423
|
-
*
|
|
2666
|
+
* ---------- --------- ---------
|
|
2667
|
+
* | button | | text0 | | text3 |
|
|
2668
|
+
* ---------- --------- --------- ---------
|
|
2669
|
+
* | text1 | ---------
|
|
2670
|
+
* --------- | text2 |
|
|
2671
|
+
* ---------
|
|
2672
|
+
*
|
|
2673
|
+
* // General explanation for element_center_line
|
|
2674
|
+
* // This will find text0 and text3
|
|
2675
|
+
* ...text().rightOf(..., 'element_center_line').button()
|
|
2676
|
+
*
|
|
2677
|
+
* // General explanation for element_edge_area
|
|
2678
|
+
* // This will find text0, text1 and text3
|
|
2679
|
+
* ...text().rightOf(..., 'element_edge_area').button()
|
|
2680
|
+
*
|
|
2681
|
+
* // General explanation and display_edge_area
|
|
2682
|
+
* // This will find text0, text1, text2 and text3
|
|
2683
|
+
* ...text().rightOf(..., 'display_edge_area').button()
|
|
2424
2684
|
*
|
|
2425
|
-
* //
|
|
2426
|
-
*
|
|
2427
|
-
* ...
|
|
2428
|
-
*
|
|
2429
|
-
* ...
|
|
2430
|
-
*
|
|
2431
|
-
*
|
|
2685
|
+
* // More examples:
|
|
2686
|
+
* // Returns text0 because it is the first element rightOf button
|
|
2687
|
+
* ...text().rightOf().button()
|
|
2688
|
+
* ...text().rightOf(0).button()
|
|
2689
|
+
* ...text().rightOf(0, 'element_edge_area').button()
|
|
2690
|
+
*
|
|
2691
|
+
* // Returns text3 because it is the second text touched by the
|
|
2692
|
+
* // horizontal line from the center of button
|
|
2693
|
+
* // Notice: text1 is not touched!
|
|
2694
|
+
* ...text().rightOf(1, 'element_center_line').button()
|
|
2695
|
+
*
|
|
2696
|
+
* // Returns text3 because it is the third text touched by the
|
|
2697
|
+
* // vertical area rightOf the y-axis of button
|
|
2698
|
+
* // Notice: text2 is not touched!
|
|
2699
|
+
* ...text().rightOf(2, 'element_edge_area').button()
|
|
2700
|
+
*
|
|
2701
|
+
* // Returns text2 because it is the third element rightOf button
|
|
2702
|
+
* ...text().rightOf(2, 'display_edge_area').button()
|
|
2703
|
+
*
|
|
2704
|
+
* // Returns no element because button is rightOf the texts
|
|
2705
|
+
* ...button().rightOf().text()
|
|
2432
2706
|
* ```
|
|
2433
2707
|
* 
|
|
2434
2708
|
*
|
|
@@ -2450,17 +2724,46 @@ export declare class FluentFiltersOrRelationsGetter extends FluentFiltersGetter
|
|
|
2450
2724
|
*
|
|
2451
2725
|
* **Examples:**
|
|
2452
2726
|
* ```typescript
|
|
2453
|
-
*
|
|
2454
|
-
* |
|
|
2455
|
-
*
|
|
2727
|
+
* --------- --------- ----------
|
|
2728
|
+
* | text3 | | text0 | | button |
|
|
2729
|
+
* --------- --------- --------- ----------
|
|
2730
|
+
* --------- | text1 |
|
|
2731
|
+
* | text2 | ---------
|
|
2732
|
+
* ---------
|
|
2733
|
+
*
|
|
2734
|
+
* // General explanation for element_center_line
|
|
2735
|
+
* // This will find text0 and text3
|
|
2736
|
+
* ...text().leftOf(..., 'element_center_line').button()
|
|
2737
|
+
*
|
|
2738
|
+
* // General explanation for element_edge_area
|
|
2739
|
+
* // This will find text0, text1 and text3
|
|
2740
|
+
* ...text().leftOf(..., 'element_edge_area').button()
|
|
2456
2741
|
*
|
|
2457
|
-
* //
|
|
2458
|
-
*
|
|
2459
|
-
* ...
|
|
2460
|
-
*
|
|
2461
|
-
*
|
|
2462
|
-
* // Returns
|
|
2463
|
-
* ...
|
|
2742
|
+
* // General explanation and display_edge_area
|
|
2743
|
+
* // This will find text0, text1, text2 and text3
|
|
2744
|
+
* ...text().leftOf(..., 'display_edge_area').button()
|
|
2745
|
+
*
|
|
2746
|
+
* // More examples:
|
|
2747
|
+
* // Returns text0 because it is the first element leftOf button
|
|
2748
|
+
* ...text().leftOf().button()
|
|
2749
|
+
* ...text().leftOf(0).button()
|
|
2750
|
+
* ...text().leftOf(0, 'element_edge_area').button()
|
|
2751
|
+
*
|
|
2752
|
+
* // Returns text3 because it is the second text touched by the
|
|
2753
|
+
* // horizontal line from the center of button
|
|
2754
|
+
* // Notice: text1 is not touched!
|
|
2755
|
+
* ...text().leftOf(1, 'element_center_line').button()
|
|
2756
|
+
*
|
|
2757
|
+
* // Returns text3 because it is the third text touched by the
|
|
2758
|
+
* // vertical area leftOf the y-axis of button
|
|
2759
|
+
* // Notice: text2 is not touched!
|
|
2760
|
+
* ...text().leftOf(2, 'element_edge_area').button()
|
|
2761
|
+
*
|
|
2762
|
+
* // Returns text2 because it is the third element leftOf button
|
|
2763
|
+
* ...text().leftOf(2, 'display_edge_area').button()
|
|
2764
|
+
*
|
|
2765
|
+
* // Returns no element because button is rightOf the texts
|
|
2766
|
+
* ...button().leftOf().text()
|
|
2464
2767
|
* ```
|
|
2465
2768
|
* 
|
|
2466
2769
|
*
|
|
@@ -2482,22 +2785,54 @@ export declare class FluentFiltersOrRelationsGetter extends FluentFiltersGetter
|
|
|
2482
2785
|
*
|
|
2483
2786
|
* **Examples:**
|
|
2484
2787
|
* ```typescript
|
|
2485
|
-
*
|
|
2486
|
-
* |
|
|
2487
|
-
*
|
|
2488
|
-
*
|
|
2489
|
-
* |
|
|
2490
|
-
*
|
|
2491
|
-
*
|
|
2492
|
-
*
|
|
2493
|
-
*
|
|
2494
|
-
*
|
|
2788
|
+
* ------------
|
|
2789
|
+
* | text |
|
|
2790
|
+
* ------------
|
|
2791
|
+
* ------------
|
|
2792
|
+
* | button0 |
|
|
2793
|
+
* ------------
|
|
2794
|
+
* -----------
|
|
2795
|
+
* | button1 |
|
|
2796
|
+
* -----------
|
|
2797
|
+
* -----------
|
|
2798
|
+
* | button2 |
|
|
2799
|
+
* -----------
|
|
2800
|
+
* ------------
|
|
2801
|
+
* | button3 |
|
|
2802
|
+
* ------------
|
|
2803
|
+
*
|
|
2804
|
+
* // General explanation for element_center_line
|
|
2805
|
+
* // This will find button0 and button3
|
|
2806
|
+
* ...button().below(..., 'element_center_line').text()
|
|
2807
|
+
*
|
|
2808
|
+
* // General explanation for element_edge_area
|
|
2809
|
+
* // This will find button0, button1 and button3
|
|
2810
|
+
* ...button().below(..., 'element_edge_area').text()
|
|
2811
|
+
*
|
|
2812
|
+
* // General explanation and display_edge_area
|
|
2813
|
+
* // This will find button0, button1, button2 and button3
|
|
2814
|
+
* ...button().below(..., 'display_edge_area').text()
|
|
2815
|
+
*
|
|
2816
|
+
* // More examples:
|
|
2495
2817
|
* // Returns button0 because button0 is the first button below text
|
|
2496
2818
|
* ...button().below().text()
|
|
2497
2819
|
* ...button().below(0).text()
|
|
2498
|
-
*
|
|
2499
|
-
*
|
|
2500
|
-
* // Returns
|
|
2820
|
+
* ...button().below(0, 'element_edge_area').text()
|
|
2821
|
+
*
|
|
2822
|
+
* // Returns button3 because it is the second button touched by the
|
|
2823
|
+
* // vertical line from the center of text
|
|
2824
|
+
* // Notice: button1 is not touched
|
|
2825
|
+
* ...button().below(1, 'element_center_line').text()
|
|
2826
|
+
*
|
|
2827
|
+
* // Returns button3 because it is the third button touched by the
|
|
2828
|
+
* // vertical area below the x-axis of text
|
|
2829
|
+
* // Notice: button2 is not touched!
|
|
2830
|
+
* ...button().below(2, 'element_edge_area').text()
|
|
2831
|
+
*
|
|
2832
|
+
* // Returns button2 because it is the third element below text
|
|
2833
|
+
* ...button().below(2, 'display_edge_area').text()
|
|
2834
|
+
*
|
|
2835
|
+
* // Returns no element because text is above the buttons
|
|
2501
2836
|
* ...text().below().button()
|
|
2502
2837
|
* ```
|
|
2503
2838
|
* 
|
|
@@ -2520,22 +2855,54 @@ export declare class FluentFiltersOrRelationsGetter extends FluentFiltersGetter
|
|
|
2520
2855
|
*
|
|
2521
2856
|
* **Examples:**
|
|
2522
2857
|
* ```typescript
|
|
2523
|
-
*
|
|
2524
|
-
* |
|
|
2525
|
-
*
|
|
2526
|
-
*
|
|
2527
|
-
*
|
|
2528
|
-
*
|
|
2529
|
-
*
|
|
2530
|
-
*
|
|
2531
|
-
*
|
|
2532
|
-
*
|
|
2533
|
-
*
|
|
2858
|
+
* ------------
|
|
2859
|
+
* | text3 |
|
|
2860
|
+
* ------------
|
|
2861
|
+
* ------------
|
|
2862
|
+
* | text2 |
|
|
2863
|
+
* ------------
|
|
2864
|
+
* ------------
|
|
2865
|
+
* | text1 |
|
|
2866
|
+
* ------------
|
|
2867
|
+
* ------------
|
|
2868
|
+
* | text0 |
|
|
2869
|
+
* ------------
|
|
2870
|
+
* ------------
|
|
2871
|
+
* | button |
|
|
2872
|
+
* ------------
|
|
2873
|
+
*
|
|
2874
|
+
* // General explanation for element_center_line
|
|
2875
|
+
* // This will find text0 and text3
|
|
2876
|
+
* ...text().above(..., 'element_center_line').button()
|
|
2877
|
+
*
|
|
2878
|
+
* // General explanation for element_edge_area
|
|
2879
|
+
* // This will find text0, text1 and text3
|
|
2880
|
+
* ...text().above(..., 'element_edge_area').button()
|
|
2881
|
+
*
|
|
2882
|
+
* // General explanation and display_edge_area
|
|
2883
|
+
* // This will find text0, text1, text2 and text3
|
|
2884
|
+
* ...text().above(..., 'display_edge_area').button()
|
|
2885
|
+
*
|
|
2886
|
+
* // More examples:
|
|
2887
|
+
* // Returns text0 because it is the first element above button
|
|
2534
2888
|
* ...text().above().button()
|
|
2535
2889
|
* ...text().above(0).button()
|
|
2536
|
-
*
|
|
2537
|
-
*
|
|
2538
|
-
* // Returns
|
|
2890
|
+
* ...text().above(0, 'element_edge_area').button()
|
|
2891
|
+
*
|
|
2892
|
+
* // Returns text3 because it is the second text touched by the
|
|
2893
|
+
* // vertical line from the center of button
|
|
2894
|
+
* // Notice: text1 is not touched!
|
|
2895
|
+
* ...text().above(1, 'element_center_line').button()
|
|
2896
|
+
*
|
|
2897
|
+
* // Returns text3 because it is the third text touched by the
|
|
2898
|
+
* // vertical area above the x-axis of button
|
|
2899
|
+
* // Notice: text2 is not touched!
|
|
2900
|
+
* ...text().above(2, 'element_edge_area').button()
|
|
2901
|
+
*
|
|
2902
|
+
* // Returns text2 because it is the third element above button
|
|
2903
|
+
* ...text().above(2, 'display_edge_area').button()
|
|
2904
|
+
*
|
|
2905
|
+
* // Returns no element because button is below the texts
|
|
2539
2906
|
* ...button().above().text()
|
|
2540
2907
|
* ```
|
|
2541
2908
|
* 
|