@testsmith/testblocks 0.9.4 → 0.9.7
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/cli/index.js +4 -1
- package/dist/client/assets/index-B8OSvcUg.css +1 -0
- package/dist/client/assets/index-CMMJHs_d.js +2197 -0
- package/dist/client/assets/index-CMMJHs_d.js.map +1 -0
- package/dist/client/index.html +2 -2
- package/dist/core/blocks/api/ApiAssertBodyContainsBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiAssertBodyContainsBlock.js +40 -0
- package/dist/core/blocks/api/ApiAssertStatusBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiAssertStatusBlock.js +35 -0
- package/dist/core/blocks/api/ApiClearHeadersBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiClearHeadersBlock.js +25 -0
- package/dist/core/blocks/api/ApiDeleteBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiDeleteBlock.js +37 -0
- package/dist/core/blocks/api/ApiExtractBlock.d.ts +14 -0
- package/dist/core/blocks/api/ApiExtractBlock.js +40 -0
- package/dist/core/blocks/api/ApiExtractJsonPathBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiExtractJsonPathBlock.js +47 -0
- package/dist/core/blocks/api/ApiExtractXPathBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiExtractXPathBlock.js +70 -0
- package/dist/core/blocks/api/ApiGetBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiGetBlock.js +36 -0
- package/dist/core/blocks/api/ApiHeadersBlock.d.ts +14 -0
- package/dist/core/blocks/api/ApiHeadersBlock.js +44 -0
- package/dist/core/blocks/api/ApiJsonBodyBlock.d.ts +14 -0
- package/dist/core/blocks/api/ApiJsonBodyBlock.js +28 -0
- package/dist/core/blocks/api/ApiPatchBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiPatchBlock.js +47 -0
- package/dist/core/blocks/api/ApiPostBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiPostBlock.js +47 -0
- package/dist/core/blocks/api/ApiPutBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiPutBlock.js +47 -0
- package/dist/core/blocks/api/ApiSetHeaderBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiSetHeaderBlock.js +37 -0
- package/dist/core/blocks/api/ApiSetHeadersBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiSetHeadersBlock.js +41 -0
- package/dist/core/blocks/api/index.d.ts +25 -0
- package/dist/core/blocks/api/index.js +83 -0
- package/dist/core/blocks/base/Block.d.ts +59 -0
- package/dist/core/blocks/base/Block.js +151 -0
- package/dist/core/blocks/base/ContainerBlock.d.ts +14 -0
- package/dist/core/blocks/base/ContainerBlock.js +16 -0
- package/dist/core/blocks/base/ControlFlowBlock.d.ts +13 -0
- package/dist/core/blocks/base/ControlFlowBlock.js +17 -0
- package/dist/core/blocks/base/StatementBlock.d.ts +9 -0
- package/dist/core/blocks/base/StatementBlock.js +16 -0
- package/dist/core/blocks/base/ValueBlock.d.ts +12 -0
- package/dist/core/blocks/base/ValueBlock.js +16 -0
- package/dist/core/blocks/base/index.d.ts +5 -0
- package/dist/core/blocks/base/index.js +13 -0
- package/dist/core/blocks/data/DataCsvBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataCsvBlock.js +51 -0
- package/dist/core/blocks/data/DataDefineBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataDefineBlock.js +28 -0
- package/dist/core/blocks/data/DataForeachBlock.d.ts +13 -0
- package/dist/core/blocks/data/DataForeachBlock.js +37 -0
- package/dist/core/blocks/data/DataFromVariableBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataFromVariableBlock.js +27 -0
- package/dist/core/blocks/data/DataGetCurrentBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataGetCurrentBlock.js +34 -0
- package/dist/core/blocks/data/DataGetIndexBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataGetIndexBlock.js +24 -0
- package/dist/core/blocks/data/DataGetNameBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataGetNameBlock.js +24 -0
- package/dist/core/blocks/data/DataRangeBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataRangeBlock.js +40 -0
- package/dist/core/blocks/data/DataRowBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataRowBlock.js +33 -0
- package/dist/core/blocks/data/DataTableBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataTableBlock.js +51 -0
- package/dist/core/blocks/data/index.d.ts +20 -0
- package/dist/core/blocks/data/index.js +57 -0
- package/dist/core/blocks/index.d.ts +66 -5
- package/dist/core/blocks/index.js +134 -35
- package/dist/core/blocks/lifecycle/LifecycleAfterAllBlock.d.ts +15 -0
- package/dist/core/blocks/lifecycle/LifecycleAfterAllBlock.js +27 -0
- package/dist/core/blocks/lifecycle/LifecycleAfterEachBlock.d.ts +15 -0
- package/dist/core/blocks/lifecycle/LifecycleAfterEachBlock.js +27 -0
- package/dist/core/blocks/lifecycle/LifecycleBeforeAllBlock.d.ts +15 -0
- package/dist/core/blocks/lifecycle/LifecycleBeforeAllBlock.js +28 -0
- package/dist/core/blocks/lifecycle/LifecycleBeforeEachBlock.d.ts +15 -0
- package/dist/core/blocks/lifecycle/LifecycleBeforeEachBlock.js +27 -0
- package/dist/core/blocks/lifecycle/LifecycleOnFailureBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleOnFailureBlock.js +25 -0
- package/dist/core/blocks/lifecycle/LifecycleRetryBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleRetryBlock.js +29 -0
- package/dist/core/blocks/lifecycle/LifecycleSetupBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleSetupBlock.js +27 -0
- package/dist/core/blocks/lifecycle/LifecycleSkipIfBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleSkipIfBlock.js +31 -0
- package/dist/core/blocks/lifecycle/LifecycleTeardownBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleTeardownBlock.js +27 -0
- package/dist/core/blocks/lifecycle/TestCaseBlock.d.ts +21 -0
- package/dist/core/blocks/lifecycle/TestCaseBlock.js +72 -0
- package/dist/core/blocks/lifecycle/TestCaseDataDrivenBlock.d.ts +21 -0
- package/dist/core/blocks/lifecycle/TestCaseDataDrivenBlock.js +102 -0
- package/dist/core/blocks/lifecycle/index.d.ts +21 -0
- package/dist/core/blocks/lifecycle/index.js +63 -0
- package/dist/core/blocks/logic/LogicArrayBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicArrayBlock.js +28 -0
- package/dist/core/blocks/logic/LogicAssertBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicAssertBlock.js +32 -0
- package/dist/core/blocks/logic/LogicBooleanBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicBooleanBlock.js +26 -0
- package/dist/core/blocks/logic/LogicBooleanOpBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicBooleanOpBlock.js +31 -0
- package/dist/core/blocks/logic/LogicCommentBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicCommentBlock.js +26 -0
- package/dist/core/blocks/logic/LogicCompareBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicCompareBlock.js +52 -0
- package/dist/core/blocks/logic/LogicFailBlock.d.ts +16 -0
- package/dist/core/blocks/logic/LogicFailBlock.js +30 -0
- package/dist/core/blocks/logic/LogicForeachBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicForeachBlock.js +29 -0
- package/dist/core/blocks/logic/LogicGetVariableBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicGetVariableBlock.js +27 -0
- package/dist/core/blocks/logic/LogicIfBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicIfBlock.js +36 -0
- package/dist/core/blocks/logic/LogicLogBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicLogBlock.js +30 -0
- package/dist/core/blocks/logic/LogicNotBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicNotBlock.js +26 -0
- package/dist/core/blocks/logic/LogicNumberBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicNumberBlock.js +26 -0
- package/dist/core/blocks/logic/LogicObjectBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicObjectBlock.js +28 -0
- package/dist/core/blocks/logic/LogicRepeatBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicRepeatBlock.js +27 -0
- package/dist/core/blocks/logic/LogicSetVariableBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicSetVariableBlock.js +34 -0
- package/dist/core/blocks/logic/LogicTextBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicTextBlock.js +27 -0
- package/dist/core/blocks/logic/LogicTryCatchBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicTryCatchBlock.js +26 -0
- package/dist/core/blocks/logic/index.d.ts +28 -0
- package/dist/core/blocks/logic/index.js +95 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAccessibleDescriptionBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAccessibleDescriptionBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAccessibleNameBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAccessibleNameBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAttachedBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAttachedBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAttributeBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAttributeBlock.js +44 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCheckedBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCheckedBlock.js +48 -0
- package/dist/core/blocks/playwright/assertions/WebAssertClassBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertClassBlock.js +43 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCountBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCountBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCssBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCssBlock.js +44 -0
- package/dist/core/blocks/playwright/assertions/WebAssertDisabledBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertDisabledBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEditableBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEditableBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEmptyBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEmptyBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEnabledBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEnabledBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertFocusedBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertFocusedBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertIdBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertIdBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertInViewportBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertInViewportBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertNotVisibleBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertNotVisibleBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertRoleBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertRoleBlock.js +69 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTextContainsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTextContainsBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTextEqualsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTextEqualsBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTitleContainsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTitleContainsBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTitleEqualsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTitleEqualsBlock.js +36 -0
- package/dist/core/blocks/playwright/assertions/WebAssertUrlContainsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertUrlContainsBlock.js +40 -0
- package/dist/core/blocks/playwright/assertions/WebAssertUrlEqualsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertUrlEqualsBlock.js +37 -0
- package/dist/core/blocks/playwright/assertions/WebAssertValueBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertValueBlock.js +43 -0
- package/dist/core/blocks/playwright/assertions/WebAssertValueContainsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertValueContainsBlock.js +43 -0
- package/dist/core/blocks/playwright/assertions/WebAssertVisibleBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertVisibleBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/index.d.ts +36 -0
- package/dist/core/blocks/playwright/assertions/index.js +127 -0
- package/dist/core/blocks/playwright/index.d.ts +16 -0
- package/dist/core/blocks/playwright/index.js +28 -3
- package/dist/core/blocks/playwright/interactions/WebCheckboxBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebCheckboxBlock.js +43 -0
- package/dist/core/blocks/playwright/interactions/WebClickBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebClickBlock.js +34 -0
- package/dist/core/blocks/playwright/interactions/WebDragAndDropBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebDragAndDropBlock.js +37 -0
- package/dist/core/blocks/playwright/interactions/WebFillBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebFillBlock.js +38 -0
- package/dist/core/blocks/playwright/interactions/WebFocusBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebFocusBlock.js +34 -0
- package/dist/core/blocks/playwright/interactions/WebHoverBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebHoverBlock.js +34 -0
- package/dist/core/blocks/playwright/interactions/WebPressKeyBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebPressKeyBlock.js +37 -0
- package/dist/core/blocks/playwright/interactions/WebScrollIntoViewBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebScrollIntoViewBlock.js +34 -0
- package/dist/core/blocks/playwright/interactions/WebSelectBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebSelectBlock.js +37 -0
- package/dist/core/blocks/playwright/interactions/WebTypeBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebTypeBlock.js +41 -0
- package/dist/core/blocks/playwright/interactions/WebUploadFileBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebUploadFileBlock.js +39 -0
- package/dist/core/blocks/playwright/interactions/index.d.ts +21 -0
- package/dist/core/blocks/playwright/interactions/index.js +56 -0
- package/dist/core/blocks/playwright/navigation/WebNavigateBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebNavigateBlock.js +36 -0
- package/dist/core/blocks/playwright/navigation/WebScreenshotBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebScreenshotBlock.js +36 -0
- package/dist/core/blocks/playwright/navigation/WebWaitBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebWaitBlock.js +32 -0
- package/dist/core/blocks/playwright/navigation/WebWaitForElementBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebWaitForElementBlock.js +37 -0
- package/dist/core/blocks/playwright/navigation/WebWaitForUrlBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebWaitForUrlBlock.js +34 -0
- package/dist/core/blocks/playwright/navigation/index.d.ts +15 -0
- package/dist/core/blocks/playwright/navigation/index.js +32 -0
- package/dist/core/blocks/playwright/retrieval/WebCountElementsBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebCountElementsBlock.js +36 -0
- package/dist/core/blocks/playwright/retrieval/WebGetAttributeBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetAttributeBlock.js +42 -0
- package/dist/core/blocks/playwright/retrieval/WebGetInputValueBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetInputValueBlock.js +40 -0
- package/dist/core/blocks/playwright/retrieval/WebGetTextBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetTextBlock.js +40 -0
- package/dist/core/blocks/playwright/retrieval/WebGetTitleBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetTitleBlock.js +31 -0
- package/dist/core/blocks/playwright/retrieval/WebGetUrlBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetUrlBlock.js +31 -0
- package/dist/core/blocks/playwright/retrieval/index.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/index.js +36 -0
- package/dist/core/blocks/playwright/types.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureCallBlock.d.ts +13 -0
- package/dist/core/blocks/procedures/ProcedureCallBlock.js +66 -0
- package/dist/core/blocks/procedures/ProcedureCallWithReturnBlock.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureCallWithReturnBlock.js +51 -0
- package/dist/core/blocks/procedures/ProcedureDefineBlock.d.ts +15 -0
- package/dist/core/blocks/procedures/ProcedureDefineBlock.js +59 -0
- package/dist/core/blocks/procedures/ProcedureFillFormBlock.d.ts +13 -0
- package/dist/core/blocks/procedures/ProcedureFillFormBlock.js +30 -0
- package/dist/core/blocks/procedures/ProcedureGetParamBlock.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureGetParamBlock.js +33 -0
- package/dist/core/blocks/procedures/ProcedureInlineBlock.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureInlineBlock.js +31 -0
- package/dist/core/blocks/procedures/ProcedureLoginBlock.d.ts +13 -0
- package/dist/core/blocks/procedures/ProcedureLoginBlock.js +37 -0
- package/dist/core/blocks/procedures/ProcedureMapBlock.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureMapBlock.js +36 -0
- package/dist/core/blocks/procedures/ProcedureReturnBlock.d.ts +15 -0
- package/dist/core/blocks/procedures/ProcedureReturnBlock.js +28 -0
- package/dist/core/blocks/procedures/ProcedureWaitAndClickBlock.d.ts +13 -0
- package/dist/core/blocks/procedures/ProcedureWaitAndClickBlock.js +32 -0
- package/dist/core/blocks/procedures/index.d.ts +21 -0
- package/dist/core/blocks/procedures/index.js +62 -0
- package/dist/core/blocks/{procedures.d.ts → procedures/procedureRegistry.d.ts} +10 -2
- package/dist/core/blocks/procedures/procedureRegistry.js +27 -0
- package/dist/core/blocks/utils/apiUtils.d.ts +81 -0
- package/dist/core/blocks/utils/apiUtils.js +176 -0
- package/dist/core/blocks/utils/index.d.ts +2 -0
- package/dist/core/blocks/utils/index.js +16 -0
- package/dist/core/blocks/utils/variableUtils.d.ts +19 -0
- package/dist/core/blocks/utils/variableUtils.js +69 -0
- package/dist/server/index.js +117 -11
- package/dist/server/openApiParser.d.ts +82 -0
- package/dist/server/openApiParser.js +495 -0
- package/dist/server/startServer.d.ts +1 -0
- package/dist/server/startServer.js +164 -0
- package/package.json +4 -2
- package/dist/client/assets/index-BLBBQ6Rn.js +0 -2195
- package/dist/client/assets/index-BLBBQ6Rn.js.map +0 -1
- package/dist/client/assets/index-qjoPPl9y.css +0 -1
- package/dist/core/blocks/api.d.ts +0 -2
- package/dist/core/blocks/api.js +0 -607
- package/dist/core/blocks/data-driven.d.ts +0 -2
- package/dist/core/blocks/data-driven.js +0 -245
- package/dist/core/blocks/lifecycle.d.ts +0 -2
- package/dist/core/blocks/lifecycle.js +0 -201
- package/dist/core/blocks/logic.d.ts +0 -2
- package/dist/core/blocks/logic.js +0 -360
- package/dist/core/blocks/playwright/assertions.d.ts +0 -5
- package/dist/core/blocks/playwright/assertions.js +0 -311
- package/dist/core/blocks/playwright/interactions.d.ts +0 -5
- package/dist/core/blocks/playwright/interactions.js +0 -208
- package/dist/core/blocks/playwright/navigation.d.ts +0 -5
- package/dist/core/blocks/playwright/navigation.js +0 -131
- package/dist/core/blocks/playwright/retrieval.d.ts +0 -5
- package/dist/core/blocks/playwright/retrieval.js +0 -153
- package/dist/core/blocks/playwright.d.ts +0 -13
- package/dist/core/blocks/playwright.js +0 -17
- package/dist/core/blocks/procedures.js +0 -321
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebFillBlock = void 0;
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Fill an input field (clears existing value, auto-waits).
|
|
8
|
+
*/
|
|
9
|
+
class WebFillBlock extends base_1.StatementBlock {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.type = 'web_fill';
|
|
13
|
+
this.category = 'Web';
|
|
14
|
+
this.color = '#E91E63';
|
|
15
|
+
this.tooltip = 'Fill an input field (clears existing value, auto-waits)';
|
|
16
|
+
}
|
|
17
|
+
getInputs() {
|
|
18
|
+
return [
|
|
19
|
+
{ name: 'SELECTOR', type: 'field', fieldType: 'text', required: true },
|
|
20
|
+
{ name: 'VALUE', type: 'field', fieldType: 'text', required: true },
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
async execute(params, context) {
|
|
24
|
+
const page = context.page;
|
|
25
|
+
const selector = (0, utils_1.resolveSelector)(params, context);
|
|
26
|
+
const value = (0, utils_1.resolveVariables)(params.VALUE, context);
|
|
27
|
+
const timeout = (0, utils_1.getTimeout)(context);
|
|
28
|
+
context.logger.info(`Filling ${selector} with "${value}"`);
|
|
29
|
+
await page.locator(selector).fill(value, { timeout });
|
|
30
|
+
const displayValue = value.length > 30 ? value.substring(0, 30) + '...' : value;
|
|
31
|
+
return {
|
|
32
|
+
_summary: `${params.SELECTOR} = "${displayValue}"`,
|
|
33
|
+
selector,
|
|
34
|
+
value,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.WebFillBlock = WebFillBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StatementBlock } from '../../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Focus on an element (auto-waits).
|
|
5
|
+
*/
|
|
6
|
+
export declare class WebFocusBlock extends StatementBlock {
|
|
7
|
+
readonly type = "web_focus";
|
|
8
|
+
readonly category = "Web";
|
|
9
|
+
readonly color = "#E91E63";
|
|
10
|
+
readonly tooltip = "Focus on an element (auto-waits)";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebFocusBlock = void 0;
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Focus on an element (auto-waits).
|
|
8
|
+
*/
|
|
9
|
+
class WebFocusBlock extends base_1.StatementBlock {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.type = 'web_focus';
|
|
13
|
+
this.category = 'Web';
|
|
14
|
+
this.color = '#E91E63';
|
|
15
|
+
this.tooltip = 'Focus on an element (auto-waits)';
|
|
16
|
+
}
|
|
17
|
+
getInputs() {
|
|
18
|
+
return [
|
|
19
|
+
{ name: 'SELECTOR', type: 'field', fieldType: 'text', required: true },
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
async execute(params, context) {
|
|
23
|
+
const page = context.page;
|
|
24
|
+
const selector = (0, utils_1.resolveSelector)(params, context);
|
|
25
|
+
const timeout = (0, utils_1.getTimeout)(context);
|
|
26
|
+
context.logger.info(`Focusing on ${selector}`);
|
|
27
|
+
await page.locator(selector).focus({ timeout });
|
|
28
|
+
return {
|
|
29
|
+
_summary: params.SELECTOR,
|
|
30
|
+
selector,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.WebFocusBlock = WebFocusBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StatementBlock } from '../../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Hover over an element (auto-waits).
|
|
5
|
+
*/
|
|
6
|
+
export declare class WebHoverBlock extends StatementBlock {
|
|
7
|
+
readonly type = "web_hover";
|
|
8
|
+
readonly category = "Web";
|
|
9
|
+
readonly color = "#E91E63";
|
|
10
|
+
readonly tooltip = "Hover over an element (auto-waits)";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebHoverBlock = void 0;
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Hover over an element (auto-waits).
|
|
8
|
+
*/
|
|
9
|
+
class WebHoverBlock extends base_1.StatementBlock {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.type = 'web_hover';
|
|
13
|
+
this.category = 'Web';
|
|
14
|
+
this.color = '#E91E63';
|
|
15
|
+
this.tooltip = 'Hover over an element (auto-waits)';
|
|
16
|
+
}
|
|
17
|
+
getInputs() {
|
|
18
|
+
return [
|
|
19
|
+
{ name: 'SELECTOR', type: 'field', fieldType: 'text', required: true },
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
async execute(params, context) {
|
|
23
|
+
const page = context.page;
|
|
24
|
+
const selector = (0, utils_1.resolveSelector)(params, context);
|
|
25
|
+
const timeout = (0, utils_1.getTimeout)(context);
|
|
26
|
+
context.logger.info(`Hovering over ${selector}`);
|
|
27
|
+
await page.locator(selector).hover({ timeout });
|
|
28
|
+
return {
|
|
29
|
+
_summary: params.SELECTOR,
|
|
30
|
+
selector,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.WebHoverBlock = WebHoverBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StatementBlock } from '../../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Press a keyboard key (auto-waits).
|
|
5
|
+
*/
|
|
6
|
+
export declare class WebPressKeyBlock extends StatementBlock {
|
|
7
|
+
readonly type = "web_press_key";
|
|
8
|
+
readonly category = "Web";
|
|
9
|
+
readonly color = "#E91E63";
|
|
10
|
+
readonly tooltip = "Press a keyboard key (auto-waits)";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebPressKeyBlock = void 0;
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Press a keyboard key (auto-waits).
|
|
8
|
+
*/
|
|
9
|
+
class WebPressKeyBlock extends base_1.StatementBlock {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.type = 'web_press_key';
|
|
13
|
+
this.category = 'Web';
|
|
14
|
+
this.color = '#E91E63';
|
|
15
|
+
this.tooltip = 'Press a keyboard key (auto-waits)';
|
|
16
|
+
}
|
|
17
|
+
getInputs() {
|
|
18
|
+
return [
|
|
19
|
+
{ name: 'SELECTOR', type: 'field', fieldType: 'text', required: true },
|
|
20
|
+
{ name: 'KEY', type: 'field', fieldType: 'dropdown', options: [['Enter', 'Enter'], ['Tab', 'Tab'], ['Escape', 'Escape'], ['Backspace', 'Backspace'], ['ArrowUp', 'ArrowUp'], ['ArrowDown', 'ArrowDown'], ['ArrowLeft', 'ArrowLeft'], ['ArrowRight', 'ArrowRight']] },
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
async execute(params, context) {
|
|
24
|
+
const page = context.page;
|
|
25
|
+
const selector = (0, utils_1.resolveSelector)(params, context);
|
|
26
|
+
const key = params.KEY;
|
|
27
|
+
const timeout = (0, utils_1.getTimeout)(context);
|
|
28
|
+
context.logger.info(`Pressing ${key} on ${selector}`);
|
|
29
|
+
await page.locator(selector).press(key, { timeout });
|
|
30
|
+
return {
|
|
31
|
+
_summary: `${key} on ${params.SELECTOR}`,
|
|
32
|
+
selector,
|
|
33
|
+
key,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.WebPressKeyBlock = WebPressKeyBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StatementBlock } from '../../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Scroll an element into view if needed (auto-waits for element to be attached).
|
|
5
|
+
*/
|
|
6
|
+
export declare class WebScrollIntoViewBlock extends StatementBlock {
|
|
7
|
+
readonly type = "web_scroll_into_view";
|
|
8
|
+
readonly category = "Web";
|
|
9
|
+
readonly color = "#E91E63";
|
|
10
|
+
readonly tooltip = "Scroll an element into view if needed (auto-waits for element to be attached)";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebScrollIntoViewBlock = void 0;
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Scroll an element into view if needed (auto-waits for element to be attached).
|
|
8
|
+
*/
|
|
9
|
+
class WebScrollIntoViewBlock extends base_1.StatementBlock {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.type = 'web_scroll_into_view';
|
|
13
|
+
this.category = 'Web';
|
|
14
|
+
this.color = '#E91E63';
|
|
15
|
+
this.tooltip = 'Scroll an element into view if needed (auto-waits for element to be attached)';
|
|
16
|
+
}
|
|
17
|
+
getInputs() {
|
|
18
|
+
return [
|
|
19
|
+
{ name: 'SELECTOR', type: 'field', fieldType: 'text', required: true },
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
async execute(params, context) {
|
|
23
|
+
const page = context.page;
|
|
24
|
+
const selector = (0, utils_1.resolveSelector)(params, context);
|
|
25
|
+
const timeout = (0, utils_1.getTimeout)(context);
|
|
26
|
+
context.logger.info(`Scrolling ${selector} into view`);
|
|
27
|
+
await page.locator(selector).scrollIntoViewIfNeeded({ timeout });
|
|
28
|
+
return {
|
|
29
|
+
_summary: params.SELECTOR,
|
|
30
|
+
selector,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.WebScrollIntoViewBlock = WebScrollIntoViewBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StatementBlock } from '../../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Select an option from a dropdown (auto-waits).
|
|
5
|
+
*/
|
|
6
|
+
export declare class WebSelectBlock extends StatementBlock {
|
|
7
|
+
readonly type = "web_select";
|
|
8
|
+
readonly category = "Web";
|
|
9
|
+
readonly color = "#E91E63";
|
|
10
|
+
readonly tooltip = "Select an option from a dropdown (auto-waits)";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebSelectBlock = void 0;
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Select an option from a dropdown (auto-waits).
|
|
8
|
+
*/
|
|
9
|
+
class WebSelectBlock extends base_1.StatementBlock {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.type = 'web_select';
|
|
13
|
+
this.category = 'Web';
|
|
14
|
+
this.color = '#E91E63';
|
|
15
|
+
this.tooltip = 'Select an option from a dropdown (auto-waits)';
|
|
16
|
+
}
|
|
17
|
+
getInputs() {
|
|
18
|
+
return [
|
|
19
|
+
{ name: 'SELECTOR', type: 'field', fieldType: 'text', required: true },
|
|
20
|
+
{ name: 'VALUE', type: 'field', fieldType: 'text', required: true },
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
async execute(params, context) {
|
|
24
|
+
const page = context.page;
|
|
25
|
+
const selector = (0, utils_1.resolveSelector)(params, context);
|
|
26
|
+
const value = (0, utils_1.resolveVariables)(params.VALUE, context);
|
|
27
|
+
const timeout = (0, utils_1.getTimeout)(context);
|
|
28
|
+
context.logger.info(`Selecting "${value}" in ${selector}`);
|
|
29
|
+
await page.locator(selector).selectOption(value, { timeout });
|
|
30
|
+
return {
|
|
31
|
+
_summary: `${params.SELECTOR} = "${value}"`,
|
|
32
|
+
selector,
|
|
33
|
+
value,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.WebSelectBlock = WebSelectBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StatementBlock } from '../../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Type text character by character (auto-waits).
|
|
5
|
+
*/
|
|
6
|
+
export declare class WebTypeBlock extends StatementBlock {
|
|
7
|
+
readonly type = "web_type";
|
|
8
|
+
readonly category = "Web";
|
|
9
|
+
readonly color = "#E91E63";
|
|
10
|
+
readonly tooltip = "Type text character by character (auto-waits)";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebTypeBlock = void 0;
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Type text character by character (auto-waits).
|
|
8
|
+
*/
|
|
9
|
+
class WebTypeBlock extends base_1.StatementBlock {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.type = 'web_type';
|
|
13
|
+
this.category = 'Web';
|
|
14
|
+
this.color = '#E91E63';
|
|
15
|
+
this.tooltip = 'Type text character by character (auto-waits)';
|
|
16
|
+
}
|
|
17
|
+
getInputs() {
|
|
18
|
+
return [
|
|
19
|
+
{ name: 'SELECTOR', type: 'field', fieldType: 'text', required: true },
|
|
20
|
+
{ name: 'TEXT', type: 'field', fieldType: 'text', required: true },
|
|
21
|
+
{ name: 'DELAY', type: 'field', fieldType: 'number', default: 50 },
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
async execute(params, context) {
|
|
25
|
+
const page = context.page;
|
|
26
|
+
const selector = (0, utils_1.resolveSelector)(params, context);
|
|
27
|
+
const text = (0, utils_1.resolveVariables)(params.TEXT, context);
|
|
28
|
+
const delay = params.DELAY;
|
|
29
|
+
const timeout = (0, utils_1.getTimeout)(context);
|
|
30
|
+
context.logger.info(`Typing "${text}" into ${selector}`);
|
|
31
|
+
await page.locator(selector).pressSequentially(text, { delay, timeout });
|
|
32
|
+
const displayText = text.length > 30 ? text.substring(0, 30) + '...' : text;
|
|
33
|
+
return {
|
|
34
|
+
_summary: `${params.SELECTOR} = "${displayText}"`,
|
|
35
|
+
selector,
|
|
36
|
+
text,
|
|
37
|
+
delay,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.WebTypeBlock = WebTypeBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StatementBlock } from '../../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Upload a file to a file input element (auto-waits).
|
|
5
|
+
*/
|
|
6
|
+
export declare class WebUploadFileBlock extends StatementBlock {
|
|
7
|
+
readonly type = "web_upload_file";
|
|
8
|
+
readonly category = "Web";
|
|
9
|
+
readonly color = "#E91E63";
|
|
10
|
+
readonly tooltip = "Upload a file to a file input element (auto-waits)";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebUploadFileBlock = void 0;
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Upload a file to a file input element (auto-waits).
|
|
8
|
+
*/
|
|
9
|
+
class WebUploadFileBlock extends base_1.StatementBlock {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.type = 'web_upload_file';
|
|
13
|
+
this.category = 'Web';
|
|
14
|
+
this.color = '#E91E63';
|
|
15
|
+
this.tooltip = 'Upload a file to a file input element (auto-waits)';
|
|
16
|
+
}
|
|
17
|
+
getInputs() {
|
|
18
|
+
return [
|
|
19
|
+
{ name: 'SELECTOR', type: 'field', fieldType: 'text', required: true },
|
|
20
|
+
{ name: 'FILE_PATH', type: 'field', fieldType: 'text', required: true },
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
async execute(params, context) {
|
|
24
|
+
const page = context.page;
|
|
25
|
+
const selector = (0, utils_1.resolveSelector)(params, context);
|
|
26
|
+
const filePath = (0, utils_1.resolveVariables)(params.FILE_PATH, context);
|
|
27
|
+
const timeout = (0, utils_1.getTimeout)(context);
|
|
28
|
+
context.logger.info(`Uploading file "${filePath}" to ${selector}`);
|
|
29
|
+
await page.locator(selector).setInputFiles(filePath, { timeout });
|
|
30
|
+
const fileName = filePath.split(/[/\\]/).pop() || filePath;
|
|
31
|
+
return {
|
|
32
|
+
_summary: `${params.SELECTOR} <- "${fileName}"`,
|
|
33
|
+
selector,
|
|
34
|
+
filePath,
|
|
35
|
+
fileName,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.WebUploadFileBlock = WebUploadFileBlock;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Block } from '../../base';
|
|
2
|
+
import { BlockDefinition } from '../../../types';
|
|
3
|
+
export { WebClickBlock } from './WebClickBlock';
|
|
4
|
+
export { WebFillBlock } from './WebFillBlock';
|
|
5
|
+
export { WebTypeBlock } from './WebTypeBlock';
|
|
6
|
+
export { WebPressKeyBlock } from './WebPressKeyBlock';
|
|
7
|
+
export { WebSelectBlock } from './WebSelectBlock';
|
|
8
|
+
export { WebCheckboxBlock } from './WebCheckboxBlock';
|
|
9
|
+
export { WebHoverBlock } from './WebHoverBlock';
|
|
10
|
+
export { WebUploadFileBlock } from './WebUploadFileBlock';
|
|
11
|
+
export { WebFocusBlock } from './WebFocusBlock';
|
|
12
|
+
export { WebDragAndDropBlock } from './WebDragAndDropBlock';
|
|
13
|
+
export { WebScrollIntoViewBlock } from './WebScrollIntoViewBlock';
|
|
14
|
+
/**
|
|
15
|
+
* All interaction block class instances.
|
|
16
|
+
*/
|
|
17
|
+
export declare const interactionBlockClasses: Block[];
|
|
18
|
+
/**
|
|
19
|
+
* Interaction blocks as BlockDefinition array for backward compatibility.
|
|
20
|
+
*/
|
|
21
|
+
export declare const interactionBlocks: BlockDefinition[];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.interactionBlocks = exports.interactionBlockClasses = exports.WebScrollIntoViewBlock = exports.WebDragAndDropBlock = exports.WebFocusBlock = exports.WebUploadFileBlock = exports.WebHoverBlock = exports.WebCheckboxBlock = exports.WebSelectBlock = exports.WebPressKeyBlock = exports.WebTypeBlock = exports.WebFillBlock = exports.WebClickBlock = void 0;
|
|
4
|
+
var WebClickBlock_1 = require("./WebClickBlock");
|
|
5
|
+
Object.defineProperty(exports, "WebClickBlock", { enumerable: true, get: function () { return WebClickBlock_1.WebClickBlock; } });
|
|
6
|
+
var WebFillBlock_1 = require("./WebFillBlock");
|
|
7
|
+
Object.defineProperty(exports, "WebFillBlock", { enumerable: true, get: function () { return WebFillBlock_1.WebFillBlock; } });
|
|
8
|
+
var WebTypeBlock_1 = require("./WebTypeBlock");
|
|
9
|
+
Object.defineProperty(exports, "WebTypeBlock", { enumerable: true, get: function () { return WebTypeBlock_1.WebTypeBlock; } });
|
|
10
|
+
var WebPressKeyBlock_1 = require("./WebPressKeyBlock");
|
|
11
|
+
Object.defineProperty(exports, "WebPressKeyBlock", { enumerable: true, get: function () { return WebPressKeyBlock_1.WebPressKeyBlock; } });
|
|
12
|
+
var WebSelectBlock_1 = require("./WebSelectBlock");
|
|
13
|
+
Object.defineProperty(exports, "WebSelectBlock", { enumerable: true, get: function () { return WebSelectBlock_1.WebSelectBlock; } });
|
|
14
|
+
var WebCheckboxBlock_1 = require("./WebCheckboxBlock");
|
|
15
|
+
Object.defineProperty(exports, "WebCheckboxBlock", { enumerable: true, get: function () { return WebCheckboxBlock_1.WebCheckboxBlock; } });
|
|
16
|
+
var WebHoverBlock_1 = require("./WebHoverBlock");
|
|
17
|
+
Object.defineProperty(exports, "WebHoverBlock", { enumerable: true, get: function () { return WebHoverBlock_1.WebHoverBlock; } });
|
|
18
|
+
var WebUploadFileBlock_1 = require("./WebUploadFileBlock");
|
|
19
|
+
Object.defineProperty(exports, "WebUploadFileBlock", { enumerable: true, get: function () { return WebUploadFileBlock_1.WebUploadFileBlock; } });
|
|
20
|
+
var WebFocusBlock_1 = require("./WebFocusBlock");
|
|
21
|
+
Object.defineProperty(exports, "WebFocusBlock", { enumerable: true, get: function () { return WebFocusBlock_1.WebFocusBlock; } });
|
|
22
|
+
var WebDragAndDropBlock_1 = require("./WebDragAndDropBlock");
|
|
23
|
+
Object.defineProperty(exports, "WebDragAndDropBlock", { enumerable: true, get: function () { return WebDragAndDropBlock_1.WebDragAndDropBlock; } });
|
|
24
|
+
var WebScrollIntoViewBlock_1 = require("./WebScrollIntoViewBlock");
|
|
25
|
+
Object.defineProperty(exports, "WebScrollIntoViewBlock", { enumerable: true, get: function () { return WebScrollIntoViewBlock_1.WebScrollIntoViewBlock; } });
|
|
26
|
+
const WebClickBlock_2 = require("./WebClickBlock");
|
|
27
|
+
const WebFillBlock_2 = require("./WebFillBlock");
|
|
28
|
+
const WebTypeBlock_2 = require("./WebTypeBlock");
|
|
29
|
+
const WebPressKeyBlock_2 = require("./WebPressKeyBlock");
|
|
30
|
+
const WebSelectBlock_2 = require("./WebSelectBlock");
|
|
31
|
+
const WebCheckboxBlock_2 = require("./WebCheckboxBlock");
|
|
32
|
+
const WebHoverBlock_2 = require("./WebHoverBlock");
|
|
33
|
+
const WebUploadFileBlock_2 = require("./WebUploadFileBlock");
|
|
34
|
+
const WebFocusBlock_2 = require("./WebFocusBlock");
|
|
35
|
+
const WebDragAndDropBlock_2 = require("./WebDragAndDropBlock");
|
|
36
|
+
const WebScrollIntoViewBlock_2 = require("./WebScrollIntoViewBlock");
|
|
37
|
+
/**
|
|
38
|
+
* All interaction block class instances.
|
|
39
|
+
*/
|
|
40
|
+
exports.interactionBlockClasses = [
|
|
41
|
+
new WebClickBlock_2.WebClickBlock(),
|
|
42
|
+
new WebFillBlock_2.WebFillBlock(),
|
|
43
|
+
new WebTypeBlock_2.WebTypeBlock(),
|
|
44
|
+
new WebPressKeyBlock_2.WebPressKeyBlock(),
|
|
45
|
+
new WebSelectBlock_2.WebSelectBlock(),
|
|
46
|
+
new WebCheckboxBlock_2.WebCheckboxBlock(),
|
|
47
|
+
new WebHoverBlock_2.WebHoverBlock(),
|
|
48
|
+
new WebUploadFileBlock_2.WebUploadFileBlock(),
|
|
49
|
+
new WebFocusBlock_2.WebFocusBlock(),
|
|
50
|
+
new WebDragAndDropBlock_2.WebDragAndDropBlock(),
|
|
51
|
+
new WebScrollIntoViewBlock_2.WebScrollIntoViewBlock(),
|
|
52
|
+
];
|
|
53
|
+
/**
|
|
54
|
+
* Interaction blocks as BlockDefinition array for backward compatibility.
|
|
55
|
+
*/
|
|
56
|
+
exports.interactionBlocks = exports.interactionBlockClasses.map(block => block.toDefinition());
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StatementBlock } from '../../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Navigate to a URL.
|
|
5
|
+
*/
|
|
6
|
+
export declare class WebNavigateBlock extends StatementBlock {
|
|
7
|
+
readonly type = "web_navigate";
|
|
8
|
+
readonly category = "Web";
|
|
9
|
+
readonly color = "#E91E63";
|
|
10
|
+
readonly tooltip = "Navigate to a URL";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebNavigateBlock = void 0;
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Navigate to a URL.
|
|
8
|
+
*/
|
|
9
|
+
class WebNavigateBlock extends base_1.StatementBlock {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.type = 'web_navigate';
|
|
13
|
+
this.category = 'Web';
|
|
14
|
+
this.color = '#E91E63';
|
|
15
|
+
this.tooltip = 'Navigate to a URL';
|
|
16
|
+
}
|
|
17
|
+
getInputs() {
|
|
18
|
+
return [
|
|
19
|
+
{ name: 'URL', type: 'field', fieldType: 'text', required: true },
|
|
20
|
+
{ name: 'WAIT_UNTIL', type: 'field', fieldType: 'dropdown', options: [['Load', 'load'], ['DOM Content Loaded', 'domcontentloaded'], ['Network Idle', 'networkidle']], default: 'load' },
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
async execute(params, context) {
|
|
24
|
+
const page = context.page;
|
|
25
|
+
const url = (0, utils_1.resolveVariables)(params.URL, context);
|
|
26
|
+
const waitUntil = params.WAIT_UNTIL;
|
|
27
|
+
context.logger.info(`Navigating to ${url}`);
|
|
28
|
+
await page.goto(url, { waitUntil });
|
|
29
|
+
return {
|
|
30
|
+
_summary: url,
|
|
31
|
+
url,
|
|
32
|
+
waitUntil,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.WebNavigateBlock = WebNavigateBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StatementBlock } from '../../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Take a screenshot.
|
|
5
|
+
*/
|
|
6
|
+
export declare class WebScreenshotBlock extends StatementBlock {
|
|
7
|
+
readonly type = "web_screenshot";
|
|
8
|
+
readonly category = "Web";
|
|
9
|
+
readonly color = "#607D8B";
|
|
10
|
+
readonly tooltip = "Take a screenshot";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebScreenshotBlock = void 0;
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
/**
|
|
6
|
+
* Take a screenshot.
|
|
7
|
+
*/
|
|
8
|
+
class WebScreenshotBlock extends base_1.StatementBlock {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.type = 'web_screenshot';
|
|
12
|
+
this.category = 'Web';
|
|
13
|
+
this.color = '#607D8B';
|
|
14
|
+
this.tooltip = 'Take a screenshot';
|
|
15
|
+
}
|
|
16
|
+
getInputs() {
|
|
17
|
+
return [
|
|
18
|
+
{ name: 'NAME', type: 'field', fieldType: 'text', default: 'screenshot' },
|
|
19
|
+
{ name: 'FULL_PAGE', type: 'field', fieldType: 'checkbox', default: false },
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
async execute(params, context) {
|
|
23
|
+
const page = context.page;
|
|
24
|
+
const name = params.NAME;
|
|
25
|
+
const fullPage = params.FULL_PAGE;
|
|
26
|
+
context.logger.info(`Taking screenshot: ${name}`);
|
|
27
|
+
const buffer = await page.screenshot({ fullPage });
|
|
28
|
+
return {
|
|
29
|
+
_summary: `${name}${fullPage ? ' (full page)' : ''}`,
|
|
30
|
+
name,
|
|
31
|
+
fullPage,
|
|
32
|
+
buffer: buffer.toString('base64'),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.WebScreenshotBlock = WebScreenshotBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StatementBlock } from '../../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Wait for a specified time.
|
|
5
|
+
*/
|
|
6
|
+
export declare class WebWaitBlock extends StatementBlock {
|
|
7
|
+
readonly type = "web_wait";
|
|
8
|
+
readonly category = "Web";
|
|
9
|
+
readonly color = "#9C27B0";
|
|
10
|
+
readonly tooltip = "Wait for a specified time";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebWaitBlock = void 0;
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
/**
|
|
6
|
+
* Wait for a specified time.
|
|
7
|
+
*/
|
|
8
|
+
class WebWaitBlock extends base_1.StatementBlock {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.type = 'web_wait';
|
|
12
|
+
this.category = 'Web';
|
|
13
|
+
this.color = '#9C27B0';
|
|
14
|
+
this.tooltip = 'Wait for a specified time';
|
|
15
|
+
}
|
|
16
|
+
getInputs() {
|
|
17
|
+
return [
|
|
18
|
+
{ name: 'MILLISECONDS', type: 'field', fieldType: 'number', default: 1000 },
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
async execute(params, context) {
|
|
22
|
+
const page = context.page;
|
|
23
|
+
const ms = params.MILLISECONDS;
|
|
24
|
+
context.logger.info(`Waiting ${ms}ms`);
|
|
25
|
+
await page.waitForTimeout(ms);
|
|
26
|
+
return {
|
|
27
|
+
_summary: `${ms}ms`,
|
|
28
|
+
milliseconds: ms,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.WebWaitBlock = WebWaitBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StatementBlock } from '../../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Wait for an element to appear/disappear.
|
|
5
|
+
*/
|
|
6
|
+
export declare class WebWaitForElementBlock extends StatementBlock {
|
|
7
|
+
readonly type = "web_wait_for_element";
|
|
8
|
+
readonly category = "Web";
|
|
9
|
+
readonly color = "#9C27B0";
|
|
10
|
+
readonly tooltip = "Wait for an element to appear/disappear";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|