@silasfmartins/testhub 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/copilot-instructions.md +520 -0
- package/biome.json +37 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +169 -0
- package/dist/scripts/consumer-postinstall.d.ts +15 -0
- package/dist/scripts/consumer-postinstall.js +785 -0
- package/dist/scripts/generate-docs.d.ts +16 -0
- package/dist/scripts/generate-docs.js +1363 -0
- package/dist/scripts/generate-index.d.ts +2 -0
- package/dist/scripts/generate-index.js +314 -0
- package/dist/scripts/init-api.d.ts +2 -0
- package/dist/scripts/init-api.js +525 -0
- package/dist/scripts/init-banco.d.ts +2 -0
- package/dist/scripts/init-banco.js +347 -0
- package/dist/scripts/init-frontend.d.ts +2 -0
- package/dist/scripts/init-frontend.js +627 -0
- package/dist/scripts/init-mobile.d.ts +2 -0
- package/dist/scripts/init-mobile.js +481 -0
- package/dist/scripts/init-scenarios.d.ts +2 -0
- package/dist/scripts/init-scenarios.js +846 -0
- package/dist/scripts/init-ssh.d.ts +2 -0
- package/dist/scripts/init-ssh.js +639 -0
- package/dist/scripts/package-versions.d.ts +57 -0
- package/dist/scripts/package-versions.js +768 -0
- package/dist/scripts/postinstall.d.ts +1 -0
- package/dist/scripts/postinstall.js +527 -0
- package/dist/scripts/robust-build.d.ts +7 -0
- package/dist/scripts/robust-build.js +88 -0
- package/dist/scripts/setup-local-packages.d.ts +31 -0
- package/dist/scripts/setup-local-packages.js +237 -0
- package/dist/scripts/smart-override.d.ts +2 -0
- package/dist/scripts/smart-override.js +1360 -0
- package/dist/scripts/sync-configs.d.ts +27 -0
- package/dist/scripts/sync-configs.js +248 -0
- package/dist/scripts/test-biome-parse.d.ts +5 -0
- package/dist/scripts/test-biome-parse.js +84 -0
- package/dist/scripts/ultracite-setup.d.ts +4 -0
- package/dist/scripts/ultracite-setup.js +310 -0
- package/dist/scripts/update-all-init-scripts.d.ts +2 -0
- package/dist/scripts/update-all-init-scripts.js +52 -0
- package/dist/scripts/update-biome-schema.d.ts +15 -0
- package/dist/scripts/update-biome-schema.js +124 -0
- package/dist/src/AutoCoreFacade.d.ts +145 -0
- package/dist/src/AutoCoreFacade.js +217 -0
- package/dist/src/api/ApiActions.d.ts +297 -0
- package/dist/src/api/ApiActions.js +1905 -0
- package/dist/src/api/Certificate.d.ts +60 -0
- package/dist/src/api/Certificate.js +79 -0
- package/dist/src/api/JsonResponse.d.ts +116 -0
- package/dist/src/api/JsonResponse.js +206 -0
- package/dist/src/appium/DeviceFarmViewer.d.ts +79 -0
- package/dist/src/appium/DeviceFarmViewer.js +1083 -0
- package/dist/src/appium/MobileActions.d.ts +347 -0
- package/dist/src/appium/MobileActions.js +1632 -0
- package/dist/src/appium/MobileConnection.d.ts +160 -0
- package/dist/src/appium/MobileConnection.js +772 -0
- package/dist/src/config/envLoader.d.ts +123 -0
- package/dist/src/config/envLoader.js +361 -0
- package/dist/src/config/jest-safe-setup.d.ts +19 -0
- package/dist/src/config/jest-safe-setup.js +369 -0
- package/dist/src/config/timeouts.d.ts +32 -0
- package/dist/src/config/timeouts.js +38 -0
- package/dist/src/desktop/DesktopActions.d.ts +46 -0
- package/dist/src/desktop/DesktopActions.js +398 -0
- package/dist/src/desktop/DesktopConnection.d.ts +32 -0
- package/dist/src/desktop/DesktopConnection.js +84 -0
- package/dist/src/domain/entities/TestExecution.d.ts +117 -0
- package/dist/src/domain/entities/TestExecution.js +150 -0
- package/dist/src/domain/entities/TestReport.d.ts +114 -0
- package/dist/src/domain/entities/TestReport.js +179 -0
- package/dist/src/domain/repositories/ITestRepository.d.ts +196 -0
- package/dist/src/domain/repositories/ITestRepository.js +14 -0
- package/dist/src/domain/schemas/ValidationSchemas.d.ts +159 -0
- package/dist/src/domain/schemas/ValidationSchemas.js +181 -0
- package/dist/src/functions/errors/BaseError.d.ts +78 -0
- package/dist/src/functions/errors/BaseError.js +245 -0
- package/dist/src/functions/errors/ConfigurationError.d.ts +16 -0
- package/dist/src/functions/errors/ConfigurationError.js +48 -0
- package/dist/src/functions/errors/ErrorCatalog.d.ts +148 -0
- package/dist/src/functions/errors/ErrorCatalog.js +157 -0
- package/dist/src/functions/errors/GlobalErrorHandler.d.ts +101 -0
- package/dist/src/functions/errors/GlobalErrorHandler.js +281 -0
- package/dist/src/functions/errors/IntegrationError.d.ts +17 -0
- package/dist/src/functions/errors/IntegrationError.js +51 -0
- package/dist/src/functions/errors/SecurityError.d.ts +14 -0
- package/dist/src/functions/errors/SecurityError.js +42 -0
- package/dist/src/functions/errors/SystemError.d.ts +12 -0
- package/dist/src/functions/errors/SystemError.js +36 -0
- package/dist/src/functions/errors/ValidationError.d.ts +14 -0
- package/dist/src/functions/errors/ValidationError.js +61 -0
- package/dist/src/functions/errors/index.d.ts +12 -0
- package/dist/src/functions/errors/index.js +13 -0
- package/dist/src/global-setup.d.ts +1 -0
- package/dist/src/global-setup.js +1037 -0
- package/dist/src/helpers/BancoActions.d.ts +188 -0
- package/dist/src/helpers/BancoActions.js +581 -0
- package/dist/src/helpers/EnviromentHelper.d.ts +17 -0
- package/dist/src/helpers/EnviromentHelper.js +66 -0
- package/dist/src/helpers/ParallelExecutionHelper.d.ts +183 -0
- package/dist/src/helpers/ParallelExecutionHelper.js +375 -0
- package/dist/src/helpers/SyncSignal.d.ts +15 -0
- package/dist/src/helpers/SyncSignal.js +44 -0
- package/dist/src/hubdocs/CategoryDetector.d.ts +83 -0
- package/dist/src/hubdocs/CategoryDetector.js +401 -0
- package/dist/src/hubdocs/DirectStatementInterceptor.d.ts +54 -0
- package/dist/src/hubdocs/DirectStatementInterceptor.js +243 -0
- package/dist/src/hubdocs/ExecutionTracker.d.ts +107 -0
- package/dist/src/hubdocs/ExecutionTracker.js +702 -0
- package/dist/src/hubdocs/HubDocs.d.ts +395 -0
- package/dist/src/hubdocs/HubDocs.js +3586 -0
- package/dist/src/hubdocs/StatementMethodFilter.d.ts +71 -0
- package/dist/src/hubdocs/StatementMethodFilter.js +618 -0
- package/dist/src/hubdocs/StatementTracker.d.ts +417 -0
- package/dist/src/hubdocs/StatementTracker.js +2419 -0
- package/dist/src/hubdocs/SwaggerGenerator.d.ts +59 -0
- package/dist/src/hubdocs/SwaggerGenerator.js +405 -0
- package/dist/src/hubdocs/index.d.ts +9 -0
- package/dist/src/hubdocs/index.js +9 -0
- package/dist/src/hubdocs/types.d.ts +114 -0
- package/dist/src/hubdocs/types.js +5 -0
- package/dist/src/infrastructure/DependencyContainer.d.ts +142 -0
- package/dist/src/infrastructure/DependencyContainer.js +250 -0
- package/dist/src/infrastructure/adapters/AppiumAdapter.d.ts +168 -0
- package/dist/src/infrastructure/adapters/AppiumAdapter.js +468 -0
- package/dist/src/infrastructure/adapters/OracleAdapter.d.ts +150 -0
- package/dist/src/infrastructure/adapters/OracleAdapter.js +388 -0
- package/dist/src/infrastructure/adapters/PlaywrightAdapter.d.ts +192 -0
- package/dist/src/infrastructure/adapters/PlaywrightAdapter.js +382 -0
- package/dist/src/infrastructure/adapters/SSHAdapter.d.ts +141 -0
- package/dist/src/infrastructure/adapters/SSHAdapter.js +428 -0
- package/dist/src/interfaces.d.ts +501 -0
- package/dist/src/interfaces.js +25 -0
- package/dist/src/internal/fakes/__fake-actions__.d.ts +17 -0
- package/dist/src/internal/fakes/__fake-actions__.js +21 -0
- package/dist/src/internal/fakes/__forbidden__.d.ts +10 -0
- package/dist/src/internal/fakes/__forbidden__.js +18 -0
- package/dist/src/internal/fakes/__honeypot__.d.ts +15 -0
- package/dist/src/internal/fakes/__honeypot__.js +24 -0
- package/dist/src/octane/OctaneReporter.d.ts +13 -0
- package/dist/src/octane/OctaneReporter.js +61 -0
- package/dist/src/playwright/CryptoActions.d.ts +20 -0
- package/dist/src/playwright/CryptoActions.js +75 -0
- package/dist/src/playwright/EnhancedWebActions.d.ts +7 -0
- package/dist/src/playwright/EnhancedWebActions.js +65 -0
- package/dist/src/playwright/WebActions.d.ts +1599 -0
- package/dist/src/playwright/WebActions.js +11788 -0
- package/dist/src/playwright/actions/ActionTimeline.d.ts +36 -0
- package/dist/src/playwright/actions/ActionTimeline.js +101 -0
- package/dist/src/playwright/actions/RecoveryQueue.d.ts +82 -0
- package/dist/src/playwright/actions/RecoveryQueue.js +130 -0
- package/dist/src/playwright/actions/SelectorCache.d.ts +53 -0
- package/dist/src/playwright/actions/SelectorCache.js +96 -0
- package/dist/src/playwright/actions/index.d.ts +13 -0
- package/dist/src/playwright/actions/index.js +14 -0
- package/dist/src/playwright/actions/types.d.ts +147 -0
- package/dist/src/playwright/actions/types.js +5 -0
- package/dist/src/playwright/fixtures.d.ts +112 -0
- package/dist/src/playwright/fixtures.js +718 -0
- package/dist/src/playwright/network-logs-reporter.d.ts +7 -0
- package/dist/src/playwright/network-logs-reporter.js +66 -0
- package/dist/src/playwright/registerRecoveryWrappers.d.ts +1 -0
- package/dist/src/playwright/registerRecoveryWrappers.js +54 -0
- package/dist/src/security/BuildSecurity.d.ts +12 -0
- package/dist/src/security/BuildSecurity.js +138 -0
- package/dist/src/security/EulaProtection.d.ts +70 -0
- package/dist/src/security/EulaProtection.js +155 -0
- package/dist/src/security/HoneypotManager.d.ts +46 -0
- package/dist/src/security/HoneypotManager.js +234 -0
- package/dist/src/security/KeysManager.d.ts +36 -0
- package/dist/src/security/KeysManager.js +158 -0
- package/dist/src/security/ProofOfWorkIntegration.d.ts +64 -0
- package/dist/src/security/ProofOfWorkIntegration.js +206 -0
- package/dist/src/security/SecurityValidation.d.ts +21 -0
- package/dist/src/security/SecurityValidation.js +163 -0
- package/dist/src/security/SourceMapProtection.d.ts +55 -0
- package/dist/src/security/SourceMapProtection.js +220 -0
- package/dist/src/security/protector.d.ts +1 -0
- package/dist/src/security/protector.js +97 -0
- package/dist/src/ssh/SSHActions.d.ts +262 -0
- package/dist/src/ssh/SSHActions.js +790 -0
- package/dist/src/ssh/SSHClient.d.ts +99 -0
- package/dist/src/ssh/SSHClient.js +409 -0
- package/dist/src/statements/BaseStatement.d.ts +38 -0
- package/dist/src/statements/BaseStatement.js +78 -0
- package/dist/src/testContext/AuthStateManager.d.ts +93 -0
- package/dist/src/testContext/AuthStateManager.js +256 -0
- package/dist/src/testContext/CoverageManager.d.ts +198 -0
- package/dist/src/testContext/CoverageManager.js +917 -0
- package/dist/src/testContext/TestAnnotations.d.ts +476 -0
- package/dist/src/testContext/TestAnnotations.js +2647 -0
- package/dist/src/testContext/TestContext.d.ts +138 -0
- package/dist/src/testContext/TestContext.js +369 -0
- package/dist/src/testContext/UnifiedHtmlGenerator.d.ts +7 -0
- package/dist/src/testContext/UnifiedHtmlGenerator.js +264 -0
- package/dist/src/testContext/UnifiedReportManager.d.ts +211 -0
- package/dist/src/testContext/UnifiedReportManager.js +1206 -0
- package/dist/src/testhub/DynamicConfigManager.d.ts +121 -0
- package/dist/src/testhub/DynamicConfigManager.js +320 -0
- package/dist/src/testhub/SystemsManager.d.ts +119 -0
- package/dist/src/testhub/SystemsManager.js +365 -0
- package/dist/src/testhub/TestHubClient.d.ts +335 -0
- package/dist/src/testhub/TestHubClient.js +1215 -0
- package/dist/src/testhub/TestHubReporter.d.ts +62 -0
- package/dist/src/testhub/TestHubReporter.js +576 -0
- package/dist/src/testhub/TestHubVars.d.ts +116 -0
- package/dist/src/testhub/TestHubVars.js +273 -0
- package/dist/src/utils/ActionInterceptor.d.ts +59 -0
- package/dist/src/utils/ActionInterceptor.js +741 -0
- package/dist/src/utils/ArtifactsCompressor.d.ts +43 -0
- package/dist/src/utils/ArtifactsCompressor.js +181 -0
- package/dist/src/utils/AutoLogsFinal.d.ts +47 -0
- package/dist/src/utils/AutoLogsFinal.js +148 -0
- package/dist/src/utils/CodeGenSession.d.ts +114 -0
- package/dist/src/utils/CodeGenSession.js +264 -0
- package/dist/src/utils/ConfigLogger.d.ts +133 -0
- package/dist/src/utils/ConfigLogger.js +611 -0
- package/dist/src/utils/CustomReporter.d.ts +22 -0
- package/dist/src/utils/CustomReporter.js +352 -0
- package/dist/src/utils/DataStore.d.ts +171 -0
- package/dist/src/utils/DataStore.js +484 -0
- package/dist/src/utils/DatabaseInterceptor.d.ts +19 -0
- package/dist/src/utils/DatabaseInterceptor.js +295 -0
- package/dist/src/utils/DateHelper.d.ts +16 -0
- package/dist/src/utils/DateHelper.js +120 -0
- package/dist/src/utils/DateValidator.d.ts +4 -0
- package/dist/src/utils/DateValidator.js +51 -0
- package/dist/src/utils/DocumentGenerator.d.ts +35 -0
- package/dist/src/utils/DocumentGenerator.js +129 -0
- package/dist/src/utils/EvidenceCapture.d.ts +90 -0
- package/dist/src/utils/EvidenceCapture.js +600 -0
- package/dist/src/utils/EvidenceReportGenerator.d.ts +70 -0
- package/dist/src/utils/EvidenceReportGenerator.js +799 -0
- package/dist/src/utils/FrameManagementUtil.d.ts +42 -0
- package/dist/src/utils/FrameManagementUtil.js +75 -0
- package/dist/src/utils/GlobalStatementsInterceptor.d.ts +1 -0
- package/dist/src/utils/GlobalStatementsInterceptor.js +1 -0
- package/dist/src/utils/HTMLTemplate.d.ts +1 -0
- package/dist/src/utils/HTMLTemplate.js +1034 -0
- package/dist/src/utils/InterceptacaoMagica.d.ts +23 -0
- package/dist/src/utils/InterceptacaoMagica.js +365 -0
- package/dist/src/utils/LogSanitizer.d.ts +35 -0
- package/dist/src/utils/LogSanitizer.js +110 -0
- package/dist/src/utils/Logger.d.ts +65 -0
- package/dist/src/utils/Logger.js +284 -0
- package/dist/src/utils/McpLocalClient.d.ts +141 -0
- package/dist/src/utils/McpLocalClient.js +871 -0
- package/dist/src/utils/PDFEvidenceGenerator.d.ts +20 -0
- package/dist/src/utils/PDFEvidenceGenerator.js +156 -0
- package/dist/src/utils/SpecFileAnalyzer.d.ts +35 -0
- package/dist/src/utils/SpecFileAnalyzer.js +209 -0
- package/dist/src/utils/StatementInterceptor.d.ts +18 -0
- package/dist/src/utils/StatementInterceptor.js +87 -0
- package/dist/src/utils/StatementLogger.d.ts +33 -0
- package/dist/src/utils/StatementLogger.js +113 -0
- package/dist/src/utils/StatementsInterceptor.d.ts +1 -0
- package/dist/src/utils/StatementsInterceptor.js +1 -0
- package/dist/src/utils/TeamsFlushHook.d.ts +17 -0
- package/dist/src/utils/TeamsFlushHook.js +168 -0
- package/dist/src/utils/TerminalLogCapture.d.ts +158 -0
- package/dist/src/utils/TerminalLogCapture.js +531 -0
- package/dist/src/utils/TestMethodLogger.d.ts +70 -0
- package/dist/src/utils/TestMethodLogger.js +95 -0
- package/dist/src/utils/UnifiedTeardown.d.ts +4 -0
- package/dist/src/utils/UnifiedTeardown.js +400 -0
- package/dist/src/utils/XPathCatalog.d.ts +152 -0
- package/dist/src/utils/XPathCatalog.js +350 -0
- package/dist/src/utils/generators.d.ts +90 -0
- package/dist/src/utils/generators.js +167 -0
- package/dist/src/utils/testRecovery/ResilientPlaywright.d.ts +152 -0
- package/dist/src/utils/testRecovery/ResilientPlaywright.js +715 -0
- package/dist/src/utils/testRecovery/TestRecoveryClient.d.ts +801 -0
- package/dist/src/utils/testRecovery/TestRecoveryClient.js +1415 -0
- package/dist/src/utils/testRecovery/autoFixCode.d.ts +65 -0
- package/dist/src/utils/testRecovery/autoFixCode.js +32 -0
- package/dist/vitest.config.d.ts +2 -0
- package/dist/vitest.config.js +59 -0
- package/dist/wdio.conf.d.ts +1 -0
- package/dist/wdio.conf.js +420 -0
- package/package.json +137 -0
- package/protect-loader.mjs +643 -0
- package/scripts/consumer-postinstall.ts +975 -0
- package/scripts/generate-index.ts +343 -0
- package/scripts/init-api.ts +613 -0
- package/scripts/init-banco.ts +437 -0
- package/scripts/init-frontend.ts +727 -0
- package/scripts/init-mobile.ts +558 -0
- package/scripts/init-scenarios.ts +925 -0
- package/scripts/init-ssh.ts +734 -0
- package/scripts/package-versions.ts +978 -0
- package/scripts/postinstall.ts +605 -0
- package/scripts/smart-override.ts +1675 -0
- package/scripts/sync-configs.ts +302 -0
- package/scripts/ultracite-setup.ts +370 -0
- package/src/types/globals.d.ts +48 -0
- package/tsconfig.json +29 -0
- package/types/autocore-sync-signal.d.ts +10 -0
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import '../hubdocs/StatementTracker.js';
|
|
2
|
+
/**
|
|
3
|
+
* Enum para direções de swipe
|
|
4
|
+
*/
|
|
5
|
+
export declare enum Direcao {
|
|
6
|
+
CIMA = "CIMA",
|
|
7
|
+
BAIXO = "BAIXO",
|
|
8
|
+
ESQUERDA = "ESQUERDA",
|
|
9
|
+
DIREITA = "DIREITA"
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Interface para coordenadas de ponto na tela
|
|
13
|
+
*/
|
|
14
|
+
export interface Point {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Classe utilitária para interações com aplicativos mobile via Appium
|
|
20
|
+
* Fornece métodos para manipulação de elementos, gestos e validações
|
|
21
|
+
* Baseada nos padrões Actions do framework mobile
|
|
22
|
+
*/
|
|
23
|
+
export declare class MobileActions {
|
|
24
|
+
/**
|
|
25
|
+
* 🧹 Limpa pasta de screenshots mobile no início da execução
|
|
26
|
+
*/
|
|
27
|
+
static cleanMobileScreenshots(): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* 🚫 ULTRA-RADICAL SSL KILLER: Initialize before any mobile operation
|
|
30
|
+
*/
|
|
31
|
+
private static initializeSSLKillerForMobile;
|
|
32
|
+
/**
|
|
33
|
+
* ✅ NOVO: Detecta o tipo do seletor mobile
|
|
34
|
+
* @private
|
|
35
|
+
* @param {string} selector Seletor a analisar
|
|
36
|
+
* @returns {string} Tipo do seletor
|
|
37
|
+
*/
|
|
38
|
+
private static detectMobileSelectorType;
|
|
39
|
+
/**
|
|
40
|
+
* ✅ NOVO: Função auxiliar para criar objeto de ação mobile para o AutoDocs
|
|
41
|
+
* @private
|
|
42
|
+
* @param {string} action Nome da ação
|
|
43
|
+
* @param {string} selector Seletor do elemento
|
|
44
|
+
* @param {string} description Descrição da ação
|
|
45
|
+
* @param {any} [value] Valor da ação (opcional)
|
|
46
|
+
* @param {boolean} [captureScreenshot] Se deve capturar screenshot
|
|
47
|
+
* @returns {object} Objeto de ação mobile
|
|
48
|
+
*/
|
|
49
|
+
private static createMobileAction;
|
|
50
|
+
/**
|
|
51
|
+
* ✅ HELPER: Garante que o driver existe e não é null
|
|
52
|
+
* @private
|
|
53
|
+
*/
|
|
54
|
+
private static ensureDriverExists;
|
|
55
|
+
/**
|
|
56
|
+
* Executa um método específico no contexto mobile com logs unificados.
|
|
57
|
+
* @param nomeMetodo Nome do método para identificação nos logs.
|
|
58
|
+
* @param executarAcao Função que executa a ação específica.
|
|
59
|
+
* @returns Resultado da execução da ação.
|
|
60
|
+
* @private
|
|
61
|
+
*/
|
|
62
|
+
private static executarComLog;
|
|
63
|
+
/**
|
|
64
|
+
* Garante que a limpeza automática está configurada para o teste mobile.
|
|
65
|
+
* @private
|
|
66
|
+
*/
|
|
67
|
+
private static ensureAutoCleanupConfigured;
|
|
68
|
+
/**
|
|
69
|
+
* Realiza clique inteligente em elemento mobile, com fallback para coordenadas.
|
|
70
|
+
* @param seletor Seletor do elemento.
|
|
71
|
+
* @param descriptionToAction Descrição da ação.
|
|
72
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
73
|
+
* @param timeout Tempo máximo de espera em ms.
|
|
74
|
+
*/
|
|
75
|
+
static click(seletor: string, descriptionToAction: string, getSnapshot?: boolean, // 🔧 MUDANÇA: Agora captura screenshot por padrão
|
|
76
|
+
timeout?: number): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Realiza clique robusto em elemento mobile, com múltiplas tentativas.
|
|
79
|
+
* @param seletor Seletor do elemento.
|
|
80
|
+
* @param descriptionToAction Descrição da ação.
|
|
81
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
82
|
+
* @param timeout Tempo máximo de espera em ms.
|
|
83
|
+
* @param retry Número de tentativas.
|
|
84
|
+
*/
|
|
85
|
+
static clickNative(seletor: string, descriptionToAction: string, getSnapshot?: boolean, timeout?: number, retry?: number): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Realiza clique por coordenadas no centro do elemento.
|
|
88
|
+
* @param seletor Seletor do elemento.
|
|
89
|
+
* @param descriptionToAction Descrição da ação.
|
|
90
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
91
|
+
* @param timeout Tempo máximo de espera em ms.
|
|
92
|
+
*/
|
|
93
|
+
static clickByCoordinates(seletor: string, descriptionToAction: string, getSnapshot?: boolean, timeout?: number): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Realiza um clique em uma coordenada específica na tela.
|
|
96
|
+
* @param point Coordenada {x, y}.
|
|
97
|
+
* @param descriptionToAction Descrição da ação.
|
|
98
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
99
|
+
*/
|
|
100
|
+
static clickPoint(point: Point, descriptionToAction: string, getSnapshot?: boolean): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Valida se um elemento está presente na tela.
|
|
103
|
+
* @param seletor Seletor do elemento.
|
|
104
|
+
* @param descriptionToAction Descrição da ação.
|
|
105
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
106
|
+
* @param timeout Tempo máximo de espera em ms.
|
|
107
|
+
* @returns True se o elemento está presente.
|
|
108
|
+
*/
|
|
109
|
+
static validateObject(seletor: string, descriptionToAction: string, getSnapshot?: boolean, timeout?: number): Promise<boolean>;
|
|
110
|
+
/**
|
|
111
|
+
* Valida que um elemento não está presente na tela.
|
|
112
|
+
* @param seletor Seletor do elemento.
|
|
113
|
+
* @param descriptionToAction Descrição da ação.
|
|
114
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
115
|
+
* @param timeout Tempo máximo de espera em ms.
|
|
116
|
+
* @returns True se o elemento não está presente.
|
|
117
|
+
*/
|
|
118
|
+
static validateObjectNotExist(seletor: string, descriptionToAction: string, getSnapshot?: boolean, timeout?: number): Promise<boolean>;
|
|
119
|
+
/**
|
|
120
|
+
* Define um texto em um campo de entrada.
|
|
121
|
+
* @param seletor Seletor do campo.
|
|
122
|
+
* @param text Texto a ser inserido.
|
|
123
|
+
* @param descriptionToAction Descrição da ação.
|
|
124
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
125
|
+
* @param timeout Tempo máximo de espera em ms.
|
|
126
|
+
*/
|
|
127
|
+
static setText(seletor: string, text: string, descriptionToAction: string, getSnapshot?: boolean, timeout?: number): Promise<void>;
|
|
128
|
+
/**
|
|
129
|
+
* Envia caracteres individualmente para um elemento.
|
|
130
|
+
* @param seletor Seletor do campo.
|
|
131
|
+
* @param text Texto a ser inserido.
|
|
132
|
+
* @param descriptionToAction Descrição da ação.
|
|
133
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
134
|
+
* @param timeout Tempo máximo de espera em ms.
|
|
135
|
+
* @param delayBetweenChars Delay entre caracteres em ms.
|
|
136
|
+
*/
|
|
137
|
+
static setChar(seletor: string, text: string, descriptionToAction: string, getSnapshot?: boolean, timeout?: number, delayBetweenChars?: number): Promise<void>;
|
|
138
|
+
/**
|
|
139
|
+
* Obtém o texto presente em um elemento.
|
|
140
|
+
* @param seletor Seletor do elemento.
|
|
141
|
+
* @param descriptionToAction Descrição da ação.
|
|
142
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
143
|
+
* @param timeout Tempo máximo de espera em ms.
|
|
144
|
+
* @returns Texto do elemento.
|
|
145
|
+
*/
|
|
146
|
+
static getText(seletor: string, descriptionToAction: string, getSnapshot?: boolean, timeout?: number): Promise<string>;
|
|
147
|
+
/**
|
|
148
|
+
* Alterna o contexto da aplicação (ex: Nativo/Webview).
|
|
149
|
+
* @param contextName Nome do contexto.
|
|
150
|
+
* @param descriptionToAction Descrição da ação.
|
|
151
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
152
|
+
*/
|
|
153
|
+
static switchToContext(contextName: string, descriptionToAction: string, getSnapshot?: boolean): Promise<void>;
|
|
154
|
+
/**
|
|
155
|
+
* Verifica se um elemento está presente na tela.
|
|
156
|
+
* @param seletor Seletor do elemento.
|
|
157
|
+
* @param timeout Tempo máximo de espera em ms.
|
|
158
|
+
* @returns True se o elemento está presente.
|
|
159
|
+
*/
|
|
160
|
+
static isPresent(seletor: string, timeout?: number): Promise<boolean>;
|
|
161
|
+
/**
|
|
162
|
+
* Realiza a ação de voltar na navegação.
|
|
163
|
+
* @param descriptionToAction Descrição da ação.
|
|
164
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
165
|
+
*/
|
|
166
|
+
static back(descriptionToAction: string, getSnapshot?: boolean): Promise<void>;
|
|
167
|
+
/**
|
|
168
|
+
* Realiza um gesto de swipe na tela.
|
|
169
|
+
* @param xInit Coordenada X inicial.
|
|
170
|
+
* @param yInit Coordenada Y inicial.
|
|
171
|
+
* @param xFinal Coordenada X final.
|
|
172
|
+
* @param yFinal Coordenada Y final.
|
|
173
|
+
* @param descriptionToAction Descrição da ação.
|
|
174
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
175
|
+
* @param duracao Duração do swipe em ms.
|
|
176
|
+
*/
|
|
177
|
+
static swipe(xInit: number, yInit: number, xFinal: number, yFinal: number, descriptionToAction: string, getSnapshot?: boolean, duracao?: number): Promise<void>;
|
|
178
|
+
/**
|
|
179
|
+
* Executa swipes até encontrar elemento.
|
|
180
|
+
* @param xInit Coordenada X inicial.
|
|
181
|
+
* @param yInit Coordenada Y inicial.
|
|
182
|
+
* @param xFinal Coordenada X final.
|
|
183
|
+
* @param yFinal Coordenada Y final.
|
|
184
|
+
* @param seletorElementoEsperado Seletor do elemento esperado.
|
|
185
|
+
* @param descriptionToAction Descrição da ação.
|
|
186
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
187
|
+
* @param maxTentativas Número máximo de tentativas.
|
|
188
|
+
* @param duracao Duração do swipe em ms.
|
|
189
|
+
* @returns True se o elemento foi encontrado.
|
|
190
|
+
*/
|
|
191
|
+
static swipeUntilFind(xInit: number, yInit: number, xFinal: number, yFinal: number, seletorElementoEsperado: string, descriptionToAction: string, getSnapshot?: boolean, maxTentativas?: number, duracao?: number): Promise<boolean>;
|
|
192
|
+
/**
|
|
193
|
+
* Obtém valor de atributo de um elemento.
|
|
194
|
+
* @param seletor Seletor do elemento.
|
|
195
|
+
* @param attributeName Nome do atributo.
|
|
196
|
+
* @param timeout Tempo máximo de espera em ms.
|
|
197
|
+
* @returns Valor do atributo.
|
|
198
|
+
*/
|
|
199
|
+
static getAttribute(seletor: string, attributeName: string, timeout?: number): Promise<string>;
|
|
200
|
+
/**
|
|
201
|
+
* Simula cliques no teclado numérico.
|
|
202
|
+
* @param number Número a ser digitado.
|
|
203
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
204
|
+
*/
|
|
205
|
+
static clickNumberPad(number: string, getSnapshot?: boolean): Promise<void>;
|
|
206
|
+
/**
|
|
207
|
+
* Executa script personalizado no driver.
|
|
208
|
+
* @param scriptType Tipo do script.
|
|
209
|
+
* @param jsonParams Parâmetros do script.
|
|
210
|
+
* @param descriptionToAction Descrição da ação.
|
|
211
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
212
|
+
* @returns Resultado do script.
|
|
213
|
+
*/
|
|
214
|
+
static executeScript(scriptType: string, jsonParams: Record<string, any>, descriptionToAction: string, getSnapshot?: boolean): Promise<any>;
|
|
215
|
+
/**
|
|
216
|
+
* Executa swipe genérico Android.
|
|
217
|
+
* @param direcao Direção do swipe.
|
|
218
|
+
* @param descriptionToAction Descrição da ação.
|
|
219
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
220
|
+
* @param distancia Distância do swipe (0 a 1).
|
|
221
|
+
*/
|
|
222
|
+
static genericSwipeAndroid(direcao: Direcao, descriptionToAction: string, getSnapshot?: boolean, distancia?: number): Promise<void>;
|
|
223
|
+
/**
|
|
224
|
+
* Executa swipe genérico iOS.
|
|
225
|
+
* @param direcao Direção do swipe.
|
|
226
|
+
* @param descriptionToAction Descrição da ação.
|
|
227
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
228
|
+
* @param distancia Distância do swipe (0 a 1).
|
|
229
|
+
*/
|
|
230
|
+
static genericSwipeIOS(direcao: Direcao, descriptionToAction: string, getSnapshot?: boolean, distancia?: number): Promise<void>;
|
|
231
|
+
/**
|
|
232
|
+
* Executa swipe genérico Android até encontrar elemento.
|
|
233
|
+
* @param direcao Direção do swipe.
|
|
234
|
+
* @param seletorElementoEsperado Seletor do elemento esperado.
|
|
235
|
+
* @param descriptionToAction Descrição da ação.
|
|
236
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
237
|
+
* @param maxTentativas Número máximo de tentativas.
|
|
238
|
+
* @param distancia Distância do swipe (0 a 1).
|
|
239
|
+
* @returns True se o elemento foi encontrado.
|
|
240
|
+
*/
|
|
241
|
+
static genericSwipeUntilFindAndroid(direcao: Direcao, seletorElementoEsperado: string, descriptionToAction: string, getSnapshot?: boolean, maxTentativas?: number, distancia?: number): Promise<boolean>;
|
|
242
|
+
/**
|
|
243
|
+
* Executa swipe genérico iOS até encontrar elemento.
|
|
244
|
+
* @param direcao Direção do swipe.
|
|
245
|
+
* @param seletorElementoEsperado Seletor do elemento esperado.
|
|
246
|
+
* @param descriptionToAction Descrição da ação.
|
|
247
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
248
|
+
* @param maxTentativas Número máximo de tentativas.
|
|
249
|
+
* @param distancia Distância do swipe (0 a 1).
|
|
250
|
+
* @returns True se o elemento foi encontrado.
|
|
251
|
+
*/
|
|
252
|
+
static genericSwipeUntilFindIOS(direcao: Direcao, seletorElementoEsperado: string, descriptionToAction: string, getSnapshot?: boolean, maxTentativas?: number, distancia?: number): Promise<boolean>;
|
|
253
|
+
/**
|
|
254
|
+
* Realiza clique em elemento com verificação de presença.
|
|
255
|
+
* @param seletor Seletor do elemento.
|
|
256
|
+
* @param descriptionToAction Descrição da ação.
|
|
257
|
+
* @param getSnapshot Se deve capturar screenshot.
|
|
258
|
+
* @param timeout Tempo máximo de espera em ms.
|
|
259
|
+
*/
|
|
260
|
+
static clickOnObjectPresence(seletor: string, descriptionToAction: string, getSnapshot?: boolean, timeout?: number): Promise<void>;
|
|
261
|
+
/**
|
|
262
|
+
* Copia texto para o clipboard (Android/iOS).
|
|
263
|
+
* @param text Texto a ser copiado.
|
|
264
|
+
* @param descriptionToAction Descrição da ação.
|
|
265
|
+
*/
|
|
266
|
+
static setClipboardText(text: string, descriptionToAction?: string): Promise<void>;
|
|
267
|
+
/**
|
|
268
|
+
* Obtém texto do clipboard (Android/iOS).
|
|
269
|
+
* @param descriptionToAction Descrição da ação.
|
|
270
|
+
* @returns Texto do clipboard.
|
|
271
|
+
*/
|
|
272
|
+
static getClipboardText(descriptionToAction?: string): Promise<string>;
|
|
273
|
+
/**
|
|
274
|
+
* Executa comando shell (Android).
|
|
275
|
+
* @param command Comando shell.
|
|
276
|
+
* @param args Argumentos do comando.
|
|
277
|
+
* @param descriptionToAction Descrição da ação.
|
|
278
|
+
* @returns Resultado do comando.
|
|
279
|
+
*/
|
|
280
|
+
static executeShellCommand(command: string, args?: string[], descriptionToAction?: string): Promise<any>;
|
|
281
|
+
/**
|
|
282
|
+
* Fecha o app e relança (forceAppLaunch).
|
|
283
|
+
* @param descriptionToAction Descrição da ação.
|
|
284
|
+
*/
|
|
285
|
+
static relaunchApp(descriptionToAction?: string): Promise<void>;
|
|
286
|
+
/**
|
|
287
|
+
* ✅ MELHORADO: Captura screenshot robusto com múltiplas tentativas
|
|
288
|
+
* @param nome Nome do screenshot
|
|
289
|
+
* @returns Buffer da imagem ou null
|
|
290
|
+
*/
|
|
291
|
+
static capturarScreenshot(nome: string): Promise<Buffer | null>;
|
|
292
|
+
/**
|
|
293
|
+
* Salva screenshot como arquivo local e integra com DeviceFarmViewer
|
|
294
|
+
*/
|
|
295
|
+
private static saveScreenshotFile;
|
|
296
|
+
/**
|
|
297
|
+
* Anexa screenshot ao relatório Playwright
|
|
298
|
+
*/
|
|
299
|
+
private static attachScreenshotToReport;
|
|
300
|
+
/**
|
|
301
|
+
* Registra screenshot no sistema unificado
|
|
302
|
+
*/
|
|
303
|
+
private static logScreenshotToUnified;
|
|
304
|
+
/**
|
|
305
|
+
* ✅ MELHORADO: Captura screenshot forçado com verificação DeviceFarm
|
|
306
|
+
* @param nome Nome do screenshot
|
|
307
|
+
* @returns Promise<boolean> True se conseguiu capturar
|
|
308
|
+
*/
|
|
309
|
+
static capturarScreenshotForcado(nome: string): Promise<boolean>;
|
|
310
|
+
/**
|
|
311
|
+
* Valida se dois valores são iguais.
|
|
312
|
+
* @param atual Valor atual.
|
|
313
|
+
* @param esperado Valor esperado.
|
|
314
|
+
* @param descricao Descrição da validação.
|
|
315
|
+
*/
|
|
316
|
+
static validateEquals(atual: any, esperado: any, descricao: string): Promise<void>;
|
|
317
|
+
/**
|
|
318
|
+
* 🎯 SELETOR PARA O ELEMENTO Wi-Fi (iOS DeviceFarm)
|
|
319
|
+
* Baseado nas propriedades: type=XCUIElementTypeCell, name=Wi‑Fi, value=VivoQA_5G
|
|
320
|
+
*/
|
|
321
|
+
static getWiFiSettingSelector(): string;
|
|
322
|
+
/**
|
|
323
|
+
* 🎯 SELETORES ALTERNATIVOS para fallback (iOS)
|
|
324
|
+
*/
|
|
325
|
+
static getWiFiFallbackSelectors(): string[];
|
|
326
|
+
/**
|
|
327
|
+
* 🔍 CLIQUE INTELIGENTE no elemento Wi-Fi com múltiplas estratégias (iOS)
|
|
328
|
+
*/
|
|
329
|
+
static clickWiFiSetting(descriptionToAction?: string, getSnapshot?: boolean): Promise<boolean>;
|
|
330
|
+
/**
|
|
331
|
+
* 🔍 CLIQUE POR COORDENADAS do elemento Wi-Fi (iOS)
|
|
332
|
+
* Baseado nas propriedades: x=20, y=526, width=390, height=45
|
|
333
|
+
*/
|
|
334
|
+
static clickWiFiByCoordinates(descriptionToAction?: string, getSnapshot?: boolean): Promise<boolean>;
|
|
335
|
+
/**
|
|
336
|
+
* 🔍 ESTRATÉGIA COMBINADA: Tentar seletores primeiro, depois coordenadas (iOS)
|
|
337
|
+
*/
|
|
338
|
+
static clickWiFiCombined(descriptionToAction?: string, getSnapshot?: boolean): Promise<boolean>;
|
|
339
|
+
/**
|
|
340
|
+
* 🔍 VERIFICAR se elemento Wi-Fi está presente na tela (iOS)
|
|
341
|
+
*/
|
|
342
|
+
static isWiFiSettingVisible(): Promise<boolean>;
|
|
343
|
+
/**
|
|
344
|
+
* 🔍 OBTER informações do elemento Wi-Fi (iOS)
|
|
345
|
+
*/
|
|
346
|
+
static getWiFiElementInfo(): Promise<any>;
|
|
347
|
+
}
|