@mablhq/playwright-tools 2.49.1
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/Globals.js +69 -0
- package/LICENSE.txt +29 -0
- package/README.md +219 -0
- package/api/ApiError.js +11 -0
- package/api/atlassian/bitBucketApiClient.js +81 -0
- package/api/atlassian/entities/CodeAnnotation.js +9 -0
- package/api/atlassian/entities/CodeReport.js +15 -0
- package/api/atlassian/entities/PullRequest.js +2 -0
- package/api/basicApiClient.js +293 -0
- package/api/entities/Browser.js +11 -0
- package/api/entities/Email.js +14 -0
- package/api/entities/FindStrategy.js +10 -0
- package/api/entities/Label.js +2 -0
- package/api/entities/VersionedObject.js +2 -0
- package/api/entities/Workspace.js +2 -0
- package/api/featureSet.js +44 -0
- package/api/mablApiClient.js +1070 -0
- package/api/mablApiClientFactory.js +79 -0
- package/api/types.js +10 -0
- package/auth/AuthClient.js +38 -0
- package/auth/OktaClient.js +97 -0
- package/browserEngines/browserEngine.js +41 -0
- package/browserEngines/browserEngines.js +14 -0
- package/browserEngines/chromiumBrowserEngine.js +177 -0
- package/browserEngines/firefoxBrowserEngine.js +134 -0
- package/browserEngines/unsupportedBrowserEngine.js +29 -0
- package/browserEngines/webkitBrowerEngine.js +50 -0
- package/browserLauncher/browser.js +2 -0
- package/browserLauncher/browserEvent.js +11 -0
- package/browserLauncher/browserLauncher.js +17 -0
- package/browserLauncher/browserLauncherEventEmitter.js +2 -0
- package/browserLauncher/browserLauncherFactory.js +30 -0
- package/browserLauncher/elementHandle.js +30 -0
- package/browserLauncher/errors.js +26 -0
- package/browserLauncher/frame.js +17 -0
- package/browserLauncher/frameBase.js +10 -0
- package/browserLauncher/httpRequest.js +2 -0
- package/browserLauncher/httpResponse.js +2 -0
- package/browserLauncher/jsHandle.js +2 -0
- package/browserLauncher/page.js +2 -0
- package/browserLauncher/pageEvent.js +17 -0
- package/browserLauncher/playwrightBrowserLauncher/browserDelegate.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumBrowserDelegate.js +61 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumElementHandleDelegate.js +129 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumFrameDelegate.js +24 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumPageDelegate.js +145 -0
- package/browserLauncher/playwrightBrowserLauncher/elementHandleDelegate.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxBrowserDelegate.js +50 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxElementHandleDelegate.js +11 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxFrameDelegate.js +36 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxPageDelegate.js +15 -0
- package/browserLauncher/playwrightBrowserLauncher/frameDelegate.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/internals.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/nonChromium/nonChromiumAbstractBrowserDelegate.js +15 -0
- package/browserLauncher/playwrightBrowserLauncher/nonChromium/nonChromiumAbstractElementHandleDelegate.js +73 -0
- package/browserLauncher/playwrightBrowserLauncher/nonChromium/nonChromiumAbstractFrameDelegate.js +13 -0
- package/browserLauncher/playwrightBrowserLauncher/nonChromium/nonChromiumAbstractPageDelegate.js +81 -0
- package/browserLauncher/playwrightBrowserLauncher/pageDelegate.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightApiResponse.js +18 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowser.js +259 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowserLauncher.js +97 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightDom.js +319 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightFrame.js +265 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightHttpRequest.js +76 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightHttpResponse.js +26 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightPage.js +377 -0
- package/browserLauncher/playwrightBrowserLauncher/simplePlaywrightLogger.js +36 -0
- package/browserLauncher/playwrightBrowserLauncher/webkit/webkitBrowserDelegate.js +50 -0
- package/browserLauncher/playwrightBrowserLauncher/webkit/webkitElementHandleDelegate.js +16 -0
- package/browserLauncher/playwrightBrowserLauncher/webkit/webkitFrameDelegate.js +19 -0
- package/browserLauncher/playwrightBrowserLauncher/webkit/webkitPageDelegate.js +15 -0
- package/browserLauncher/playwrightBrowserLauncher/wrappers.js +25 -0
- package/browserLauncher/types.js +28 -0
- package/browserLauncher/utils.js +9 -0
- package/cli.js +66 -0
- package/commands/applications/applications.js +5 -0
- package/commands/applications/applications_cmds/describe.js +21 -0
- package/commands/applications/applications_cmds/list.js +56 -0
- package/commands/auth/auth.js +5 -0
- package/commands/auth/auth_cmds/activate-key.js +38 -0
- package/commands/auth/auth_cmds/clear.js +10 -0
- package/commands/auth/auth_cmds/info.js +10 -0
- package/commands/auth/auth_cmds/login.js +10 -0
- package/commands/branches/branches.js +5 -0
- package/commands/branches/branches_cmds/create.js +56 -0
- package/commands/branches/branches_cmds/describe.js +50 -0
- package/commands/branches/branches_cmds/list.js +84 -0
- package/commands/branches/branches_cmds/merge.js +56 -0
- package/commands/browserTypes.js +20 -0
- package/commands/commandUtil/awaitCompletion.js +67 -0
- package/commands/commandUtil/branches.js +44 -0
- package/commands/commandUtil/codeInsights.js +181 -0
- package/commands/commandUtil/describe.js +32 -0
- package/commands/commandUtil/fileUtil.js +50 -0
- package/commands/commandUtil/interfaces.js +4 -0
- package/commands/commandUtil/list.js +70 -0
- package/commands/commandUtil/util.js +127 -0
- package/commands/commandUtil/versionUtil.js +33 -0
- package/commands/config/config.js +5 -0
- package/commands/config/config_cmds/configKeys.js +28 -0
- package/commands/config/config_cmds/delete.js +29 -0
- package/commands/config/config_cmds/get.js +52 -0
- package/commands/config/config_cmds/install.js +119 -0
- package/commands/config/config_cmds/list.js +39 -0
- package/commands/config/config_cmds/set.js +80 -0
- package/commands/constants.js +160 -0
- package/commands/credentials/credentials.js +5 -0
- package/commands/credentials/credentials_cmds/list.js +66 -0
- package/commands/datatables/datatables.js +5 -0
- package/commands/datatables/datatables_cmds/create.js +61 -0
- package/commands/datatables/datatables_cmds/describe.js +17 -0
- package/commands/datatables/datatables_cmds/export.js +86 -0
- package/commands/datatables/datatables_cmds/list.js +18 -0
- package/commands/datatables/datatables_cmds/scenarios.js +35 -0
- package/commands/datatables/datatables_cmds/update.js +120 -0
- package/commands/datatables/utils.js +145 -0
- package/commands/deploy/deploy.js +5 -0
- package/commands/deploy/deploy_cmds/awaitDeploymentCompletion.js +100 -0
- package/commands/deploy/deploy_cmds/create.js +342 -0
- package/commands/deploy/deploy_cmds/describe.js +54 -0
- package/commands/deploy/deploy_cmds/executionResultPresenter.js +117 -0
- package/commands/deploy/deploy_cmds/list.js +74 -0
- package/commands/deploy/deploy_cmds/watch.js +44 -0
- package/commands/environments/environments.js +5 -0
- package/commands/environments/environments_cmds/build-files.js +5 -0
- package/commands/environments/environments_cmds/build-files_cmds/add.js +73 -0
- package/commands/environments/environments_cmds/build-files_cmds/list.js +54 -0
- package/commands/environments/environments_cmds/build-files_cmds/update.js +71 -0
- package/commands/environments/environments_cmds/create.js +153 -0
- package/commands/environments/environments_cmds/delete.js +32 -0
- package/commands/environments/environments_cmds/describe.js +28 -0
- package/commands/environments/environments_cmds/list.js +56 -0
- package/commands/environments/environments_cmds/update.js +46 -0
- package/commands/environments/environments_cmds/urls.js +5 -0
- package/commands/environments/environments_cmds/urls_cmds/add.js +91 -0
- package/commands/environments/environments_cmds/urls_cmds/list.js +49 -0
- package/commands/flows/flows.js +5 -0
- package/commands/flows/flows_cmds/export.js +78 -0
- package/commands/flows/flows_cmds/list.js +64 -0
- package/commands/internal/internal.js +6 -0
- package/commands/link-agents/link-agents.js +5 -0
- package/commands/link-agents/link-agents_cmds/delete.js +38 -0
- package/commands/link-agents/link-agents_cmds/list.js +131 -0
- package/commands/link-agents/link-agents_cmds/terminate.js +31 -0
- package/commands/mobile-build-files/mobile-build-files.js +5 -0
- package/commands/mobile-build-files/mobile-build-files_cmds/delete.js +31 -0
- package/commands/mobile-build-files/mobile-build-files_cmds/download.js +50 -0
- package/commands/mobile-build-files/mobile-build-files_cmds/list.js +72 -0
- package/commands/mobile-build-files/mobile-build-files_cmds/upload.js +101 -0
- package/commands/plans/plans.js +5 -0
- package/commands/plans/plans_cmds/describe.js +23 -0
- package/commands/plans/plans_cmds/list.js +63 -0
- package/commands/test-runs/test-runs.js +5 -0
- package/commands/test-runs/test-runs_cmds/export.js +62 -0
- package/commands/tests/mobileEmulationUtil.js +46 -0
- package/commands/tests/tests.js +5 -0
- package/commands/tests/testsUtil.js +538 -0
- package/commands/tests/tests_cmds/create.js +130 -0
- package/commands/tests/tests_cmds/edit.js +111 -0
- package/commands/tests/tests_cmds/export.js +145 -0
- package/commands/tests/tests_cmds/import.js +5 -0
- package/commands/tests/tests_cmds/import_cmds/import_playwright.js +439 -0
- package/commands/tests/tests_cmds/import_cmds/import_selenium.js +295 -0
- package/commands/tests/tests_cmds/list.js +94 -0
- package/commands/tests/tests_cmds/run-cloud.js +314 -0
- package/commands/tests/tests_cmds/run-mobile.js +260 -0
- package/commands/tests/tests_cmds/run.js +314 -0
- package/commands/tests/tests_cmds/runUtils.js +60 -0
- package/commands/tests/tests_cmds/trainerUtil.js +12 -0
- package/commands/users/users.js +5 -0
- package/commands/users/users_cmds/list.js +58 -0
- package/commands/workspaces/workspace_cmds/copy.js +108 -0
- package/commands/workspaces/workspace_cmds/describe.js +21 -0
- package/commands/workspaces/workspace_cmds/list.js +67 -0
- package/commands/workspaces/workspaces.js +5 -0
- package/core/entityValidation/environmentsValidation.js +7 -0
- package/core/entityValidation/stepValidation.js +15 -0
- package/core/execution/ApiTestUtils.js +1060 -0
- package/core/execution/MailboxConstants.js +4 -0
- package/core/execution/PostmanUtils.js +53 -0
- package/core/execution/RunConfig.js +2 -0
- package/core/execution/TestResult.js +15 -0
- package/core/execution/VariableUtils.js +154 -0
- package/core/execution/VariablesSummary.js +2 -0
- package/core/execution/basic-types.js +2 -0
- package/core/execution/newman-types.js +42 -0
- package/core/messaging/actions/MobileTrainingActions.js +17 -0
- package/core/messaging/actions/pdfActions.js +27 -0
- package/core/messaging/actions/runnerActions.js +18 -0
- package/core/messaging/actions/trainingSessionActions.js +38 -0
- package/core/messaging/logLineMessaging.js +50 -0
- package/core/messaging/messaging.js +130 -0
- package/core/messaging/pageMessaging.js +9 -0
- package/core/trainer/openUtils.js +47 -0
- package/core/trainer/trainingSessions-types.js +35 -0
- package/core/trainer/trainingSessions.js +151 -0
- package/core/util.js +52 -0
- package/coreWebVitals/index.js +77 -0
- package/domUtil/index.js +1 -0
- package/env/defaultEnv.js +17 -0
- package/env/dev.js +17 -0
- package/env/env.js +76 -0
- package/env/local.js +17 -0
- package/env/prod.js +17 -0
- package/execution/index.js +8 -0
- package/execution/index.js.LICENSE.txt +254 -0
- package/execution/runAppiumServer.js +145 -0
- package/functions/apiTest/utils.js +47 -0
- package/functions/types.js +2 -0
- package/functions/utils.js +12 -0
- package/http/MablHttpAgent.js +73 -0
- package/http/RequestFilteringHttpAgent.js +119 -0
- package/http/RequestSecurityError.js +13 -0
- package/http/axiosProxyConfig.js +101 -0
- package/http/httpUtil.js +73 -0
- package/http/requestInterceptor.js +206 -0
- package/index.d.ts +241 -0
- package/index.js +14 -0
- package/mablApi/index.js +1 -0
- package/mablscript/MablAction.js +102 -0
- package/mablscript/MablStep.js +191 -0
- package/mablscript/MablStepV2.js +73 -0
- package/mablscript/MablSymbol.js +35 -0
- package/mablscript/actions/AwaitDownloadAction.js +14 -0
- package/mablscript/actions/AwaitPDFDownloadAction.js +19 -0
- package/mablscript/actions/ConditionAction.js +123 -0
- package/mablscript/actions/CountAction.js +16 -0
- package/mablscript/actions/ExtractAction.js +71 -0
- package/mablscript/actions/FindAction.js +301 -0
- package/mablscript/actions/GenerateEmailAddressAction.js +14 -0
- package/mablscript/actions/GenerateRandomStringAction.js +20 -0
- package/mablscript/actions/GetUrlAction.js +22 -0
- package/mablscript/actions/GetVariableValue.js +31 -0
- package/mablscript/actions/GetViewportAction.js +17 -0
- package/mablscript/actions/JavaScriptAction.js +219 -0
- package/mablscript/diffing/diffingUtil.js +229 -0
- package/mablscript/importer.js +576 -0
- package/mablscript/mobile/steps/CreateVariableMobileStep.js +53 -0
- package/mablscript/mobile/steps/EnterTextStep.js +45 -0
- package/mablscript/mobile/steps/HideKeyboardStep.js +20 -0
- package/mablscript/mobile/steps/InstallAppStep.js +22 -0
- package/mablscript/mobile/steps/NavigateBackStep.js +20 -0
- package/mablscript/mobile/steps/NavigateHomeStep.js +21 -0
- package/mablscript/mobile/steps/OpenAppStep.js +22 -0
- package/mablscript/mobile/steps/OpenLinkStep.js +19 -0
- package/mablscript/mobile/steps/PrepareSessionStep.js +19 -0
- package/mablscript/mobile/steps/PushFileStep.js +27 -0
- package/mablscript/mobile/steps/ScrollStep.js +87 -0
- package/mablscript/mobile/steps/SetOrientationStep.js +20 -0
- package/mablscript/mobile/steps/TapStep.js +37 -0
- package/mablscript/mobile/steps/UninstallAppStep.js +22 -0
- package/mablscript/mobile/steps/actions/MobileFindAction.js +23 -0
- package/mablscript/mobile/steps/stepUtil.js +113 -0
- package/mablscript/mobile/tests/StepTestsUtil.js +20 -0
- package/mablscript/mobile/tests/TestMobileFindDescriptors.js +282 -0
- package/mablscript/mobile/tests/steps/CreateVariableMobileStep.mobiletest.js +298 -0
- package/mablscript/mobile/tests/steps/EnterTextStep.mobiletest.js +79 -0
- package/mablscript/mobile/tests/steps/GeneralHumanization.mobiletest.js +304 -0
- package/mablscript/mobile/tests/steps/HideKeyboardStep.mobiletest.js +27 -0
- package/mablscript/mobile/tests/steps/InstallAppStep.mobiletest.js +20 -0
- package/mablscript/mobile/tests/steps/NavigateBackStep.mobiletest.js +27 -0
- package/mablscript/mobile/tests/steps/NavigateHomeStep.mobiletest.js +27 -0
- package/mablscript/mobile/tests/steps/OpenLinkStep.mobiletest.js +20 -0
- package/mablscript/mobile/tests/steps/PushFileStep.mobiletest.js +55 -0
- package/mablscript/mobile/tests/steps/ScrollStep.mobiletest.js +386 -0
- package/mablscript/mobile/tests/steps/SetOrientationStep.mobiletest.js +32 -0
- package/mablscript/mobile/tests/steps/TapStep.mobiletest.js +57 -0
- package/mablscript/mobile/tests/steps/UninstallAppStep.mobiletest.js +20 -0
- package/mablscript/steps/AbstractAssertionsAndVariablesStep.js +52 -0
- package/mablscript/steps/AccessibilityCheck.js +108 -0
- package/mablscript/steps/ActionsUtils.js +18 -0
- package/mablscript/steps/AssertStep.js +318 -0
- package/mablscript/steps/AssertStepOld.js +159 -0
- package/mablscript/steps/AwaitTabStep.js +69 -0
- package/mablscript/steps/AwaitUploadsStep.js +26 -0
- package/mablscript/steps/ClearCookiesStep.js +26 -0
- package/mablscript/steps/ClickAndHoldStep.js +76 -0
- package/mablscript/steps/ClickStep.js +58 -0
- package/mablscript/steps/CookieUtils.js +54 -0
- package/mablscript/steps/CreateVariableStep.js +236 -0
- package/mablscript/steps/DatabaseQueryStep.js +28 -0
- package/mablscript/steps/DoubleClickStep.js +64 -0
- package/mablscript/steps/DownloadStep.js +96 -0
- package/mablscript/steps/EchoStep.js +34 -0
- package/mablscript/steps/ElseIfConditionStep.js +32 -0
- package/mablscript/steps/ElseStep.js +27 -0
- package/mablscript/steps/EndStep.js +27 -0
- package/mablscript/steps/EnterAuthCodeStep.js +59 -0
- package/mablscript/steps/EnterTextStep.js +96 -0
- package/mablscript/steps/EvaluateFlowStep.js +51 -0
- package/mablscript/steps/EvaluateJavaScriptStep.js +50 -0
- package/mablscript/steps/HoverStep.js +63 -0
- package/mablscript/steps/IfConditionStep.js +191 -0
- package/mablscript/steps/NavigateStep.js +30 -0
- package/mablscript/steps/OpenEmailStep.js +46 -0
- package/mablscript/steps/ReleaseStep.js +76 -0
- package/mablscript/steps/RemoveCookieStep.js +36 -0
- package/mablscript/steps/RightClickStep.js +58 -0
- package/mablscript/steps/SelectStep.js +82 -0
- package/mablscript/steps/SendHttpRequestStep.js +48 -0
- package/mablscript/steps/SendKeyStep.js +84 -0
- package/mablscript/steps/SetCookieStep.js +70 -0
- package/mablscript/steps/SetFilesStep.js +71 -0
- package/mablscript/steps/SetViewportStep.js +38 -0
- package/mablscript/steps/SwitchContextStep.js +122 -0
- package/mablscript/steps/SyntheticStep.js +20 -0
- package/mablscript/steps/VisitUrlStep.js +68 -0
- package/mablscript/steps/WaitStep.js +37 -0
- package/mablscript/steps/WaitUntilStep.js +46 -0
- package/mablscript/types/AccessibilityCheckStepDescriptor.js +2 -0
- package/mablscript/types/AccessibilityCheckTypes.js +9 -0
- package/mablscript/types/AssertionsAndVariablesStepDescriptor.js +2 -0
- package/mablscript/types/AwaitTabDescriptor.js +2 -0
- package/mablscript/types/AwaitUploadStepDescriptor.js +2 -0
- package/mablscript/types/ClearCookiesStepDescriptor.js +2 -0
- package/mablscript/types/ClickAndHoldStepDescriptor.js +2 -0
- package/mablscript/types/ClickStepDescriptor.js +2 -0
- package/mablscript/types/ConditionDescriptor.js +133 -0
- package/mablscript/types/CountDescriptor.js +2 -0
- package/mablscript/types/CreateVariableStepDescriptor.js +12 -0
- package/mablscript/types/DownloadStepDescriptor.js +2 -0
- package/mablscript/types/EchoStepDescriptor.js +2 -0
- package/mablscript/types/EnterTextStepDescriptor.js +2 -0
- package/mablscript/types/EvaluateFlowStepDescriptor.js +2 -0
- package/mablscript/types/EvaluateJavaScriptStepDescriptor.js +2 -0
- package/mablscript/types/ExtractDescriptor.js +21 -0
- package/mablscript/types/GetCurrentLocationDescriptor.js +12 -0
- package/mablscript/types/GetVariableDescriptor.js +16 -0
- package/mablscript/types/GetViewportDescriptor.js +12 -0
- package/mablscript/types/HoverStepDescriptor.js +2 -0
- package/mablscript/types/NavigateStepDescriptor.js +7 -0
- package/mablscript/types/OpenEmailStepDescriptor.js +2 -0
- package/mablscript/types/OperatingSystemDescriptor.js +45 -0
- package/mablscript/types/ReleaseStepDescriptor.js +7 -0
- package/mablscript/types/RemoveCookieStepDescriptor.js +2 -0
- package/mablscript/types/SelectStepDescriptor.js +2 -0
- package/mablscript/types/SendHttpRequestTypes.js +2 -0
- package/mablscript/types/SendKeyStepDescriptor.js +30 -0
- package/mablscript/types/SetCookieStepDescriptor.js +2 -0
- package/mablscript/types/SetFilesStepDescriptor.js +2 -0
- package/mablscript/types/SetViewportStepDescriptor.js +2 -0
- package/mablscript/types/SnippetsDescriptor.js +36 -0
- package/mablscript/types/StepDescriptor.js +2 -0
- package/mablscript/types/SwitchContextStepDescriptor.js +15 -0
- package/mablscript/types/VariableNamespace.js +17 -0
- package/mablscript/types/VisitUrlStepDescriptor.js +2 -0
- package/mablscript/types/WaitStepDescriptor.js +2 -0
- package/mablscript/types/WaitUntilStepDescriptor.js +2 -0
- package/mablscript/types/mobile/CreateVariableMobileStepDescriptor.js +9 -0
- package/mablscript/types/mobile/EnterTextStepDescriptor.js +2 -0
- package/mablscript/types/mobile/HideKeyboardStepDescriptor.js +2 -0
- package/mablscript/types/mobile/InstallAppStepDescriptor.js +2 -0
- package/mablscript/types/mobile/NavigateBackStepDescriptor.js +2 -0
- package/mablscript/types/mobile/NavigateHomeStepDescriptor.js +2 -0
- package/mablscript/types/mobile/OpenAppStepDescriptor.js +2 -0
- package/mablscript/types/mobile/OpenLinkStepDescriptor.js +2 -0
- package/mablscript/types/mobile/PrepareSessionStepDescriptor.js +2 -0
- package/mablscript/types/mobile/PushFileDescriptor.js +2 -0
- package/mablscript/types/mobile/ScrollStepDescriptor.js +32 -0
- package/mablscript/types/mobile/SetOrientationStepDescriptor.js +8 -0
- package/mablscript/types/mobile/StepWithMobileFindDescriptor.js +8 -0
- package/mablscript/types/mobile/TapStepDescriptor.js +8 -0
- package/mablscript/types/mobile/UninstallAppStepDescriptor.js +2 -0
- package/mablscriptFind/index.js +2 -0
- package/mablscriptFind/index.js.LICENSE.txt +25 -0
- package/middleware.js +42 -0
- package/mobile/index.js +2 -0
- package/mobile/types.js +8 -0
- package/observers/ObserverBase.js +11 -0
- package/observers/mockObserver.js +47 -0
- package/package.json +107 -0
- package/popupDismissal/candidate.js +2 -0
- package/popupDismissal/index.js +255 -0
- package/providers/authenticationProvider.js +254 -0
- package/providers/cliConfigProvider.js +271 -0
- package/providers/exportRequestProvider.js +196 -0
- package/providers/logging/loggingProvider.js +90 -0
- package/providers/scmContextInterfaces.js +14 -0
- package/providers/scmContextProvider.js +335 -0
- package/providers/scmContextProviderV2.js +122 -0
- package/providers/types.js +9 -0
- package/proxy/index.js +2 -0
- package/proxy/index.js.LICENSE.txt +12 -0
- package/proxy/lib/xpath.js +1 -0
- package/reporters/__tests__/resources/sampleData.js +162 -0
- package/reporters/mochAwesome/interfaces.js +2 -0
- package/reporters/mochAwesome/mochAwesomeReporter.js +227 -0
- package/reporters/reporter.js +46 -0
- package/resources/actionabilityCheck.js +160 -0
- package/resources/coreWebVitals.js +1 -0
- package/resources/mablFind.js +2 -0
- package/resources/media/mabl_test_audio.wav +0 -0
- package/resources/media/mabl_test_pattern.y4m +3 -0
- package/resources/pdf-viewer/EmbeddedPdfHandler.js +1 -0
- package/resources/pdf-viewer/embeddedPdfDetection.js +225 -0
- package/resources/pdf-viewer/index.html +1 -0
- package/resources/pdf-viewer/index.js +2 -0
- package/resources/pdf-viewer/libEmbeddedPdfHandler.js +279 -0
- package/resources/pdf-viewer/libmablPdfViewer.js +21909 -0
- package/resources/pdf-viewer/mabl_attention_move.gif +0 -0
- package/resources/pdf-viewer/mabl_error_artwork_Unplugged.gif +0 -0
- package/resources/pdf-viewer/pdf.worker.9251738a897f697389be.js +2 -0
- package/resources/pdf-viewer/pdf.worker.9e2021092643447a5b9f.js +81 -0
- package/resources/popupDismissal.js +1 -0
- package/resources/webdriver.js +19 -0
- package/socketTunnel/index.js +2 -0
- package/socketTunnel/index.js.LICENSE.txt +68 -0
- package/upload/index.js +2 -0
- package/upload/index.js.LICENSE.txt +27 -0
- package/util/CloudStorageWriter.js +45 -0
- package/util/FileCache.js +180 -0
- package/util/IdentifierUtil.js +57 -0
- package/util/InternalMetricsTrackingSingleton.js +36 -0
- package/util/Lazy.js +90 -0
- package/util/MobileAppFileCache.js +103 -0
- package/util/RichPromise.js +53 -0
- package/util/TestOutputWriter.js +104 -0
- package/util/actionabilityUtil.js +165 -0
- package/util/analytics-events.js +14 -0
- package/util/analytics.js +176 -0
- package/util/asyncUtil.js +61 -0
- package/util/browserTestUtils.js +17 -0
- package/util/clickUtil.js +68 -0
- package/util/downloadUtil.js +87 -0
- package/util/encodingUtil.js +50 -0
- package/util/fileUploadUtil.js +146 -0
- package/util/javaScriptStepMigration.js +115 -0
- package/util/jestUtil.js +21 -0
- package/util/logUtils.js +131 -0
- package/util/markdownUtil.js +125 -0
- package/util/postInstallMessage.js +14 -0
- package/util/pureUtil.js +175 -0
- package/util/resourceUtil.js +90 -0
- package/util/timeUtil.js +31 -0
- package/utilities.js +7 -0
- package/webdriver/index.js +44 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){var e={885:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveVariable=t.isVariableDataType=t.isSimpleObject=t.isLegacyVariable=t.namespace=t.resolveVariableValue=t.LegacyVariableSource=t.VariableType=void 0,i(n(394),t);var o=n(199);Object.defineProperty(t,"VariableType",{enumerable:!0,get:function(){return o.VariableType}}),Object.defineProperty(t,"LegacyVariableSource",{enumerable:!0,get:function(){return o.LegacyVariableSource}}),Object.defineProperty(t,"resolveVariableValue",{enumerable:!0,get:function(){return o.resolveVariableValue}}),Object.defineProperty(t,"namespace",{enumerable:!0,get:function(){return o.namespace}}),Object.defineProperty(t,"isLegacyVariable",{enumerable:!0,get:function(){return o.isLegacyVariable}});var a=n(457);Object.defineProperty(t,"isSimpleObject",{enumerable:!0,get:function(){return a.isSimpleObject}}),Object.defineProperty(t,"isVariableDataType",{enumerable:!0,get:function(){return a.isVariableDataType}});var u=n(451);Object.defineProperty(t,"resolveVariable",{enumerable:!0,get:function(){return u.resolveVariable}}),i(n(835),t),i(n(45),t),i(n(612),t),i(n(785),t),i(n(89),t),i(n(756),t)},612:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNormalizedFindDescriptor=t.mapHintsToFindDescriptor=t.mapWaitUntilToPropertyPreferences=t.getAncestorDescriptor=t.isAncestor=t.matchesAncestorXpath=t.computeRelativeXpath=t.isRelativeXpath=t.findIsWaitUntil=t.descriptorHasIntendedProperties=t.descriptorHasWaitTimeout=t.findIsRepeatedElements=t.descriptorHasOrdinalPreference=t.getWaitUntilTimeoutMs=t.compareStrings=t.getEffectiveSelectorValue=t.getComparator=t.isFindCustomDescriptor=t.ConfidenceLevel=t.PropertyComparator=t.isFindElementType=t.isFindType=t.FindType=t.isFindElementDescriptor=t.isFindOptions=t.ElementExpectation=void 0;const r=n(785);var i,o,a,u;function l(e){return[i.FIND_ANY,i.FIND_FIRST,i.FIND_LAST,i.FIND_ONE,i.FIND_ALL].some((t=>t===e))}function c(e){var t,n;return void 0!==(null===(n=null===(t=e.configuration)||void 0===t?void 0:t.ordinalPreference)||void 0===n?void 0:n.position)}function s(e){var t,n;return void 0!==(null===(n=null===(t=e.findOptions)||void 0===t?void 0:t.waitUntil)||void 0===n?void 0:n.timeoutSeconds)}function f(e){var t,n,r,i;return Object.values((null===(t=e.configuration)||void 0===t?void 0:t.propertyPreferences)||{}).some((e=>null==e?void 0:e.intended))||((null===(i=null===(r=null===(n=e.findOptions)||void 0===n?void 0:n.waitUntil)||void 0===r?void 0:r.properties)||void 0===i?void 0:i[e.selector.uuid])||[]).length>0}function d(e,t,n){return t+n.substring(1)===e}function p(e,t){return!!(e.selector.relative_xpath&&e.selector.xpath&&t.selector.xpath&&d(e.selector.xpath,t.selector.xpath,e.selector.relative_xpath))}function E(e,t){return!!(e.selector.relative_xpath&&!e.selector.findable_ancestor_uuid||e.selector.findable_ancestor_uuid===t.selector.uuid||p(e,t))}function h(e,t={}){const n={...t};for(const i of e)if((0,r.isSimpleElementSelectorCommonKeys)(i)){const e={...t[i]||{},intended:!0};n[i]=e}return n}function m(e,t){var n;const r=(null==t?void 0:t[e.selector.uuid])||[],i=null===(n=e.configuration)||void 0===n?void 0:n.propertyPreferences;return{...e,configuration:{...e.configuration,propertyPreferences:h(r,i)}}}(u=t.ElementExpectation||(t.ElementExpectation={})).MISSING="missing",u.PRESENT="present",t.isFindOptions=function(e){return e&&(void 0===e.waitUntil||function(e){return e&&void 0!==e.timeoutSeconds&&void 0!==e.properties}(e.waitUntil))},t.isFindElementDescriptor=function(e){return e&&l(e.findType)},function(e){e.FIND_ALL="find_all",e.FIND_ANY="find_any",e.FIND_COOKIE="find_cookie",e.FIND_EMAIL="find_email",e.FIND_FIRST="find_first",e.FIND_LAST="find_last",e.FIND_ONE="find_one",e.FIND_TAB="find_tab"}(i=t.FindType||(t.FindType={})),function(e){e.fromString=function(t){const n=t;if(!Object.values(e).includes(n))throw new Error(`No FindType match found for value: ${t}`);return n}}(i=t.FindType||(t.FindType={})),t.isFindType=function(e){return!!Object.values(i).find((t=>t===e))},t.isFindElementType=l,function(e){e.EQUALS="equals",e.CONTAINS="contains"}(o=t.PropertyComparator||(t.PropertyComparator={})),(a=t.ConfidenceLevel||(t.ConfidenceLevel={})).LOW="low",a.MEDIUM="medium",a.HIGH="high",a.UNKNOWN="unknown",t.isFindCustomDescriptor=function(e){return e&&"object"==typeof e&&"string"==typeof e.findType&&[i.FIND_ALL,i.FIND_FIRST,i.FIND_LAST,i.FIND_ANY,i.FIND_ALL].includes(e.findType)},t.getComparator=function(e,t){var n;return(null===(n=null==t?void 0:t[e])||void 0===n?void 0:n.comparator)||o.EQUALS},t.getEffectiveSelectorValue=function(e,t,n){const r=null==n?void 0:n[e],i=(null==r?void 0:r.intended)&&(null==r?void 0:r.value)?null==r?void 0:r.value:t[e];return"string"==typeof i?i:void 0},t.compareStrings=function(e,t,n){return!(!e||!t)&&(n&&n!==o.EQUALS?n===o.CONTAINS&&t.includes(e):e===t)},t.getWaitUntilTimeoutMs=function(e){var t,n,r,i;return(null===(n=null===(t=e.findOptions)||void 0===t?void 0:t.waitUntil)||void 0===n?void 0:n.timeoutSeconds)?1e3*(null===(i=null===(r=e.findOptions)||void 0===r?void 0:r.waitUntil)||void 0===i?void 0:i.timeoutSeconds):void 0},t.descriptorHasOrdinalPreference=c,t.findIsRepeatedElements=function(e){return c(e)||(e.auxiliaryDescriptors||[]).some(c)},t.descriptorHasWaitTimeout=s,t.descriptorHasIntendedProperties=f,t.findIsWaitUntil=function(e){return s(e)&&(f(e)||((null==e?void 0:e.auxiliaryDescriptors)||[]).some(f))},t.isRelativeXpath=d,t.computeRelativeXpath=function(e,t){if(e.startsWith(t)&&e.length>t.length)return"."+e.substring(t.length)},t.matchesAncestorXpath=p,t.isAncestor=E,t.getAncestorDescriptor=function(e){var t;if(e.auxiliaryDescriptors&&e.auxiliaryDescriptors.length>0){const n=e.auxiliaryDescriptors.filter((t=>E(e,t)));if(n.length>0){const r=n[0],i=(e.auxiliaryDescriptors||[]).filter((e=>e!==r)),o={...r},a=e.selector;return"#document-fragment"===(null===(t=a.currentContextNode)||void 0===t?void 0:t.nodeName)&&(o.selector.currentContextNode=a.currentContextNode),{...e.type?{type:e.type}:{},...e.findOptions?{findOptions:e.findOptions}:{},...o,auxiliaryDescriptors:i}}}},t.mapWaitUntilToPropertyPreferences=function(e){var t;return(null===(t=e.findOptions)||void 0===t?void 0:t.waitUntil)&&Object.keys(e.findOptions.waitUntil.properties).length?function(e,t){const n=m(e,t),r=(e.auxiliaryDescriptors||[]).map((e=>m(e,t)));return r.length&&(n.auxiliaryDescriptors=r),n}(e,e.findOptions.waitUntil.properties):e},t.mapHintsToFindDescriptor=function(e){var t,n;if(null===(n=null===(t=e.findOptions)||void 0===t?void 0:t.hints)||void 0===n?void 0:n.selectorSubstitutions){const t=e.findOptions.hints.selectorSubstitutions[e.selector.uuid];if(t&&(e.selector={...e.selector,...t},e.overrides))for(const n of e.overrides)n.selector={...n.selector,...t}}return e},t.isNormalizedFindDescriptor=function(e){return"object"==typeof e&&(null==e?void 0:e.selector)&&(0,r.isStandardSelector)(e.selector)}},89:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCustomFindDescriptor=t.isFindOneDescriptor=void 0,t.isFindOneDescriptor=function(e){return e&&!e.foundElementSelectors&&!!e.selector},t.isCustomFindDescriptor=function(e){return!!(null==e?void 0:e.primarySelectors)}},835:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_ATTR_PROPS_OPTIONS=t.ALLOWED_ASSERTIBLE_ATTRS_PROPS=t.ASSERTIBLE_ATTRIBUTE_TYPES=void 0,t.ASSERTIBLE_ATTRIBUTE_TYPES=["string","number","boolean"],t.ALLOWED_ASSERTIBLE_ATTRS_PROPS=["accessKey","accessKeyLabel ","align","alt","aria-checked","aria-label","aria-labelledby","aria-disabled","autofocus","border","checked","class","className","clientHeight","clientLeft","clientTop","clientWidth","complete","computedName","computedRole","contentEditable","contextMenu","crossOrigin","currentSrc","dataset ","defaultChecked","defaultValue","dir","disabled","draggable","formEncType","formMethod","formNoValidate","formTarget","height","hidden","href","hspace","id","indeterminate","inert","innerText","isContentEditable ","isMap","itemId ","itemScope ","lang","length","localName","longDesc","lowSrc","maxLength","multiple","name","namespaceURI","naturalHeight","naturalWidth","noModule","offsetHeight ","offsetLeft","offsetTop","offsetWidth","prefix","referrerPolicy","required","selectedIndex","size","sizes","slot","src","srcset","tabIndex","tagName","title","translate","type","validationMessage","validity","value","vspace","width","willValidate"],t.ALL_ATTR_PROPS_OPTIONS={},t.ALLOWED_ASSERTIBLE_ATTRS_PROPS.forEach((e=>t.ALL_ATTR_PROPS_OPTIONS[e]=""))},394:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.destroySelectionOverlay=t.highlightElements=t.highlightElement=t.positionSelectionHighlight=t.renderSelectionOverlay=t.xpathElement=t.maybeGetRootNode=t.createXpathFromPathArray=t.sanitizeXPath=t.getAncestorElements=t.isSelect=t.isFileInput=t.isTextField=t.isInputField=t.getInputTypeFromElement=t.getPlaceholderFromElement=t.getAnchorHrefFromElement=t.getInputLabelFromElement=t.getLabelUsingForAttribute=t.getLabelForInput=t.normalizeText=t.truncateText=t.getSlotTextFromElement=t.getTextFromElement=t.compactWhitespace=t.createXPathFromElement=t.getIframesInfo=t.getAttributePropertyMap=t.getSelectedTextFromElement=t.getClassNameFromElement=t.getSelectedIndexFromElement=t.getElementValueFromElement=t.getNodeNameFromElement=t.getTagNameFromElement=t.getNameFromElement=t.getIdFromElement=t.createIgnoredDomElement=t.createBaseEventMessage=t.getAttributeFromElement=t.getPropertyFromElement=t.MAX_ATTRIBUTE_SIZE=t.MAX_SELECTOR_INNER_TEXT_LENGTH=t.MABL_INSERTED_ELEMENTS=t.MABL_SECONDARY_DRAGGABLE_DIV_ID=t.MABL_TERTIARY_IFRAME_ID=t.MABL_IGNORE_ELEMENT_CLASS=t.MABL_DRAGGABLE_DIV_ID=t.MABL_SECONDARY_IFRAME_ID=t.MABL_HIGHLIGHT_ID=t.MABL_OVERLAY_ID=void 0,t.getParentElements=t.removeParentElements=t.isElementInShadowRoot=t.isExpectedToBeInvisible=t.isDisplayed=t.getInnerText=t.getElementByXpath=t.getAllElementsByXpath=t.getFirstElementBySelectors=t.getLastElementBySelectors=t.getAllElementBySelectors=t.destroyElement=t.getElementMatchingSelectionTarget=t.selectOption=t.adjustTarget=t.removeOverlayById=void 0;const r=n(835);t.MABL_OVERLAY_ID="mabl-selection-overlay-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_HIGHLIGHT_ID="mabl-selection-highlight-22b76b1b-4c57-4644-98ab-6f2ff555d1cc";const i="mabl-selection-overlay-22b76b1b-4c57-4644-98ab-6f2ff555d1cc";var o;t.MABL_SECONDARY_IFRAME_ID="mabl-secondary-iframe-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_DRAGGABLE_DIV_ID="mabl-draggable-div-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_IGNORE_ELEMENT_CLASS="mabl-element-ignore-actions",t.MABL_TERTIARY_IFRAME_ID="mabl-tertiary-iframe-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_SECONDARY_DRAGGABLE_DIV_ID="mabl-secondary-draggable-div-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_INSERTED_ELEMENTS=[t.MABL_OVERLAY_ID,t.MABL_HIGHLIGHT_ID,i,"mabl-iframe-22b76b1b-4c57-4644-98ab-6f2ff555d1cc","mabl-iframe-draggable-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_SECONDARY_IFRAME_ID,t.MABL_DRAGGABLE_DIV_ID],function(e){e[e["accessibility-check"]=0]="accessibility-check",e[e["assert-cookie"]=1]="assert-cookie",e[e["assert-email"]=2]="assert-email",e[e["assert-variable"]=3]="assert-variable",e[e["await-tab"]=4]="await-tab",e[e["await-uploads"]=5]="await-uploads",e[e["clear-cookies"]=6]="clear-cookies",e[e.click=7]="click",e[e.click_hold=8]="click_hold",e[e.conditional_else=9]="conditional_else",e[e.conditional_end=10]="conditional_end",e[e["double-click"]=11]="double-click",e[e.download=12]="download",e[e["download-pdf"]=13]="download-pdf",e[e.echo=14]="echo",e[e["end-flow"]=15]="end-flow",e[e["evaluate-js-snippet"]=16]="evaluate-js-snippet",e[e.hover=17]="hover",e[e.input=18]="input",e[e.keypress=19]="keypress",e[e.location=20]="location",e[e["mouse-select"]=21]="mouse-select",e[e.navigation=22]="navigation",e[e["open-email"]=23]="open-email",e[e.release=24]="release",e[e["remove-cookie"]=25]="remove-cookie",e[e["send-http-request"]=26]="send-http-request",e[e["set-cookie"]=27]="set-cookie",e[e["set-files"]=28]="set-files",e[e["set-variable"]=29]="set-variable",e[e["start-flow"]=30]="start-flow",e[e["switch-context-to"]=31]="switch-context-to",e[e["synthetic-click"]=32]="synthetic-click",e[e.url=33]="url",e[e["visit-url"]=34]="visit-url",e[e.viewport=35]="viewport",e[e.wait=36]="wait"}(o||(o={}));const a=["button","checkbox","file","radio","reset","submit"];function u(e,t){return p(e[t])}function l(e,t){return p(e.getAttribute(t))}t.MAX_SELECTOR_INNER_TEXT_LENGTH=300,t.MAX_ATTRIBUTE_SIZE=5e3,t.getPropertyFromElement=u,t.getAttributeFromElement=l;const c=[{name:"src",attribute:"src",handler:u},{name:"elementId",attribute:"id",handler:d},{name:"tagName",handler:E},{name:"text",handler:y},{name:"slotText",handler:A},{name:"label",handler:S},{name:"href",attribute:"href",handler:O},{name:"placeholder",attribute:"placeholder",handler:P},{name:"inputElementType",attribute:"type",handler:w},{name:"inputValue",attribute:"value",handler:m},{name:"className",attribute:"class",handler:_},{name:"visible",handler:function(e){return Y(e).toString()}},...[{name:"alt",attribute:"alt"},{name:"form",attribute:"form"},{name:"for",attribute:"for"},{name:"target",attribute:"target"},{name:"name",attribute:"name"},{name:"target",attribute:"target"},{name:"name",attribute:"name"},{name:"dataTracking",attribute:"data-tracking"},{name:"titleAttr",attribute:"title"},{name:"ariaLabel",attribute:"aria-label"},{name:"labelAttr",attribute:"label"},{name:"dataAutomationId",attribute:"data-automation-id"},{name:"dataTestId",attribute:"data-test-id"},{name:"dataTestid",attribute:"data-testid"},{name:"testId",attribute:"test-id"},{name:"ngModel",attribute:"ng-model"},{name:"ngShow",attribute:"ng-show"},{name:"ngClass",attribute:"ng-class"},{name:"ariaOwns",attribute:"aria-owns"},{name:"ariaLabelledby",attribute:"aria-labelledby"},{name:"ariaControls",attribute:"aria-controls"},{name:"tabindex",attribute:"tabindex"},{name:"role",attribute:"role"},{name:"maxlength",attribute:"maxlength"},{name:"autocomplete",attribute:"autocomplete"},{name:"height",attribute:"height"},{name:"width",attribute:"width"},{name:"style",attribute:"style"},{name:"dataTarget",attribute:"data-target"},{name:"dataValue",attribute:"data-value"},{name:"dataId",attribute:"data-id"},{name:"dataName",attribute:"data-name"},{name:"dataProp",attribute:"data-prop"},{name:"index",attribute:"index"},{name:"item",attribute:"item"}].map((e=>({...e,handler:l})))],s=[{propertyName:"slotText",extractor:A}];function f(e,t,n,r,i){const o={action:t,listener:n,xPath:r,context:i};return c.forEach((t=>{const n=t.handler(e,t.attribute||t.name);o[t.name]=n})),o}function d(e){return p(e.id)}function p(e){var n;return("string"!=typeof e||e.length<t.MAX_ATTRIBUTE_SIZE)&&null!==(n=e)&&void 0!==n?n:void 0}function E(e){var t;return null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase()}function h(e){var t;return p(null===(t=null==e?void 0:e.nodeName)||void 0===t?void 0:t.toLowerCase())}function m(e){return p(e.value)}function _(e){return p(e.className)}function g(e){return x(e,"")}function b(e){var t;return null===(t=null==e?void 0:e.replace(/[ \t\xA0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\n\x0B\f\r\x85\u2028\u2029]+/g," "))||void 0===t?void 0:t.trim()}function v(e){return b(e).substring(0,t.MAX_SELECTOR_INNER_TEXT_LENGTH).replace(/"/g,'\\"')}function y(e){return v(e.innerText||"")}function A(e){const t=e.querySelectorAll("slot");if(1!==t.length)return;const n=t.item(0).assignedNodes().find((e=>e.nodeType===Node.TEXT_NODE));return n?v(n.data):void 0}function R(e,t){var n;return null!==(n=null==e?void 0:e.substring(0,t))&&void 0!==n?n:e}function T(e,n=!0){const r=b(e);return r&&n?R(r,t.MAX_SELECTOR_INNER_TEXT_LENGTH):r}function N(e){if(!e||!L(e))return;const t=e.closest("label");if(t)return t;const n=I(e);if(n)return n;const r=k("(./preceding-sibling::*//descendant-or-self::*[self::input|self::label])[last()]",e);if(r.length>0){const e=r[0];if("label"===E(e)&&!e.getAttribute("for"))return e}const i=k("(../preceding-sibling::*//descendant-or-self::*[self::input|self::label])[last()]",e);if(i.length>0){const e=i[0];if("label"===E(e)&&!e.getAttribute("for"))return e}}function I(e){if((null==e?void 0:e.id)&&-1===(null==e?void 0:e.id.indexOf("\n"))){const t=`${e.id||""}`.replace(/'/g,"\\'"),n=document.querySelector(`label[for='${t}']`);if(n)return n}}function S(e){const t=N(e);if(t)return y(t)}function O(e){if("a"===E(e))return p(e.href)}function P(e){if(L(e))return p(e.placeholder)}function w(e){if(L(e))return e.type||"text"}function L(e){const t=E(e);return"input"===t||"textarea"===t}function x(e,t){const n=null==e?void 0:e.parentElement;return n?x(n,`/${C(e,n)}${t}`):$(e)?D(`//${C(e,e.getRootNode())}${t}`):D(`//html[1]${t}`)}function D(e){return(e=e.replace("*[local-name()='#document-fragment']/shadow[1]/body","body[1]")).replace(/#document-fragment\[0]\/shadow\[1]\/body\[0]/,"body[1]")}function M(e){if("function"==typeof e.getRootNode)return e.getRootNode()}function C(e,t){let n;const r=h(e);n=r?e instanceof HTMLElement&&!(null==r?void 0:r.includes(":"))?r:`*[local-name()='${r}']`:"*";const i=function(e,t){let n=-1;const r=h(e);if(!r)return n;for(const i in t)if(null==t?void 0:t.hasOwnProperty(i)){const o=t[i];if(h(o)===r&&(n+=1,o===e))return n}return n}(e,t.children)+1;return i?`${n}[${i}]`:`${n}`}function F(){const e=document.createElement("div");return e.id=t.MABL_HIGHLIGHT_ID,e.classList.add(i),e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="0",e.style.height="0",e.style.borderStyle="solid",e.style.borderWidth="2px",e.style.borderColor="black",e}function B(e,n,r){const i=e.getBoundingClientRect(),o=F();o.id=`${t.MABL_HIGHLIGHT_ID}-${n}`,o.style.left=U(i.x),o.style.top=U(i.y),o.style.width=U(i.width),o.style.height=U(i.height),r.appendChild(o)}function U(e){return`${Math.round(e)}px`}function G(e){const t=document.getElementById(e);if(t)try{document.body.removeChild(t)}catch(e){document.documentElement.removeChild(t)}}function V(e){var t;null===(t=null==e?void 0:e.parentNode)||void 0===t||t.removeChild(e)}function X(e){return e.css_query?function(e){const t=document.querySelectorAll(e);return t.item(t.length-1)}(e.value||e.css_query):e.xpath?null===(t=k(e.value||e.xpath,void 0))||void 0===t?void 0:t.pop():void 0;var t}function j(e){return e.css_query?document.querySelector(e.value||e.css_query):e.xpath?H(e.value||e.xpath):void 0}function k(e,t=document,n=!0){t=void 0!==t?t:document;const r=[];let i;try{i=document.evaluate(e,t,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null)}catch(e){if(n&&e instanceof DOMException)return console.log(e),[];throw e}for(let e=0,t=i.snapshotLength;e<t;++e)r.push(i.snapshotItem(e));return r}function H(e,t=document,n=!0){t=void 0!==t?t:document;try{return document.evaluate(e,t,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}catch(e){if(n&&e instanceof DOMException)return console.log(e),null;throw e}}function Y(e){var t;if("input"===E(e)&&"hidden"===(null===(t=e.type)||void 0===t?void 0:t.toLowerCase()))return!1;if(!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))return!1;const n=window.getComputedStyle(e);return(!n||"0"!==n.opacity)&&n&&"none"!==n.display&&"collapse"!==n.visibility&&"hidden"!==n.visibility}function $(e){var t;return"#document-fragment"===(null===(t=M(e))||void 0===t?void 0:t.nodeName)}t.createBaseEventMessage=f,t.createIgnoredDomElement=function(e){const n=document.createElement(e);return n.className=t.MABL_IGNORE_ELEMENT_CLASS,n},t.getIdFromElement=d,t.getNameFromElement=function(e){return p(e.name)},t.getTagNameFromElement=E,t.getNodeNameFromElement=h,t.getElementValueFromElement=m,t.getSelectedIndexFromElement=function(e){return e.selectedIndex},t.getClassNameFromElement=_,t.getSelectedTextFromElement=function(e){var t;if("select"===E(e)&&(null==e?void 0:e.selectedOptions)&&!((null===(t=null==e?void 0:e.selectedOptions)||void 0===t?void 0:t.length)<1))return e.selectedOptions[0].innerText},t.getAttributePropertyMap=function(e){const t={};for(const n in e)try{const i=e[n],o=typeof i;if(r.ALLOWED_ASSERTIBLE_ATTRS_PROPS.includes(n)&&r.ASSERTIBLE_ATTRIBUTE_TYPES.includes(o)){if(null==i||"string"===o&&!i.length&&"value"!==n)continue;t[n]=T(i.toString(),!1)}}catch(e){console.error("Could not process an attribute/property for element",e)}return e.getAttributeNames().forEach((n=>{if(!(null==t?void 0:t.hasOwnProperty(n))){const r=e.getAttribute(n);t[n]=T(r||"",!1)}})),s.forEach((n=>{const r=n.extractor(e);r&&(t[n.propertyName]=r)})),t},t.getIframesInfo=function(){const e=[];return[].forEach.call(document.getElementsByTagName("iframe"),(n=>{if(!t.MABL_INSERTED_ELEMENTS.includes(n.id)){const t=f(n,"record","switch-context-to",g(n));t.absoluteSrc=n.src,e.push(t)}})),e},t.createXPathFromElement=g,t.compactWhitespace=b,t.getTextFromElement=y,t.getSlotTextFromElement=A,t.truncateText=R,t.normalizeText=T,t.getLabelForInput=N,t.getLabelUsingForAttribute=I,t.getInputLabelFromElement=S,t.getAnchorHrefFromElement=O,t.getPlaceholderFromElement=P,t.getInputTypeFromElement=w,t.isInputField=L,t.isTextField=function(e){const t=E(e),n=e.type;return"input"===t&&!a.includes(n)||"textarea"===t},t.isFileInput=function(e){const t=E(e),n=(e.type||"").toLowerCase();return"input"===t&&"file"===n},t.isSelect=function(e){return"select"===E(e)},t.getAncestorElements=function(e,t=0,n=[]){const r=[],i=n.map((e=>e.toLowerCase()));let o=null==e?void 0:e.parentElement;for(;o&&(t<=0||r.length<t);)i.includes(E(o))||r.push(o),o=o.parentElement;return r},t.sanitizeXPath=D,t.createXpathFromPathArray=function(e){return D(`//${e.map(((e,t,n)=>{const r=h(e);if(!r)return"";const i=n[t+1];return"#document"!==r&&i&&i?C(e,i):""})).reduce(((e,t)=>""===t?e:`${t}/${e}`))}`)},t.maybeGetRootNode=M,t.xpathElement=C,t.renderSelectionOverlay=function(e){const n=document.createElement("div");n.id=t.MABL_OVERLAY_ID,n.classList.add(i),n.setAttribute("style","\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(24,197,207,0.25);\n z-index: 2147483646;\n cursor: pointer;\n display:block;");const r=document.createElement("div");r.classList.add(i),r.innerText=e,r.setAttribute("style","\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 50px;\n color: white;\n transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);"),n.appendChild(r);const o=F();n.appendChild(o);try{document.body.appendChild(n)}catch(e){document.documentElement.appendChild(n)}},t.positionSelectionHighlight=function(e){const n=document.elementsFromPoint(e.clientX,e.clientY).find((e=>!e.classList.contains(i)));if(!n)return;const r=n.getBoundingClientRect(),o=document.getElementById(t.MABL_HIGHLIGHT_ID);o&&(o.style.left=U(r.x),o.style.top=U(r.y),o.style.width=U(r.width),o.style.height=U(r.height))},t.highlightElement=B,t.highlightElements=function(e){const n=`${t.MABL_HIGHLIGHT_ID}-parent`;let r=document.getElementById(n);r&&V(r),r=document.createElement("div"),r.id=n,e.length>0&&e.forEach(((e,t)=>{B(e,t,r)}));const o=document.getElementById(t.MABL_OVERLAY_ID),a=document.createElement("div");a.classList.add(i),a.innerText=`${e.length} elements found`,a.setAttribute("style","\n position: absolute;\n top: 60%;\n left: 50%;\n font-size: 40px;\n color: white;\n transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);"),r.appendChild(a),o.appendChild(r)},t.destroySelectionOverlay=function(){G(t.MABL_OVERLAY_ID)},t.removeOverlayById=G,t.adjustTarget=function(e,t){let n=e,r=null==t?void 0:t.slice();for(;n&&!(n instanceof HTMLElement);)n=n.parentElement,null==r||r.pop();const i=function(e,t){const n=E(e);if("button"!==n&&"input"!==n){let e;t.forEach(((t,n)=>{var r;const i=null!==(r=E(t))&&void 0!==r?r:"";e||"button"!==i&&"input"!==i||(e=n)})),e&&(t=t.slice(e))}return t}(e,r);return i!==r&&(n=i[0],r=i),function(e){return"html"===E(e)}(n)&&(n=void 0,r=void 0),{path:r,target:n}},t.selectOption=function(e,t,n){e.focus(),"any"===t?e.options.length>1&&0===e.selectedIndex?e.selectedIndex=1:e.selectedIndex=0:e.selectedIndex=[...e.options].findIndex((e=>e.innerText===n)),e.dispatchEvent(new Event("change")),e.blur();const r=new InputEvent("input");e.dispatchEvent(r)},t.getElementMatchingSelectionTarget=function(e){return"primarySelectors"in e.find?"find_last"===e.find.type?X(e.find.primarySelectors):j(e.find.primarySelectors):e.xPath?H(e.xPath):void 0},t.destroyElement=V,t.getAllElementBySelectors=function(e){try{if(e.css_query)return document.querySelectorAll(e.value||e.css_query);if(e.xpath)return k(e.value||e.xpath)}catch(e){}return[]},t.getLastElementBySelectors=X,t.getFirstElementBySelectors=j,t.getAllElementsByXpath=k,t.getElementByXpath=H,t.getInnerText=function e(t){const n=E(t)||"";return"select"!==n&&"option"!==n&&"optgroup"!==n?t.innerText||"":Y(t)?[("option"===n?t.innerText||t.text:t.innerText)||"",Array.from(t.childNodes||[]).map(e).filter((e=>e)).join(" ")].filter((e=>e)).join(" "):""},t.isDisplayed=Y,t.isExpectedToBeInvisible=function(e){var t;return"input"===E(e)&&"file"===(null===(t=null==e?void 0:e.type)||void 0===t?void 0:t.toLowerCase())},t.isElementInShadowRoot=$,t.removeParentElements=function(e){return e?e.filter((t=>!e.some((e=>t!==e&&t.contains(e))))):[]},t.getParentElements=function(e){const t=[];let n=e.parentElement;for(;n;)t.push(n),n=n.parentElement;return t}},45:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MablscriptUtils=t.replaceVariables=t.findVariables=t.b64DecodeUnicode=t.b64EncodeUnicode=t.buildStepArgumentString=t.isValidVariableName=t.isValidUserVariableName=t.getVariableNameFromLoneVariablePattern=t.isLoneVariablePattern=t.unescapeMablscriptString=t.escapeMablscriptString=void 0;const a=n(756);function u(e){return"string"==typeof e?e.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/"/g,'\\"').replace(/\r/g,""):""}function l(e){return!!e&&RegExp(a.LONE_VARIABLE_REGEXP).test(e)}t.escapeMablscriptString=u,t.unescapeMablscriptString=function(e){return"string"==typeof e?e.replace(/\\"/g,'"').replace(/\\n/g,"\n").replace(/\\\\/g,"\\"):""},t.isLoneVariablePattern=l,t.getVariableNameFromLoneVariablePattern=function(e){var t,n;if(l(e)){const r=RegExp(a.LONE_VARIABLE_REGEXP);return null===(n=null===(t=e.match(r))||void 0===t?void 0:t.groups)||void 0===n?void 0:n[a.VARIABLE_GROUP_NAME]}},t.isValidUserVariableName=function(e){return!!e&&(0,a.USER_VARIABLE_REGEXP_CREATE)().test(e)&&-1===a.EXCLUDED_USER_VARIABLE_NAMES.indexOf(e)},t.isValidVariableName=function(e){return!!e&&(0,a.ALL_VARIABLE_REGEXP_CREATE)().test(e)},t.buildStepArgumentString=function e(t){switch(typeof t){case"string":return`"${u(t)}"`;case"boolean":case"number":return`${t}`;case"object":{if(t instanceof Array)return`[${t.map(e).join(",")}]`;const n=[];return Object.keys(t).forEach((r=>{const i=e(t[r]);"string"==typeof r&&r&&"string"==typeof i&&i&&n.push(`"${r}":${i}`)})),n.sort(),`{${n.join(",")}}`}default:return}},t.b64EncodeUnicode=function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt("0x"+t,16))})))},t.b64DecodeUnicode=function(e){try{return decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}catch(t){return atob(e)}},t.findVariables=function(e){const t=null==e?void 0:e.match(a.PATTERN_REGEXP);return(null==t?void 0:t.reduce(((e,t)=>{const n=null==t?void 0:t.match((0,a.VARIABLE_IN_EXPRESSION_REGEXP_CREATE)());return null==n||n.forEach((t=>e.push(t.substring(1)))),e}),[]))||[]},t.replaceVariables=function(e,t){return null===e?null:null==e?void 0:e.replace(a.PATTERN_REGEXP,(e=>e.replace((0,a.VARIABLE_IN_EXPRESSION_REGEXP_CREATE)(),t)))},t.MablscriptUtils=o(n(45))},785:function(e,t){"use strict";function n(e){return void 0!==e.tag_name&&("input"===e.tag_name.toLowerCase()?!e.inputElementType||-1===["radio","button","submit","reset"].indexOf(e.inputElementType.toLowerCase()):-1===["button","option","li","param"].indexOf(e.tag_name.toLowerCase()))}function r(e){return e&&void 0!==e.uuid&&void 0!==e.xpath}Object.defineProperty(t,"__esModule",{value:!0}),t.areSelectorsEqual=t.isCompositeSelector=t.isStandardSelectorAndContext=t.isStandardSelector=t.isCookieSelector=t.isEmailSelector=t.isTabSelector=t.isCssSelector=t.isXPathSelector=t.ignoreValueAttribute=t.SELECTOR_ATTRIBUTE_KEYS=t.SELECTOR_EQUIVALENCE_IGNORED_KEYS=t.PROTOTYPE_TO_SELECTOR_ATTRIBUTE_MAP=t.isSimpleElementSelectorCommonKeys=void 0,t.isSimpleElementSelectorCommonKeys=function(e){return"string"==typeof e&&!["css_query","repeat_xpaths","selector_type","tag_name","uuid","xpath"].includes(e)},t.PROTOTYPE_TO_SELECTOR_ATTRIBUTE_MAP={elementId:"id",name:"name",href:"href",inputElementType:"inputElementType",label:"label",placeholder:"placeholder",tagName:"tag_name",text:"text",slotText:"slot_text",url:"url",title:"title",uuid:"uuid",xPath:"xpath",cssQuery:"css_query",className:"class_name",src:"src",alt:"alt",form:"form",for:"for_attr",target:"target",inputValue:"value",dataTracking:"data_tracking",titleAttr:"title_attr",ariaLabel:"aria_label",labelAttr:"label_attr",dataAutomationId:"data_automation_id",dataTestId:"data_test_id",dataTestid:"data_testid",testId:"test_id",ngModel:"ng_model",ngShow:"ng_show",ariaOwns:"aria_owns",ariaLabelledby:"aria_labelledby",ngClass:"ng_class",ariaControls:"aria_controls",tabindex:"tabindex",role:"role",maxlength:"maxlength",autocomplete:"autocomplete",height:"height",width:"width",style:"style",boundingX:"bounding_x",boundingY:"bounding_y",boundingHeight:"bounding_height",boundingWidth:"bounding_width",visible:"visible",dataTarget:"data_target",dataValue:"data_value",dataId:"data_id",dataName:"data_name",dataProp:"data_prop",index:"index",item:"item"},t.SELECTOR_EQUIVALENCE_IGNORED_KEYS={aria_owns:()=>!0,bounding_x:()=>!0,bounding_y:()=>!0,bounding_height:()=>!0,bounding_width:()=>!0,class_name:()=>!0,style:()=>!0,title_attr:function(e){return void 0!==e.tag_name&&["input","textarea"].includes(e.tag_name.toLowerCase())},uuid:()=>!0,value:n},t.SELECTOR_ATTRIBUTE_KEYS=Object.keys(t.PROTOTYPE_TO_SELECTOR_ATTRIBUTE_MAP).map((e=>t.PROTOTYPE_TO_SELECTOR_ATTRIBUTE_MAP[e])),t.ignoreValueAttribute=n,t.isXPathSelector=function(e){return e&&void 0!==e.xpath},t.isCssSelector=function(e){return e&&void 0!==e.css_query},t.isTabSelector=function(e){return e&&"tab"===e.selector_type&&void 0!==e.url},t.isEmailSelector=function(e){return e&&"email"===e.selector_type},t.isCookieSelector=function(e){return e&&void 0!==e.name},t.isStandardSelector=r,t.isStandardSelectorAndContext=function(e){return e&&void 0!==e.currentContextNode},t.isCompositeSelector=function(e){return e&&e.length>=1&&e.every(r)},t.areSelectorsEqual=function(e,t){if(void 0===e)return void 0===t;if(void 0===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}},756:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.containsMablTemplatePattern=t.isString=t.isNestableElement=t.LONE_VARIABLE_REGEXP=t.FAKER_FORMAT_IN_EXPRESSION_REGEX_CREATE=t.FAKER_EXPRESSION_REGEXP_CREATE=t.FAKER_EXPRESSION_NAMED_GROUP=t.FAKER_EXPRESSION=t.FAKE_NAMESPACE=t.FAKER_GROUP_NAME=t.RANDOM_FORMAT_IN_EXPRESSION_REGEXP_CREATE=t.RANDOM_FORMAT_REGEXP_CREATE=t.RANDOM_FORMAT=t.LENGTH_GROUP=t.LENGTH_GROUP_NAME=t.ALPHABET_GROUP=t.RANDOM_STRING_CHOICES=t.ALPHABET_GROUP_NAME=t.CURRENT_DATE_REGEXP_CREATE=t.CURRENT_DATE_NAME_GROUP=t.CURRENT_DATE_GROUP_NAME=t.VARIABLE_IN_EXPRESSION_REGEXP_CREATE=t.SINGLE_VARIABLE_REGEX_CREATE=t.VARIABLE_GROUP=t.VARIABLE_GROUP_NAME=t.EXCLUDED_USER_VARIABLE_NAMES=t.ALL_VARIABLE_REGEXP_CREATE=t.COMPOUND_VARIABLE_PATTERN=t.USER_VARIABLE_REGEXP_CREATE=t.VARIABLE_REGEXP=t.INDEX_EXPRESSION_REGEXP=t.DOUBLE_QUOTED_IDENTIFIER_REGEXP=t.SINGLE_QUOTED_IDENTIFIER_REGEXP=t.ARRAY_INDEX_REGEXP=t.IDENTIFIER_REGEXP=t.USER_NAMESPACE_REGEXP=t.PATTERN_REGEXP=t.patternRanges=void 0,t.patternRanges={alpha:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",alphaLower:"abcdefghijklmnopqrstuvwxyz",alphaUpper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",digit:"0123456789",alnum:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},t.PATTERN_REGEXP=/{{([^{}]*)}}/gi,t.USER_NAMESPACE_REGEXP=/^user\./g,t.IDENTIFIER_REGEXP="[a-zA-Z_][a-zA-Z0-9_]*",t.ARRAY_INDEX_REGEXP="[0-9]+",t.SINGLE_QUOTED_IDENTIFIER_REGEXP=`'${t.IDENTIFIER_REGEXP}'`,t.DOUBLE_QUOTED_IDENTIFIER_REGEXP=`"${t.IDENTIFIER_REGEXP}"`,t.INDEX_EXPRESSION_REGEXP=`\\[(?:${t.ARRAY_INDEX_REGEXP}|${t.SINGLE_QUOTED_IDENTIFIER_REGEXP}|${t.DOUBLE_QUOTED_IDENTIFIER_REGEXP})\\]`,t.VARIABLE_REGEXP=`${t.IDENTIFIER_REGEXP}(?:${t.INDEX_EXPRESSION_REGEXP})*`,t.USER_VARIABLE_REGEXP_CREATE=()=>RegExp("^"+t.IDENTIFIER_REGEXP+"$"),t.COMPOUND_VARIABLE_PATTERN=`(${t.VARIABLE_REGEXP})(\\.(${t.VARIABLE_REGEXP}))*`,t.ALL_VARIABLE_REGEXP_CREATE=()=>RegExp("^"+t.COMPOUND_VARIABLE_PATTERN+"$"),t.EXCLUDED_USER_VARIABLE_NAMES=["user","web","mail","api"],t.VARIABLE_GROUP_NAME="variable",t.VARIABLE_GROUP="(?<"+t.VARIABLE_GROUP_NAME+">"+t.COMPOUND_VARIABLE_PATTERN+")",t.SINGLE_VARIABLE_REGEX_CREATE=()=>RegExp("{{@"+t.VARIABLE_GROUP+"}}"),t.VARIABLE_IN_EXPRESSION_REGEXP_CREATE=()=>RegExp("@"+t.VARIABLE_GROUP,"g"),t.CURRENT_DATE_GROUP_NAME="date",t.CURRENT_DATE_NAME_GROUP="(?<"+t.CURRENT_DATE_GROUP_NAME+">date)",t.CURRENT_DATE_REGEXP_CREATE=()=>RegExp("{{"+t.CURRENT_DATE_NAME_GROUP+"(:iso)?}}"),t.ALPHABET_GROUP_NAME="alphabet",t.RANDOM_STRING_CHOICES=Object.keys(t.patternRanges).join("|"),t.ALPHABET_GROUP="(?<"+t.ALPHABET_GROUP_NAME+">"+t.RANDOM_STRING_CHOICES+")",t.LENGTH_GROUP_NAME="length",t.LENGTH_GROUP="(?<"+t.LENGTH_GROUP_NAME+">[\\d]+)",t.RANDOM_FORMAT=t.ALPHABET_GROUP+":"+t.LENGTH_GROUP,t.RANDOM_FORMAT_REGEXP_CREATE=()=>RegExp("{{"+t.RANDOM_FORMAT+"}}"),t.RANDOM_FORMAT_IN_EXPRESSION_REGEXP_CREATE=()=>RegExp(t.RANDOM_FORMAT,"g"),t.FAKER_GROUP_NAME="faker",t.FAKE_NAMESPACE="fake.",t.FAKER_EXPRESSION=`${t.FAKE_NAMESPACE}[a-zA-Z]+\\.[a-zA-Z]+(\\((\\d+)\\))?`,t.FAKER_EXPRESSION_NAMED_GROUP="(?<"+t.FAKER_GROUP_NAME+">{{"+t.FAKER_EXPRESSION+"}})",t.FAKER_EXPRESSION_REGEXP_CREATE=()=>RegExp(t.FAKER_EXPRESSION_NAMED_GROUP),t.FAKER_FORMAT_IN_EXPRESSION_REGEX_CREATE=()=>RegExp("("+t.FAKER_EXPRESSION+")","g"),t.LONE_VARIABLE_REGEXP="^{{@"+t.VARIABLE_GROUP+"}}$",t.isNestableElement=function(e){return e instanceof Object||e instanceof Array},t.isString=function(e){return e&&e instanceof String||"string"==typeof e},t.containsMablTemplatePattern=function(e){return!!e&&e.search(t.PATTERN_REGEXP)>=0}},451:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.extractVariableNameFromPath=t.resolveVariable=t.sanitizeUserVariableName=t.addUserNamespace=t.removeUserNamespace=t.USER_NAMESPACE=t.createDottedNamedMap=void 0;const i=r(n(208)),o=n(45),a=n(756);function u(e,t){const n=e.indexOf(t);return n<0?[e,void 0]:[e.substr(0,n),e.substr(n+1)]}function l(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function c(e){return function(e,t){return e.startsWith(t)?e.substring(t.length):e}(e,t.USER_NAMESPACE)}function s(e){return function(e,t){return e.startsWith(t)?e:`${t}${e}`}(e,t.USER_NAMESPACE)}function f(e,t){return Object.keys(t).find((t=>e.startsWith(t)&&(e.length===t.length||"["===e[t.length]||"."===e[t.length])))}t.createDottedNamedMap=function e(t={}){return new Proxy(t,{get(e,t){if("string"==typeof t){const[n,r]=u(t,".");return r?l(e[n])?e[n][r]:void 0:e[n]}return Reflect.get(e,t)},set(t,n,r){if("string"==typeof n){const[i,o]=u(n,".");return o?((null==t?void 0:t.hasOwnProperty(i))||(t[i]=e()),t[i][o]=r,!0):(t[i]=r,!0)}return Reflect.set(t,n,r),!0},deleteProperty(e,t){if("string"==typeof t){const[n,r]=u(t,".");return r?!l(e[n])||delete e[n][r]:((null==e?void 0:e.hasOwnProperty(n))&&delete e[n],!0)}return Reflect.deleteProperty(e,t)},has(e,t){if("string"==typeof t){const[n,r]=u(t,".");return r?n in e&&l(e[n])&&r in e[n]:n in e}return Reflect.has(e,t)}})},t.USER_NAMESPACE="user.",t.removeUserNamespace=c,t.addUserNamespace=s,t.sanitizeUserVariableName=function(e){if(!e)return;const t=c(s(e));return(0,o.isValidUserVariableName)(t)?s(t):void 0},t.resolveVariable=function(e,t,n){const r=f(e,t);if(r){let o=n(t[r]),u=e.slice(r.length);if(u.endsWith(".")||/^\.{2,}/.test(u))return;return u=u.replace(/^\.*/,""),o&&u&&(0,a.isNestableElement)(o)&&(o=(0,i.default)(o,u)),o}},t.extractVariableNameFromPath=f},199:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isLegacyVariable=t.namespace=t.resolveVariableValue=t.LegacyVariableSource=t.VariableType=void 0;const i=r(n(208)),o=n(756),a=n(451);var u,l;(l=t.VariableType||(t.VariableType={})).INPUT="input",l.MABL_MAILBOX="mablMailbox",l.JAVASCRIPT="javascript",l.GENERATED="generated",l.ELEMENT_PROPERTY="elementProperty",l.ELEMENT_COUNT="elementCount",(u=t.LegacyVariableSource||(t.LegacyVariableSource={})).PLAN="Plan",u.JOURNEY_VAR="Default value",u.RUNTIME="Runtime",u.DDT="DataTable",u.ENV="Environment",u.MABL_MAIL="mabl Mailbox",u.JAVASCRIPT="JavaScript",u.ELEMENT_PROP="Element property",u.API="API step",u.ELEMENT_COUNT="Element count",u.FLOW_PARAMETER="Flow parameter",u.TEST_RUN="Test run",u.TEMPLATE="String template";const c=e=>null==e?void 0:e.value;function s(e,t){try{return e[t]||e[`user.${t}`]}catch(e){return}}t.resolveVariableValue=function(e,t,n=c){let r,a=s(t,e);if(!a&&(e.includes(".")||e.includes("["))){const n=[e.indexOf("["),e.indexOf(".")].filter((e=>e>=0)).reduce(((e,t)=>Math.min(e,t)));if(a=s(t,e.slice(0,n)),a){const t="."===e[n]?1:0;r=e.slice(n+t,e.length)}}let u=n(a);return u&&r&&(0,o.isNestableElement)(u)&&(u=(0,i.default)(u,r)),u},t.namespace=function(e={}){return(0,a.createDottedNamedMap)(e)},t.isLegacyVariable=function(e){return!!e&&"object"==typeof e&&void 0!==e.variableType&&void 0!==e.name}},457:function(e,t){"use strict";function n(e){return Object.prototype.constructor===e.constructor}Object.defineProperty(t,"__esModule",{value:!0}),t.isSimpleObject=t.isVariableDataType=void 0,t.isVariableDataType=function e(t){return null==t||"boolean"==typeof t||"number"==typeof t||"bigint"==typeof t||"string"==typeof t||"object"==typeof t&&(Array.isArray(t)?t.every(e):!!n(t)&&!!Object.entries(t).every((([t,n])=>t&&"string"==typeof t&&e(n))))},t.isSimpleObject=n},208:function(e,t,n){var r,i="__lodash_hash_undefined__",o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,u=/^\./,l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,s=/^\[object .+?Constructor\]$/,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,p=f||d||Function("return this")(),E=Array.prototype,h=Function.prototype,m=Object.prototype,_=p["__core-js_shared__"],g=(r=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",b=h.toString,v=m.hasOwnProperty,y=m.toString,A=RegExp("^"+b.call(v).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=p.Symbol,T=E.splice,N=M(p,"Map"),I=M(Object,"create"),S=R?R.prototype:void 0,O=S?S.toString:void 0;function P(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function x(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function D(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function M(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!G(e)||g&&g in e)return!1;var t=function(e){var t=G(e)?y.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?A:s;return t.test(function(e){if(null!=e){try{return b.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}P.prototype.clear=function(){this.__data__=I?I(null):{}},P.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},P.prototype.get=function(e){var t=this.__data__;if(I){var n=t[e];return n===i?void 0:n}return v.call(t,e)?t[e]:void 0},P.prototype.has=function(e){var t=this.__data__;return I?void 0!==t[e]:v.call(t,e)},P.prototype.set=function(e,t){return this.__data__[e]=I&&void 0===t?i:t,this},w.prototype.clear=function(){this.__data__=[]},w.prototype.delete=function(e){var t=this.__data__,n=x(t,e);return!(n<0||(n==t.length-1?t.pop():T.call(t,n,1),0))},w.prototype.get=function(e){var t=this.__data__,n=x(t,e);return n<0?void 0:t[n][1]},w.prototype.has=function(e){return x(this.__data__,e)>-1},w.prototype.set=function(e,t){var n=this.__data__,r=x(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new P,map:new(N||w),string:new P}},L.prototype.delete=function(e){return D(this,e).delete(e)},L.prototype.get=function(e){return D(this,e).get(e)},L.prototype.has=function(e){return D(this,e).has(e)},L.prototype.set=function(e,t){return D(this,e).set(e,t),this};var C=B((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(V(e))return O?O.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(l,(function(e,t,r,i){n.push(r?i.replace(c,"$1"):t||e)})),n}));function F(e){if("string"==typeof e||V(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(B.Cache||L),n}B.Cache=L;var U=Array.isArray;function G(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==y.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:function(e,t){var n;t=function(e,t){if(U(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!V(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:U(n=t)?n:C(n);for(var r=0,i=t.length;null!=e&&r<i;)e=e[F(t[r++])];return r&&r==i?e:void 0}(e,t);return void 0===r?n:r}},932:function(e,t,n){(function(){"use strict";var t=this;function n(e){return"string"==typeof e}function r(e,t,n){return e.call.apply(e.bind,arguments)}function i(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function o(e,t,n){return(o=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?r:i).apply(null,arguments)}function a(e){var t=ae;function n(){}n.prototype=t.prototype,e.G=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.F=function(e,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return t.prototype[n].apply(e,i)}}var u=String.prototype.trim?function(e){return e.trim()}:function(e){return e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};function l(e,t){return-1!=e.indexOf(t)}function c(e,t){return e<t?-1:e>t?1:0}var s,f=Array.prototype.indexOf?function(e,t,n){return Array.prototype.indexOf.call(e,t,n)}:function(e,t,r){if(r=null==r?0:0>r?Math.max(0,e.length+r):r,n(e))return n(t)&&1==t.length?e.indexOf(t,r):-1;for(;r<e.length;r++)if(r in e&&e[r]===t)return r;return-1},d=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,r){for(var i=e.length,o=n(e)?e.split(""):e,a=0;a<i;a++)a in o&&t.call(r,o[a],a,e)},p=Array.prototype.filter?function(e,t,n){return Array.prototype.filter.call(e,t,n)}:function(e,t,r){for(var i=e.length,o=[],a=0,u=n(e)?e.split(""):e,l=0;l<i;l++)if(l in u){var c=u[l];t.call(r,c,l,e)&&(o[a++]=c)}return o},E=Array.prototype.reduce?function(e,t,n,r){return r&&(t=o(t,r)),Array.prototype.reduce.call(e,t,n)}:function(e,t,n,r){var i=n;return d(e,(function(n,o){i=t.call(r,i,n,o,e)})),i},h=Array.prototype.some?function(e,t,n){return Array.prototype.some.call(e,t,n)}:function(e,t,r){for(var i=e.length,o=n(e)?e.split(""):e,a=0;a<i;a++)if(a in o&&t.call(r,o[a],a,e))return!0;return!1};e:{var m=t.navigator;if(m){var _=m.userAgent;if(_){s=_;break e}}s=""}var g,b,v=l(s,"Opera")||l(s,"OPR"),y=l(s,"Trident")||l(s,"MSIE"),A=l(s,"Edge"),R=l(s,"Gecko")&&!(l(s.toLowerCase(),"webkit")&&!l(s,"Edge"))&&!(l(s,"Trident")||l(s,"MSIE"))&&!l(s,"Edge"),T=l(s.toLowerCase(),"webkit")&&!l(s,"Edge");function N(){var e=t.document;return e?e.documentMode:void 0}e:{var I="",S=(b=s,R?/rv\:([^\);]+)(\)|;)/.exec(b):A?/Edge\/([\d\.]+)/.exec(b):y?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(b):T?/WebKit\/(\S+)/.exec(b):v?/(?:Version)[ \/]?(\S+)/.exec(b):void 0);if(S&&(I=S?S[1]:""),y){var O=N();if(null!=O&&O>parseFloat(I)){g=String(O);break e}}g=I}var P={};function w(e){if(!P[e]){for(var t=0,n=u(String(g)).split("."),r=u(String(e)).split("."),i=Math.max(n.length,r.length),o=0;0==t&&o<i;o++){var a=n[o]||"",l=r[o]||"",s=/(\d*)(\D*)/g,f=/(\d*)(\D*)/g;do{var d=s.exec(a)||["","",""],p=f.exec(l)||["","",""];if(0==d[0].length&&0==p[0].length)break;t=c(0==d[1].length?0:parseInt(d[1],10),0==p[1].length?0:parseInt(p[1],10))||c(0==d[2].length,0==p[2].length)||c(d[2],p[2])}while(0==t)}P[e]=0<=t}}var L=t.document,x=L&&y?N()||("CSS1Compat"==L.compatMode?parseInt(g,10):5):void 0,D=y&&!(9<=Number(x)),M=y&&!(8<=Number(x));function C(e,t,n,r){this.a=e,this.nodeName=n,this.nodeValue=r,this.nodeType=2,this.parentNode=this.ownerElement=t}function F(e,t){var n=M&&"href"==t.nodeName?e.getAttribute(t.nodeName,2):t.nodeValue;return new C(t,e,t.nodeName,n)}function B(e){var t=null;if(1==(n=e.nodeType)&&(t=null==(t=null==(t=e.textContent)||null==t?e.innerText:t)||null==t?"":t),"string"!=typeof t)if(D&&"title"==e.nodeName.toLowerCase()&&1==n)t=e.text;else if(9==n||1==n){e=9==n?e.documentElement:e.firstChild;var n=0,r=[];for(t="";e;){do{1!=e.nodeType&&(t+=e.nodeValue),D&&"title"==e.nodeName.toLowerCase()&&(t+=e.text),r[n++]=e}while(e=e.firstChild);for(;n&&!(e=r[--n].nextSibling););}}else t=e.nodeValue;return""+t}function U(e,t,n){if(null===t)return!0;try{if(!e.getAttribute)return!1}catch(e){return!1}return M&&"class"==t&&(t="className"),null==n?!!e.getAttribute(t):e.getAttribute(t,2)==n}function G(e,t,r,i,o){return(D?V:X).call(null,e,t,n(r)?r:null,n(i)?i:null,o||new z)}function V(e,t,n,r,i){if(e instanceof Me||8==e.b||n&&null===e.b){var o=t.all;if(!o)return i;if("*"!=(e=Y(e))&&!(o=t.getElementsByTagName(e)))return i;if(n){for(var a=[],u=0;t=o[u++];)U(t,n,r)&&a.push(t);o=a}for(u=0;t=o[u++];)"*"==e&&"!"==t.tagName||ee(i,t);return i}return H(e,t,n,r,i),i}function X(e,t,n,r,i){return t.getElementsByName&&r&&"name"==n&&!y?(t=t.getElementsByName(r),d(t,(function(t){e.a(t)&&ee(i,t)}))):t.getElementsByClassName&&r&&"class"==n?(t=t.getElementsByClassName(r),d(t,(function(t){t.className==r&&e.a(t)&&ee(i,t)}))):e instanceof Ne?H(e,t,n,r,i):t.getElementsByTagName&&(t=t.getElementsByTagName(e.f()),d(t,(function(e){U(e,n,r)&&ee(i,e)}))),i}function j(e,t,n,r,i){var o;if((e instanceof Me||8==e.b||n&&null===e.b)&&(o=t.childNodes)){var a=Y(e);return"*"==a||(o=p(o,(function(e){return e.tagName&&e.tagName.toLowerCase()==a})),o)?(n&&(o=p(o,(function(e){return U(e,n,r)}))),d(o,(function(e){"*"==a&&("!"==e.tagName||"*"==a&&1!=e.nodeType)||ee(i,e)})),i):i}return k(e,t,n,r,i)}function k(e,t,n,r,i){for(t=t.firstChild;t;t=t.nextSibling)U(t,n,r)&&e.a(t)&&ee(i,t);return i}function H(e,t,n,r,i){for(t=t.firstChild;t;t=t.nextSibling)U(t,n,r)&&e.a(t)&&ee(i,t),H(e,t,n,r,i)}function Y(e){if(e instanceof Ne){if(8==e.b)return"!";if(null===e.b)return"*"}return e.f()}function $(e,t){if(!e||!t)return!1;if(e.contains&&1==t.nodeType)return e==t||e.contains(t);if(void 0!==e.compareDocumentPosition)return e==t||!!(16&e.compareDocumentPosition(t));for(;t&&e!=t;)t=t.parentNode;return t==e}function K(e,n){if(e==n)return 0;if(e.compareDocumentPosition)return 2&e.compareDocumentPosition(n)?1:-1;if(y&&!(9<=Number(x))){if(9==e.nodeType)return-1;if(9==n.nodeType)return 1}if("sourceIndex"in e||e.parentNode&&"sourceIndex"in e.parentNode){var r=1==e.nodeType,i=1==n.nodeType;if(r&&i)return e.sourceIndex-n.sourceIndex;var o=e.parentNode,a=n.parentNode;return o==a?q(e,n):!r&&$(o,n)?-1*W(e,n):!i&&$(a,e)?W(n,e):(r?e.sourceIndex:o.sourceIndex)-(i?n.sourceIndex:a.sourceIndex)}return(r=(i=9==e.nodeType?e:e.ownerDocument||e.document).createRange()).selectNode(e),r.collapse(!0),(i=i.createRange()).selectNode(n),i.collapse(!0),r.compareBoundaryPoints(t.Range.START_TO_END,i)}function W(e,t){var n=e.parentNode;if(n==t)return-1;for(var r=t;r.parentNode!=n;)r=r.parentNode;return q(r,e)}function q(e,t){for(var n=t;n=n.previousSibling;)if(n==e)return-1;return 1}function z(){this.b=this.a=null,this.l=0}function Q(e){this.node=e,this.a=this.b=null}function Z(e,t){if(!e.a)return t;if(!t.a)return e;for(var n=e.a,r=t.a,i=null,o=null,a=0;n&&r;){o=n.node;var u=r.node;o==u||o instanceof C&&u instanceof C&&o.a==u.a?(o=n,n=n.a,r=r.a):0<K(n.node,r.node)?(o=r,r=r.a):(o=n,n=n.a),(o.b=i)?i.a=o:e.a=o,i=o,a++}for(o=n||r;o;)o.b=i,i=i.a=o,a++,o=o.a;return e.b=i,e.l=a,e}function J(e,t){var n=new Q(t);n.a=e.a,e.b?e.a.b=n:e.a=e.b=n,e.a=n,e.l++}function ee(e,t){var n=new Q(t);n.b=e.b,e.a?e.b.a=n:e.a=e.b=n,e.b=n,e.l++}function te(e){return(e=e.a)?e.node:null}function ne(e){return(e=te(e))?B(e):""}function re(e,t){return new ie(e,!!t)}function ie(e,t){this.f=e,this.b=(this.c=t)?e.b:e.a,this.a=null}function oe(e){var t=e.b;if(null==t)return null;var n=e.a=t;return e.b=e.c?t.b:t.a,n.node}function ae(e){this.i=e,this.b=this.g=!1,this.f=null}function ue(e){return"\n "+e.toString().split("\n").join("\n ")}function le(e,t){e.g=t}function ce(e,t){e.b=t}function se(e,t){var n=e.a(t);return n instanceof z?+ne(n):+n}function fe(e,t){var n=e.a(t);return n instanceof z?ne(n):""+n}function de(e,t){var n=e.a(t);return n instanceof z?!!n.l:!!n}function pe(e,t,n){ae.call(this,e.i),this.c=e,this.h=t,this.o=n,this.g=t.g||n.g,this.b=t.b||n.b,this.c==ge&&(n.b||n.g||4==n.i||0==n.i||!t.f?t.b||t.g||4==t.i||0==t.i||!n.f||(this.f={name:n.f.name,s:t}):this.f={name:t.f.name,s:n})}function Ee(e,t,n,r,i){var o;if(t=t.a(r),n=n.a(r),t instanceof z&&n instanceof z){for(r=oe(t=re(t));r;r=oe(t))for(o=oe(i=re(n));o;o=oe(i))if(e(B(r),B(o)))return!0;return!1}if(t instanceof z||n instanceof z){t instanceof z?(i=t,r=n):(i=n,r=t);for(var a=typeof r,u=oe(o=re(i));u;u=oe(o)){switch(a){case"number":u=+B(u);break;case"boolean":u=!!B(u);break;case"string":u=B(u);break;default:throw Error("Illegal primitive type for comparison.")}if(i==t&&e(u,r)||i==n&&e(r,u))return!0}return!1}return i?"boolean"==typeof t||"boolean"==typeof n?e(!!t,!!n):"number"==typeof t||"number"==typeof n?e(+t,+n):e(t,n):e(+t,+n)}function he(e,t,n,r){this.a=e,this.w=t,this.i=n,this.m=r}!R&&!y||y&&9<=Number(x)||R&&w("1.9.1"),y&&w("9"),a(pe),pe.prototype.a=function(e){return this.c.m(this.h,this.o,e)},pe.prototype.toString=function(){return"Binary Expression: "+this.c+ue(this.h)+ue(this.o)},he.prototype.toString=function(){return this.a};var me={};function _e(e,t,n,r){if(me.hasOwnProperty(e))throw Error("Binary operator already created: "+e);return e=new he(e,t,n,r),me[e.toString()]=e}_e("div",6,1,(function(e,t,n){return se(e,n)/se(t,n)})),_e("mod",6,1,(function(e,t,n){return se(e,n)%se(t,n)})),_e("*",6,1,(function(e,t,n){return se(e,n)*se(t,n)})),_e("+",5,1,(function(e,t,n){return se(e,n)+se(t,n)})),_e("-",5,1,(function(e,t,n){return se(e,n)-se(t,n)})),_e("<",4,2,(function(e,t,n){return Ee((function(e,t){return e<t}),e,t,n)})),_e(">",4,2,(function(e,t,n){return Ee((function(e,t){return e>t}),e,t,n)})),_e("<=",4,2,(function(e,t,n){return Ee((function(e,t){return e<=t}),e,t,n)})),_e(">=",4,2,(function(e,t,n){return Ee((function(e,t){return e>=t}),e,t,n)}));var ge=_e("=",3,2,(function(e,t,n){return Ee((function(e,t){return e==t}),e,t,n,!0)}));function be(e,t,n){this.a=e,this.b=t||1,this.f=n||1}function ve(e,t){if(t.a.length&&4!=e.i)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");ae.call(this,e.i),this.c=e,this.h=t,this.g=e.g,this.b=e.b}function ye(e,t){if(t.length<e.A)throw Error("Function "+e.j+" expects at least"+e.A+" arguments, "+t.length+" given");if(null!==e.v&&t.length>e.v)throw Error("Function "+e.j+" expects at most "+e.v+" arguments, "+t.length+" given");e.B&&d(t,(function(t,n){if(4!=t.i)throw Error("Argument "+n+" to function "+e.j+" is not of type Nodeset: "+t)})),ae.call(this,e.i),this.h=e,this.c=t,le(this,e.g||h(t,(function(e){return e.g}))),ce(this,e.D&&!t.length||e.C&&!!t.length||h(t,(function(e){return e.b})))}function Ae(e,t,n,r,i,o,a,u,l){this.j=e,this.i=t,this.g=n,this.D=r,this.C=i,this.m=o,this.A=a,this.v=void 0!==u?u:a,this.B=!!l}_e("!=",3,2,(function(e,t,n){return Ee((function(e,t){return e!=t}),e,t,n,!0)})),_e("and",2,2,(function(e,t,n){return de(e,n)&&de(t,n)})),_e("or",1,2,(function(e,t,n){return de(e,n)||de(t,n)})),a(ve),ve.prototype.a=function(e){return e=this.c.a(e),Xe(this.h,e)},ve.prototype.toString=function(){return"Filter:"+ue(this.c)+ue(this.h)},a(ye),ye.prototype.a=function(e){return this.h.m.apply(null,function(e){return Array.prototype.concat.apply(Array.prototype,arguments)}(e,this.c))},ye.prototype.toString=function(){var e="Function: "+this.h;if(this.c.length){var t=E(this.c,(function(e,t){return e+ue(t)}),"Arguments:");e+=ue(t)}return e},Ae.prototype.toString=function(){return this.j};var Re={};function Te(e,t,n,r,i,o,a,u){if(Re.hasOwnProperty(e))throw Error("Function already created: "+e+".");Re[e]=new Ae(e,t,n,r,!1,i,o,a,u)}function Ne(e,t){switch(this.h=e,this.c=void 0!==t?t:null,this.b=null,e){case"comment":this.b=8;break;case"text":this.b=3;break;case"processing-instruction":this.b=7;break;case"node":break;default:throw Error("Unexpected argument")}}function Ie(e){return"comment"==e||"text"==e||"processing-instruction"==e||"node"==e}function Se(e){this.b=e,this.a=0}Te("boolean",2,!1,!1,(function(e,t){return de(t,e)}),1),Te("ceiling",1,!1,!1,(function(e,t){return Math.ceil(se(t,e))}),1),Te("concat",3,!1,!1,(function(e,t){return E(function(e,t,n){return 2>=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,n)}(arguments,1),(function(t,n){return t+fe(n,e)}),"")}),2,null),Te("contains",2,!1,!1,(function(e,t,n){return l(fe(t,e),fe(n,e))}),2),Te("count",1,!1,!1,(function(e,t){return t.a(e).l}),1,1,!0),Te("false",2,!1,!1,(function(){return!1}),0),Te("floor",1,!1,!1,(function(e,t){return Math.floor(se(t,e))}),1),Te("id",4,!1,!1,(function(e,t){var r=9==(i=e.a).nodeType?i:i.ownerDocument,i=fe(t,e).split(/\s+/),o=[];d(i,(function(e){!(e=function(e){if(D){var t=r.all[e];if(t){if(t.nodeType&&e==t.id)return t;if(t.length)return function(e,t){var r;e:{r=e.length;for(var i=n(e)?e.split(""):e,o=0;o<r;o++)if(o in i&&t.call(void 0,i[o],o,e)){r=o;break e}r=-1}return 0>r?null:n(e)?e.charAt(r):e[r]}(t,(function(t){return e==t.id}))}return null}return r.getElementById(e)}(e))||0<=f(o,e)||o.push(e)})),o.sort(K);var a=new z;return d(o,(function(e){ee(a,e)})),a}),1),Te("lang",2,!1,!1,(function(){return!1}),1),Te("last",1,!0,!1,(function(e){if(1!=arguments.length)throw Error("Function last expects ()");return e.f}),0),Te("local-name",3,!1,!0,(function(e,t){var n=t?te(t.a(e)):e.a;return n?n.localName||n.nodeName.toLowerCase():""}),0,1,!0),Te("name",3,!1,!0,(function(e,t){var n=t?te(t.a(e)):e.a;return n?n.nodeName.toLowerCase():""}),0,1,!0),Te("namespace-uri",3,!0,!1,(function(){return""}),0,1,!0),Te("normalize-space",3,!1,!0,(function(e,t){return(t?fe(t,e):B(e.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")}),0,1),Te("not",2,!1,!1,(function(e,t){return!de(t,e)}),1),Te("number",1,!1,!0,(function(e,t){return t?se(t,e):+B(e.a)}),0,1),Te("position",1,!0,!1,(function(e){return e.b}),0),Te("round",1,!1,!1,(function(e,t){return Math.round(se(t,e))}),1),Te("starts-with",2,!1,!1,(function(e,t,n){return t=fe(t,e),e=fe(n,e),0==t.lastIndexOf(e,0)}),2),Te("string",3,!1,!0,(function(e,t){return t?fe(t,e):B(e.a)}),0,1),Te("string-length",1,!1,!0,(function(e,t){return(t?fe(t,e):B(e.a)).length}),0,1),Te("substring",3,!1,!1,(function(e,t,n,r){if(n=se(n,e),isNaN(n)||1/0==n||-1/0==n)return"";if(r=r?se(r,e):1/0,isNaN(r)||-1/0===r)return"";n=Math.round(n)-1;var i=Math.max(n,0);return e=fe(t,e),1/0==r?e.substring(i):e.substring(i,n+Math.round(r))}),2,3),Te("substring-after",3,!1,!1,(function(e,t,n){return t=fe(t,e),e=fe(n,e),-1==(n=t.indexOf(e))?"":t.substring(n+e.length)}),2),Te("substring-before",3,!1,!1,(function(e,t,n){return t=fe(t,e),e=fe(n,e),-1==(e=t.indexOf(e))?"":t.substring(0,e)}),2),Te("sum",1,!1,!1,(function(e,t){for(var n=re(t.a(e)),r=0,i=oe(n);i;i=oe(n))r+=+B(i);return r}),1,1,!0),Te("translate",3,!1,!1,(function(e,t,n,r){t=fe(t,e),n=fe(n,e);var i=fe(r,e);for(e={},r=0;r<n.length;r++){var o=n.charAt(r);o in e||(e[o]=i.charAt(r))}for(n="",r=0;r<t.length;r++)n+=(o=t.charAt(r))in e?e[o]:o;return n}),3),Te("true",2,!1,!1,(function(){return!0}),0),Ne.prototype.a=function(e){return null===this.b||this.b==e.nodeType},Ne.prototype.f=function(){return this.h},Ne.prototype.toString=function(){var e="Kind Test: "+this.h;return null===this.c||(e+=ue(this.c)),e};var Oe=/\$?(?:(?![0-9-\.])(?:\*|[\w-\.]+):)?(?![0-9-\.])(?:\*|[\w-\.]+)|\/\/|\.\.|::|\d+(?:\.\d*)?|\.\d+|"[^"]*"|'[^']*'|[!<>]=|\s+|./g,Pe=/^\s/;function we(e,t){return e.b[e.a+(t||0)]}function Le(e){return e.b[e.a++]}function xe(e){return e.b.length<=e.a}function De(e){ae.call(this,3),this.c=e.substring(1,e.length-1)}function Me(e,t){var n;this.j=e.toLowerCase(),n="*"==this.j?"*":"http://www.w3.org/1999/xhtml",this.c=t?t.toLowerCase():n}function Ce(e,t){if(ae.call(this,e.i),this.h=e,this.c=t,this.g=e.g,this.b=e.b,1==this.c.length){var n=this.c[0];n.u||n.c!=$e||"*"!=(n=n.o).f()&&(this.f={name:n.f(),s:null})}}function Fe(){ae.call(this,4)}function Be(){ae.call(this,4)}function Ue(e){return"/"==e||"//"==e}function Ge(e){ae.call(this,4),this.c=e,le(this,h(this.c,(function(e){return e.g}))),ce(this,h(this.c,(function(e){return e.b})))}function Ve(e,t){this.a=e,this.b=!!t}function Xe(e,t,n){for(n=n||0;n<e.a.length;n++)for(var r,i=e.a[n],o=re(t),a=t.l,u=0;r=oe(o);u++){var l=e.b?a-u:u+1;if("number"==typeof(r=i.a(new be(r,l,a))))l=l==r;else if("string"==typeof r||"boolean"==typeof r)l=!!r;else{if(!(r instanceof z))throw Error("Predicate.evaluate returned an unexpected type.");l=0<r.l}if(!l){if(r=(l=o).f,!(s=l.a))throw Error("Next must be called at least once before remove.");var c=s.b,s=s.a;c?c.a=s:r.a=s,s?s.b=c:r.b=c,r.l--,l.a=null}}return t}function je(e,t,n,r){ae.call(this,4),this.c=e,this.o=t,this.h=n||new Ve([]),this.u=!!r,t=0<(t=this.h).a.length?t.a[0].f:null,e.b&&t&&(e=t.name,e=D?e.toLowerCase():e,this.f={name:e,s:t.s});e:{for(e=this.h,t=0;t<e.a.length;t++)if((n=e.a[t]).g||1==n.i||0==n.i){e=!0;break e}e=!1}this.g=e}function ke(e,t,n,r){this.j=e,this.f=t,this.a=n,this.b=r}a(De),De.prototype.a=function(){return this.c},De.prototype.toString=function(){return"Literal: "+this.c},Me.prototype.a=function(e){var t=e.nodeType;return!(1!=t&&2!=t||(t=void 0!==e.localName?e.localName:e.nodeName,"*"!=this.j&&this.j!=t.toLowerCase()||"*"!=this.c&&this.c!=(e.namespaceURI?e.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")))},Me.prototype.f=function(){return this.j},Me.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.j},a(Ce),a(Fe),Fe.prototype.a=function(e){var t=new z;return 9==(e=e.a).nodeType?ee(t,e):ee(t,e.ownerDocument),t},Fe.prototype.toString=function(){return"Root Helper Expression"},a(Be),Be.prototype.a=function(e){var t=new z;return ee(t,e.a),t},Be.prototype.toString=function(){return"Context Helper Expression"},Ce.prototype.a=function(e){var t=this.h.a(e);if(!(t instanceof z))throw Error("Filter expression must evaluate to nodeset.");for(var n=0,r=(e=this.c).length;n<r&&t.l;n++){var i,o=e[n],a=re(t,o.c.a);if(o.g||o.c!=qe)if(o.g||o.c!=Qe)for(i=oe(a),t=o.a(new be(i));null!=(i=oe(a));)t=Z(t,i=o.a(new be(i)));else i=oe(a),t=o.a(new be(i));else{for(i=oe(a);(t=oe(a))&&(!i.contains||i.contains(t))&&8&t.compareDocumentPosition(i);i=t);t=o.a(new be(i))}}return t},Ce.prototype.toString=function(){var e;if(e="Path Expression:"+ue(this.h),this.c.length){var t=E(this.c,(function(e,t){return e+ue(t)}),"Steps:");e+=ue(t)}return e},a(Ge),Ge.prototype.a=function(e){var t=new z;return d(this.c,(function(n){if(!((n=n.a(e))instanceof z))throw Error("Path expression must evaluate to NodeSet.");t=Z(t,n)})),t},Ge.prototype.toString=function(){return E(this.c,(function(e,t){return e+ue(t)}),"Union Expression:")},Ve.prototype.toString=function(){return E(this.a,(function(e,t){return e+ue(t)}),"Predicates:")},a(je),je.prototype.a=function(e){var t=e.a,n=null,r=null,i=null,o=0;if((n=this.f)&&(r=n.name,i=n.s?fe(n.s,e):null,o=1),this.u)if(this.g||this.c!=Ke)if(t=oe(e=re(new je(We,new Ne("node")).a(e))))for(n=this.m(t,r,i,o);null!=(t=oe(e));)n=Z(n,this.m(t,r,i,o));else n=new z;else n=G(this.o,t,r,i),n=Xe(this.h,n,o);else n=this.m(e.a,r,i,o);return n},je.prototype.m=function(e,t,n,r){return e=this.c.f(this.o,e,t,n),Xe(this.h,e,r)},je.prototype.toString=function(){var e;if(e="Step:"+ue("Operator: "+(this.u?"//":"/")),this.c.j&&(e+=ue("Axis: "+this.c)),e+=ue(this.o),this.h.a.length){var t=E(this.h.a,(function(e,t){return e+ue(t)}),"Predicates:");e+=ue(t)}return e},ke.prototype.toString=function(){return this.j};var He={};function Ye(e,t,n,r){if(He.hasOwnProperty(e))throw Error("Axis already created: "+e);return t=new ke(e,t,n,!!r),He[e]=t}Ye("ancestor",(function(e,t){for(var n=new z,r=t;r=r.parentNode;)e.a(r)&&J(n,r);return n}),!0),Ye("ancestor-or-self",(function(e,t){var n=new z,r=t;do{e.a(r)&&J(n,r)}while(r=r.parentNode);return n}),!0);var $e=Ye("attribute",(function(e,t){var n=new z;if("style"==(o=e.f())&&D&&t.style)return ee(n,new C(t.style,t,"style",t.style.cssText)),n;var r=t.attributes;if(r)if(e instanceof Ne&&null===e.b||"*"==o)for(var i,o=0;i=r[o];o++)D?i.nodeValue&&ee(n,F(t,i)):ee(n,i);else(i=r.getNamedItem(o))&&(D?i.nodeValue&&ee(n,F(t,i)):ee(n,i));return n}),!1),Ke=Ye("child",(function(e,t,r,i,o){return(D?j:k).call(null,e,t,n(r)?r:null,n(i)?i:null,o||new z)}),!1,!0);Ye("descendant",G,!1,!0);var We=Ye("descendant-or-self",(function(e,t,n,r){var i=new z;return U(t,n,r)&&e.a(t)&&ee(i,t),G(e,t,n,r,i)}),!1,!0),qe=Ye("following",(function(e,t,n,r){var i=new z;do{for(var o=t;o=o.nextSibling;)U(o,n,r)&&e.a(o)&&ee(i,o),i=G(e,o,n,r,i)}while(t=t.parentNode);return i}),!1,!0);Ye("following-sibling",(function(e,t){for(var n=new z,r=t;r=r.nextSibling;)e.a(r)&&ee(n,r);return n}),!1),Ye("namespace",(function(){return new z}),!1);var ze=Ye("parent",(function(e,t){var n=new z;if(9==t.nodeType)return n;if(2==t.nodeType)return ee(n,t.ownerElement),n;var r=t.parentNode;return e.a(r)&&ee(n,r),n}),!1),Qe=Ye("preceding",(function(e,t,n,r){var i=new z,o=[];do{o.unshift(t)}while(t=t.parentNode);for(var a=1,u=o.length;a<u;a++){var l=[];for(t=o[a];t=t.previousSibling;)l.unshift(t);for(var c=0,s=l.length;c<s;c++)U(t=l[c],n,r)&&e.a(t)&&ee(i,t),i=G(e,t,n,r,i)}return i}),!0,!0);Ye("preceding-sibling",(function(e,t){for(var n=new z,r=t;r=r.previousSibling;)e.a(r)&&J(n,r);return n}),!0);var Ze=Ye("self",(function(e,t){var n=new z;return e.a(t)&&ee(n,t),n}),!1);function Je(e){ae.call(this,1),this.c=e,this.g=e.g,this.b=e.b}function et(e){ae.call(this,1),this.c=e}function tt(e,t){this.a=e,this.b=t}function nt(e){for(var t,n=[];;){rt(e,"Missing right hand side of binary expression."),t=st(e);var r=Le(e.a);if(!r)break;var i=(r=me[r]||null)&&r.w;if(!i){e.a.a--;break}for(;n.length&&i<=n[n.length-1].w;)t=new pe(n.pop(),n.pop(),t);n.push(t,r)}for(;n.length;)t=new pe(n.pop(),n.pop(),t);return t}function rt(e,t){if(xe(e.a))throw Error(t)}function it(e,t){var n=Le(e.a);if(n!=t)throw Error("Bad token, expected: "+t+" got: "+n)}function ot(e){if(")"!=(e=Le(e.a)))throw Error("Bad token: "+e)}function at(e){if(2>(e=Le(e.a)).length)throw Error("Unclosed literal string");return new De(e)}function ut(e){var t,n,r=[];if(Ue(we(e.a))){if(t=Le(e.a),n=we(e.a),"/"==t&&(xe(e.a)||"."!=n&&".."!=n&&"@"!=n&&"*"!=n&&!/(?![0-9])[\w]/.test(n)))return new Fe;n=new Fe,rt(e,"Missing next location step."),t=lt(e,t),r.push(t)}else{e:{switch(n=(t=we(e.a)).charAt(0)){case"$":throw Error("Variable reference not allowed in HTML XPath");case"(":Le(e.a),t=nt(e),rt(e,'unclosed "("'),it(e,")");break;case'"':case"'":t=at(e);break;default:if(isNaN(+t)){if(Ie(t)||!/(?![0-9])[\w]/.test(n)||"("!=we(e.a,1)){t=null;break e}for(t=Le(e.a),t=Re[t]||null,Le(e.a),n=[];")"!=we(e.a)&&(rt(e,"Missing function argument list."),n.push(nt(e)),","==we(e.a));)Le(e.a);rt(e,"Unclosed function argument list."),ot(e),t=new ye(t,n)}else t=new et(+Le(e.a))}"["==we(e.a)&&(t=new ve(t,n=new Ve(ct(e))))}if(t){if(!Ue(we(e.a)))return t;n=t}else t=lt(e,"/"),n=new Be,r.push(t)}for(;Ue(we(e.a));)t=Le(e.a),rt(e,"Missing next location step."),t=lt(e,t),r.push(t);return new Ce(n,r)}function lt(e,t){var n,r,i,o;if("/"!=t&&"//"!=t)throw Error('Step op should be "/" or "//"');if("."==we(e.a))return r=new je(Ze,new Ne("node")),Le(e.a),r;if(".."==we(e.a))return r=new je(ze,new Ne("node")),Le(e.a),r;if("@"==we(e.a))o=$e,Le(e.a),rt(e,"Missing attribute name");else if("::"==we(e.a,1)){if(!/(?![0-9])[\w]/.test(we(e.a).charAt(0)))throw Error("Bad token: "+Le(e.a));if(n=Le(e.a),!(o=He[n]||null))throw Error("No axis with name: "+n);Le(e.a),rt(e,"Missing node name")}else o=Ke;if(n=we(e.a),!/(?![0-9])[\w\*]/.test(n.charAt(0)))throw Error("Bad token: "+Le(e.a));if("("==we(e.a,1)){if(!Ie(n))throw Error("Invalid node type: "+n);if(!Ie(n=Le(e.a)))throw Error("Invalid type name: "+n);it(e,"("),rt(e,"Bad nodetype");var a=null;'"'!=(i=we(e.a).charAt(0))&&"'"!=i||(a=at(e)),rt(e,"Bad nodetype"),ot(e),n=new Ne(n,a)}else if(-1==(i=(n=Le(e.a)).indexOf(":")))n=new Me(n);else{var u;if("*"==(a=n.substring(0,i)))u="*";else if(!(u=e.b(a)))throw Error("Namespace prefix not declared: "+a);n=new Me(n=n.substr(i+1),u)}return i=new Ve(ct(e),o.a),r||new je(o,n,i,"//"==t)}function ct(e){for(var t=[];"["==we(e.a);){Le(e.a),rt(e,"Missing predicate expression.");var n=nt(e);t.push(n),rt(e,"Unclosed predicate expression."),it(e,"]")}return t}function st(e){if("-"==we(e.a))return Le(e.a),new Je(st(e));var t=ut(e);if("|"!=we(e.a))e=t;else{for(t=[t];"|"==Le(e.a);)rt(e,"Missing next union location path."),t.push(ut(e));e.a.a--,e=new Ge(t)}return e}function ft(e){switch(e.nodeType){case 1:return function(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}(pt,e);case 9:return ft(e.documentElement);case 11:case 10:case 6:case 12:return dt;default:return e.parentNode?ft(e.parentNode):dt}}function dt(){return null}function pt(e,t){if(e.prefix==t)return e.namespaceURI||"http://www.w3.org/1999/xhtml";var n=e.getAttributeNode("xmlns:"+t);return n&&n.specified?n.value||null:e.parentNode&&9!=e.parentNode.nodeType?pt(e.parentNode,t):null}function Et(e,t){if(!e.length)throw Error("Empty XPath expression.");var n=function(e){e=e.match(Oe);for(var t=0;t<e.length;t++)Pe.test(e[t])&&e.splice(t,1);return new Se(e)}(e);if(xe(n))throw Error("Invalid XPath expression.");t?"function"==function(e){var t=typeof e;if("object"==t){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof e.length&&void 0!==e.splice&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||void 0!==e.call&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else if("function"==t&&void 0===e.call)return"object";return t}(t)||(t=o(t.lookupNamespaceURI,t)):t=function(){return null};var r=nt(new tt(n,t));if(!xe(n))throw Error("Bad token: "+Le(n));this.evaluate=function(e,t){return new ht(r.a(new be(e)),t)}}function ht(e,t){if(0==t)if(e instanceof z)t=4;else if("string"==typeof e)t=2;else if("number"==typeof e)t=1;else{if("boolean"!=typeof e)throw Error("Unexpected evaluation result.");t=3}if(2!=t&&1!=t&&3!=t&&!(e instanceof z))throw Error("value could not be converted to the specified type");var n;switch(this.resultType=t,t){case 2:this.stringValue=e instanceof z?ne(e):""+e;break;case 1:this.numberValue=e instanceof z?+ne(e):+e;break;case 3:this.booleanValue=e instanceof z?0<e.l:!!e;break;case 4:case 5:case 6:case 7:var r=re(e);n=[];for(var i=oe(r);i;i=oe(r))n.push(i instanceof C?i.a:i);this.snapshotLength=e.l,this.invalidIteratorState=!1;break;case 8:case 9:r=te(e),this.singleNodeValue=r instanceof C?r.a:r;break;default:throw Error("Unknown XPathResult type.")}var o=0;this.iterateNext=function(){if(4!=t&&5!=t)throw Error("iterateNext called with wrong result type");return o>=n.length?null:n[o++]},this.snapshotItem=function(e){if(6!=t&&7!=t)throw Error("snapshotItem called with wrong result type");return e>=n.length||0>e?null:n[e]}}function mt(e){this.lookupNamespaceURI=ft(e)}function _t(e,n){var r=e||t,i=r.Document&&r.Document.prototype||r.document;i.evaluate&&!n||(r.XPathResult=ht,i.evaluate=function(e,t,n,r){return new Et(e,n).evaluate(t,r)},i.createExpression=function(e,t){return new Et(e,t)},i.createNSResolver=function(e){return new mt(e)})}a(Je),Je.prototype.a=function(e){return-se(this.c,e)},Je.prototype.toString=function(){return"Unary Expression: -"+ue(this.c)},a(et),et.prototype.a=function(){return this.c},et.prototype.toString=function(){return"Number: "+this.c},ht.ANY_TYPE=0,ht.NUMBER_TYPE=1,ht.STRING_TYPE=2,ht.BOOLEAN_TYPE=3,ht.UNORDERED_NODE_ITERATOR_TYPE=4,ht.ORDERED_NODE_ITERATOR_TYPE=5,ht.UNORDERED_NODE_SNAPSHOT_TYPE=6,ht.ORDERED_NODE_SNAPSHOT_TYPE=7,ht.ANY_UNORDERED_NODE_TYPE=8,ht.FIRST_ORDERED_NODE_TYPE=9;var gt,bt=["wgxpath","install"],vt=t;bt[0]in vt||!vt.execScript||vt.execScript("var "+bt[0]);for(;bt.length&&(gt=bt.shift());)bt.length||void 0===_t?vt=vt[gt]?vt[gt]:vt[gt]={}:vt[gt]=_t;e.exports.install=_t,e.exports.XPathResultType={ANY_TYPE:0,NUMBER_TYPE:1,STRING_TYPE:2,BOOLEAN_TYPE:3,UNORDERED_NODE_ITERATOR_TYPE:4,ORDERED_NODE_ITERATOR_TYPE:5,UNORDERED_NODE_SNAPSHOT_TYPE:6,ORDERED_NODE_SNAPSHOT_TYPE:7,ANY_UNORDERED_NODE_TYPE:8,FIRST_ORDERED_NODE_TYPE:9}}).call(n.g)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";n.r(r),n.d(r,{xpath:function(){return o}});var e=n(932),t=n(885);let i=!1;function o(n,r){return i||(e.install(window),i=!0),r((0,t.createXPathFromElement)(n))}}(),self.mabl_xpath=r}();
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.expectedPlainSuite = exports.sampleTestResult = void 0;
|
|
4
|
+
const execution_1 = require("../../../execution");
|
|
5
|
+
exports.sampleTestResult = {
|
|
6
|
+
numFailedTests: 1,
|
|
7
|
+
numPassedTests: 3,
|
|
8
|
+
numSkippedTests: 1,
|
|
9
|
+
numTotalTests: 5,
|
|
10
|
+
startTime: 1627580108948,
|
|
11
|
+
endTime: 1627580377201,
|
|
12
|
+
totalTimeSeconds: 268.253,
|
|
13
|
+
testResults: [
|
|
14
|
+
{
|
|
15
|
+
functionallyCompleted: false,
|
|
16
|
+
status: execution_1.TestResultStatus.skipped,
|
|
17
|
+
errorMessage: 'Test is not currently enabled',
|
|
18
|
+
testId: 'jW60MgcXnf0qbw90AiXe1g-j:1',
|
|
19
|
+
testName: 'Duplicate request headers',
|
|
20
|
+
startTime: 1627580108956,
|
|
21
|
+
endTime: 1627580108956,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
functionallyCompleted: true,
|
|
25
|
+
status: execution_1.TestResultStatus.passed,
|
|
26
|
+
testId: 'fb60BEqZa3kXZy1Gj0hAsA-j:4',
|
|
27
|
+
testName: 'EX-001 - Click and Double Click',
|
|
28
|
+
errorMessage: '',
|
|
29
|
+
startTime: 1627580108962,
|
|
30
|
+
endTime: 1627580114195,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
functionallyCompleted: false,
|
|
34
|
+
status: execution_1.TestResultStatus.failed,
|
|
35
|
+
testId: 'WvpAcSKyT2Sh5Rp817Saiw-j:0',
|
|
36
|
+
testName: 'EX-002 - Assert presence',
|
|
37
|
+
errorMessage: 'Failure running Flow: - e4NjKPbkHut9ONLTFn75NA-f:1 - Element not found',
|
|
38
|
+
startTime: 1627580114197,
|
|
39
|
+
endTime: 1627580116478,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
functionallyCompleted: true,
|
|
43
|
+
status: execution_1.TestResultStatus.passed,
|
|
44
|
+
testId: 'PgRXOjMkUcqqLiRRLZVZMA-j:2',
|
|
45
|
+
testName: 'EX-056 Enter text on HTML5 input types',
|
|
46
|
+
errorMessage: '',
|
|
47
|
+
startTime: 1627580369221,
|
|
48
|
+
endTime: 1627580372959,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
functionallyCompleted: true,
|
|
52
|
+
status: execution_1.TestResultStatus.passed,
|
|
53
|
+
testId: 'gGxPiAi2XfJQuqSYc30xGA-j:0',
|
|
54
|
+
testName: 'EX-058 Enter text into non-text input',
|
|
55
|
+
errorMessage: '',
|
|
56
|
+
startTime: 1627580372960,
|
|
57
|
+
endTime: 1627580377201,
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
success: true,
|
|
61
|
+
};
|
|
62
|
+
exports.expectedPlainSuite = {
|
|
63
|
+
_timeout: 0,
|
|
64
|
+
afterHooks: [],
|
|
65
|
+
beforeHooks: [],
|
|
66
|
+
duration: 268253,
|
|
67
|
+
failures: ['testUuid'],
|
|
68
|
+
file: '',
|
|
69
|
+
fullFile: '',
|
|
70
|
+
passes: ['testUuid', 'testUuid', 'testUuid'],
|
|
71
|
+
pending: [],
|
|
72
|
+
root: true,
|
|
73
|
+
rootEmpty: false,
|
|
74
|
+
skipped: ['testUuid'],
|
|
75
|
+
suites: [],
|
|
76
|
+
tests: [
|
|
77
|
+
{
|
|
78
|
+
duration: 0,
|
|
79
|
+
code: 'Test was skipped',
|
|
80
|
+
err: { message: 'Test is not currently enabled' },
|
|
81
|
+
fail: false,
|
|
82
|
+
fullTitle: 'Duplicate request headers - jW60MgcXnf0qbw90AiXe1g-j:1',
|
|
83
|
+
isHook: false,
|
|
84
|
+
parentUUID: 'testUuid',
|
|
85
|
+
pass: false,
|
|
86
|
+
pending: false,
|
|
87
|
+
skipped: true,
|
|
88
|
+
state: undefined,
|
|
89
|
+
timedOut: false,
|
|
90
|
+
title: 'Duplicate request headers',
|
|
91
|
+
uuid: 'testUuid',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
duration: 5233,
|
|
95
|
+
code: 'Test passed',
|
|
96
|
+
err: {},
|
|
97
|
+
fail: false,
|
|
98
|
+
fullTitle: 'EX-001 - Click and Double Click - fb60BEqZa3kXZy1Gj0hAsA-j:4',
|
|
99
|
+
isHook: false,
|
|
100
|
+
parentUUID: 'testUuid',
|
|
101
|
+
pass: true,
|
|
102
|
+
pending: false,
|
|
103
|
+
skipped: false,
|
|
104
|
+
state: 'passed',
|
|
105
|
+
timedOut: false,
|
|
106
|
+
title: 'EX-001 - Click and Double Click',
|
|
107
|
+
uuid: 'testUuid',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
duration: 2281,
|
|
111
|
+
code: 'Test has failed',
|
|
112
|
+
err: {
|
|
113
|
+
message: 'Failure running Flow: - e4NjKPbkHut9ONLTFn75NA-f:1 - Element not found',
|
|
114
|
+
},
|
|
115
|
+
fail: true,
|
|
116
|
+
fullTitle: 'EX-002 - Assert presence - WvpAcSKyT2Sh5Rp817Saiw-j:0',
|
|
117
|
+
isHook: false,
|
|
118
|
+
parentUUID: 'testUuid',
|
|
119
|
+
pass: false,
|
|
120
|
+
pending: false,
|
|
121
|
+
skipped: false,
|
|
122
|
+
state: 'failed',
|
|
123
|
+
timedOut: false,
|
|
124
|
+
title: 'EX-002 - Assert presence',
|
|
125
|
+
uuid: 'testUuid',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
duration: 3738,
|
|
129
|
+
code: 'Test passed',
|
|
130
|
+
err: {},
|
|
131
|
+
fail: false,
|
|
132
|
+
fullTitle: 'EX-056 Enter text on HTML5 input types - PgRXOjMkUcqqLiRRLZVZMA-j:2',
|
|
133
|
+
isHook: false,
|
|
134
|
+
parentUUID: 'testUuid',
|
|
135
|
+
pass: true,
|
|
136
|
+
pending: false,
|
|
137
|
+
skipped: false,
|
|
138
|
+
state: 'passed',
|
|
139
|
+
timedOut: false,
|
|
140
|
+
title: 'EX-056 Enter text on HTML5 input types',
|
|
141
|
+
uuid: 'testUuid',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
duration: 4241,
|
|
145
|
+
code: 'Test passed',
|
|
146
|
+
err: {},
|
|
147
|
+
fail: false,
|
|
148
|
+
fullTitle: 'EX-058 Enter text into non-text input - gGxPiAi2XfJQuqSYc30xGA-j:0',
|
|
149
|
+
isHook: false,
|
|
150
|
+
parentUUID: 'testUuid',
|
|
151
|
+
pass: true,
|
|
152
|
+
pending: false,
|
|
153
|
+
skipped: false,
|
|
154
|
+
state: 'passed',
|
|
155
|
+
timedOut: false,
|
|
156
|
+
title: 'EX-058 Enter text into non-text input',
|
|
157
|
+
uuid: 'testUuid',
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
title: 'mabl run --id SPYP5dzZwu81x1xBwGL0Pg-j --reporter mochawesome --headless',
|
|
161
|
+
uuid: 'testUuid',
|
|
162
|
+
};
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.generateReportOptions = exports.generatePlainSuiteFromTestResults = exports.generateMochAwesomeReportFromTestResults = void 0;
|
|
30
|
+
const uuid_1 = require("uuid");
|
|
31
|
+
const TestResult_1 = require("../../core/execution/TestResult");
|
|
32
|
+
const mochawesome_report_generator_1 = __importDefault(require("mochawesome-report-generator"));
|
|
33
|
+
const moment_1 = __importDefault(require("moment"));
|
|
34
|
+
const loggingProvider_1 = require("../../providers/logging/loggingProvider");
|
|
35
|
+
const path = __importStar(require("path"));
|
|
36
|
+
const pureUtil_1 = require("../../util/pureUtil");
|
|
37
|
+
function generateMochAwesomeReportFromTestResults(testResults, reportOptions) {
|
|
38
|
+
const plainSuite = generatePlainSuiteFromTestResults(testResults);
|
|
39
|
+
const parentSuite = generateHoldingTestSuiteObj(plainSuite);
|
|
40
|
+
const finalOptions = generateReportOptions(reportOptions);
|
|
41
|
+
const cliVersion = `@mablhq/mabl-cli@${(0, pureUtil_1.getCliVersion)()}`;
|
|
42
|
+
const testReportObj = {
|
|
43
|
+
results: [parentSuite],
|
|
44
|
+
stats: {
|
|
45
|
+
testsRegistered: testResults.numTotalTests,
|
|
46
|
+
passPercent: (testResults.numPassedTests /
|
|
47
|
+
(testResults.numTotalTests - testResults.numSkippedTests)) *
|
|
48
|
+
100,
|
|
49
|
+
pendingPercent: 0,
|
|
50
|
+
other: 0,
|
|
51
|
+
hasOther: false,
|
|
52
|
+
skipped: testResults.numSkippedTests,
|
|
53
|
+
hasSkipped: !!testResults.numSkippedTests,
|
|
54
|
+
start: (0, moment_1.default)(testResults.startTime).toISOString(),
|
|
55
|
+
end: (0, moment_1.default)(testResults.endTime).toISOString(),
|
|
56
|
+
duration: testResults.endTime - testResults.startTime,
|
|
57
|
+
failures: testResults.numFailedTests,
|
|
58
|
+
passes: testResults.numPassedTests,
|
|
59
|
+
pending: 0,
|
|
60
|
+
suites: 1,
|
|
61
|
+
tests: testResults.numTotalTests,
|
|
62
|
+
},
|
|
63
|
+
meta: {
|
|
64
|
+
mocha: {
|
|
65
|
+
version: cliVersion,
|
|
66
|
+
},
|
|
67
|
+
mochawesome: {
|
|
68
|
+
options: 'unavailable',
|
|
69
|
+
version: cliVersion,
|
|
70
|
+
},
|
|
71
|
+
marge: {
|
|
72
|
+
options: finalOptions,
|
|
73
|
+
version: cliVersion,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
const input = finalOptions.saveHtml
|
|
78
|
+
? JSON.stringify(testReportObj)
|
|
79
|
+
: testReportObj;
|
|
80
|
+
return mochawesome_report_generator_1.default
|
|
81
|
+
.create(input, finalOptions)
|
|
82
|
+
.then(([_, file]) => {
|
|
83
|
+
loggingProvider_1.logger.info(`Report generated: ${file}`);
|
|
84
|
+
})
|
|
85
|
+
.catch((error) => {
|
|
86
|
+
loggingProvider_1.logger.error(error);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
exports.generateMochAwesomeReportFromTestResults = generateMochAwesomeReportFromTestResults;
|
|
90
|
+
function generatePlainSuiteFromTestResults(testResults) {
|
|
91
|
+
const parentId = (0, uuid_1.v4)();
|
|
92
|
+
const plainTests = testResults.testResults.map((testResult) => generatePlainTestForTestRun(parentId, testResult));
|
|
93
|
+
const passes = plainTests
|
|
94
|
+
.filter((test) => test.pass)
|
|
95
|
+
.map((test) => test.uuid);
|
|
96
|
+
const failures = plainTests
|
|
97
|
+
.filter((test) => test.fail)
|
|
98
|
+
.map((test) => test.uuid);
|
|
99
|
+
const skipped = plainTests
|
|
100
|
+
.filter((test) => test.skipped)
|
|
101
|
+
.map((test) => test.uuid);
|
|
102
|
+
const command = constructTestRunCommand();
|
|
103
|
+
return {
|
|
104
|
+
uuid: parentId,
|
|
105
|
+
title: command !== null && command !== void 0 ? command : `mabl CLI tests`,
|
|
106
|
+
fullFile: '',
|
|
107
|
+
file: '',
|
|
108
|
+
beforeHooks: [],
|
|
109
|
+
afterHooks: [],
|
|
110
|
+
tests: plainTests,
|
|
111
|
+
suites: [],
|
|
112
|
+
passes,
|
|
113
|
+
failures,
|
|
114
|
+
pending: [],
|
|
115
|
+
skipped,
|
|
116
|
+
duration: testResults.totalTimeSeconds * 1000,
|
|
117
|
+
root: true,
|
|
118
|
+
rootEmpty: false,
|
|
119
|
+
_timeout: 0,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
exports.generatePlainSuiteFromTestResults = generatePlainSuiteFromTestResults;
|
|
123
|
+
function generatePlainTestForTestRun(parentUuid, testResult) {
|
|
124
|
+
var _a;
|
|
125
|
+
return {
|
|
126
|
+
title: (_a = testResult.testName) !== null && _a !== void 0 ? _a : '',
|
|
127
|
+
fullTitle: `${testResult.testName} - ${testResult.testId}`,
|
|
128
|
+
timedOut: false,
|
|
129
|
+
code: getCodeForResult(testResult),
|
|
130
|
+
pass: testResult.status === TestResult_1.TestResultStatus.passed,
|
|
131
|
+
fail: testResult.status === TestResult_1.TestResultStatus.failed,
|
|
132
|
+
pending: false,
|
|
133
|
+
uuid: (0, uuid_1.v4)(),
|
|
134
|
+
isHook: false,
|
|
135
|
+
skipped: testResult.status === TestResult_1.TestResultStatus.skipped,
|
|
136
|
+
err: testResult.errorMessage
|
|
137
|
+
? {
|
|
138
|
+
message: testResult.errorMessage,
|
|
139
|
+
}
|
|
140
|
+
: {},
|
|
141
|
+
duration: testResult.endTime - testResult.startTime,
|
|
142
|
+
parentUUID: parentUuid,
|
|
143
|
+
state: getTestState(testResult.status),
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
function getCodeForResult(testResult) {
|
|
147
|
+
switch (testResult.status) {
|
|
148
|
+
case TestResult_1.TestResultStatus.passed:
|
|
149
|
+
return 'Test passed';
|
|
150
|
+
case TestResult_1.TestResultStatus.skipped:
|
|
151
|
+
return 'Test was skipped';
|
|
152
|
+
case TestResult_1.TestResultStatus.failed:
|
|
153
|
+
return 'Test has failed';
|
|
154
|
+
default:
|
|
155
|
+
return '';
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function getTestState(testResultStatus) {
|
|
159
|
+
switch (testResultStatus) {
|
|
160
|
+
case TestResult_1.TestResultStatus.passed:
|
|
161
|
+
return 'passed';
|
|
162
|
+
case TestResult_1.TestResultStatus.failed:
|
|
163
|
+
return 'failed';
|
|
164
|
+
default:
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
function constructTestRunCommand() {
|
|
169
|
+
try {
|
|
170
|
+
const processArgs = process.argv;
|
|
171
|
+
const testArgIndex = processArgs.findIndex((arg) => arg === 'tests');
|
|
172
|
+
if (testArgIndex) {
|
|
173
|
+
processArgs.splice(0, testArgIndex + 1);
|
|
174
|
+
}
|
|
175
|
+
return `mabl ${processArgs.join(' ')}`;
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
loggingProvider_1.logger.debug('Could not create original command for report');
|
|
179
|
+
}
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
function generateHoldingTestSuiteObj(suite) {
|
|
183
|
+
return {
|
|
184
|
+
uuid: (0, uuid_1.v4)(),
|
|
185
|
+
title: `mabl CLI test run`,
|
|
186
|
+
fullFile: 'mabl/tests/run',
|
|
187
|
+
file: 'mabl/tests/run',
|
|
188
|
+
beforeHooks: [],
|
|
189
|
+
afterHooks: [],
|
|
190
|
+
tests: [],
|
|
191
|
+
suites: [suite],
|
|
192
|
+
passes: [],
|
|
193
|
+
failures: [],
|
|
194
|
+
pending: [],
|
|
195
|
+
skipped: [],
|
|
196
|
+
duration: 0,
|
|
197
|
+
root: true,
|
|
198
|
+
rootEmpty: true,
|
|
199
|
+
_timeout: 0,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function generateReportOptions(supplied) {
|
|
203
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
204
|
+
if (supplied.json) {
|
|
205
|
+
supplied.saveJson = supplied.json;
|
|
206
|
+
supplied.saveHtml = !supplied.saveJson;
|
|
207
|
+
}
|
|
208
|
+
else if (supplied.html) {
|
|
209
|
+
supplied.saveHtml = supplied.html;
|
|
210
|
+
supplied.saveJson = !supplied.saveHtml;
|
|
211
|
+
}
|
|
212
|
+
return {
|
|
213
|
+
reportFilename: (_a = supplied.reportFilename) !== null && _a !== void 0 ? _a : `mabl-mochawesomeReport`,
|
|
214
|
+
reportDir: (_b = supplied.reportDir) !== null && _b !== void 0 ? _b : path.normalize(`./mablReports`),
|
|
215
|
+
overwrite: (_c = supplied.overwrite) !== null && _c !== void 0 ? _c : true,
|
|
216
|
+
reportTitle: (_d = supplied.reportTitle) !== null && _d !== void 0 ? _d : `mabl mochawesome report`,
|
|
217
|
+
reportPageTitle: (_e = supplied.reportPageTitle) !== null && _e !== void 0 ? _e : `mabl mochawesome report`,
|
|
218
|
+
autoOpen: (_f = supplied.autoOpen) !== null && _f !== void 0 ? _f : !supplied.saveJson,
|
|
219
|
+
showPassed: (_g = supplied.showPassed) !== null && _g !== void 0 ? _g : true,
|
|
220
|
+
showFailed: (_h = supplied.showFailed) !== null && _h !== void 0 ? _h : true,
|
|
221
|
+
showPending: (_j = supplied.showPending) !== null && _j !== void 0 ? _j : true,
|
|
222
|
+
showSkipped: (_k = supplied.showSkipped) !== null && _k !== void 0 ? _k : true,
|
|
223
|
+
saveJson: supplied.saveJson,
|
|
224
|
+
saveHtml: supplied.saveHtml,
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
exports.generateReportOptions = generateReportOptions;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseOutReportOptions = exports.handleReportingForTestsRun = void 0;
|
|
4
|
+
const constants_1 = require("../commands/constants");
|
|
5
|
+
const loggingProvider_1 = require("../providers/logging/loggingProvider");
|
|
6
|
+
const mochAwesomeReporter_1 = require("./mochAwesome/mochAwesomeReporter");
|
|
7
|
+
async function handleReportingForTestsRun(reporter, testResults, reportOptions) {
|
|
8
|
+
let options;
|
|
9
|
+
try {
|
|
10
|
+
options = reportOptions ? parseOutReportOptions(reportOptions) : {};
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
throw new Error('Could not parse the supplied reporter options');
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
switch (reporter) {
|
|
17
|
+
case constants_1.ReporterOptions.Mochawesome:
|
|
18
|
+
await (0, mochAwesomeReporter_1.generateMochAwesomeReportFromTestResults)(testResults, options);
|
|
19
|
+
break;
|
|
20
|
+
default:
|
|
21
|
+
throw new Error(`Unsupported reporter options supplied: ${reporter}`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
loggingProvider_1.logger.error(`Unable to create report for the test run using reporter: ${reporter} due to Error: ${error}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.handleReportingForTestsRun = handleReportingForTestsRun;
|
|
29
|
+
function parseOutReportOptions(suppliedOptions) {
|
|
30
|
+
const reporterOptions = {};
|
|
31
|
+
const pairs = suppliedOptions.split(',');
|
|
32
|
+
pairs.forEach((pair) => {
|
|
33
|
+
const [key, value] = pair.split('=', 3);
|
|
34
|
+
if (value.toLowerCase() === 'false' || value.toLowerCase() === 'true') {
|
|
35
|
+
reporterOptions[key] = value.toLowerCase() === 'true';
|
|
36
|
+
}
|
|
37
|
+
else if (!Number.isNaN(Number(value))) {
|
|
38
|
+
reporterOptions[key] = Number(key);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
reporterOptions[key] = value;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
return reporterOptions;
|
|
45
|
+
}
|
|
46
|
+
exports.parseOutReportOptions = parseOutReportOptions;
|