@deque/axe-appium3-webdriveragent 0.0.0-stage → 1.7.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/Configurations/IOSSettings.xcconfig +31 -0
- package/Configurations/IOSTestSettings.xcconfig +1 -0
- package/Configurations/TVOSSettings.xcconfig +31 -0
- package/Configurations/TVOSTestSettings.xcconfig +1 -0
- package/LICENSE +66 -0
- package/LICENSE-3RD-PARTY.md +70 -0
- package/MySwiftFramework/JSONHelper.swift +31 -0
- package/MySwiftFramework/MySwiftFramework.h +18 -0
- package/PrivateHeaders/AccessibilityUtilities/AXSettings.h +15 -0
- package/PrivateHeaders/MobileCoreServices/LSApplicationWorkspace.h +127 -0
- package/PrivateHeaders/TextInput/TIPreferencesController.h +45 -0
- package/PrivateHeaders/UIKitCore/UIKeyboardImpl.h +27 -0
- package/PrivateHeaders/XCTest/CDStructures.h +7 -0
- package/PrivateHeaders/XCTest/NSFastEnumeration-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCAXClient_iOS.h +91 -0
- package/PrivateHeaders/XCTest/XCApplicationQuery.h +30 -0
- package/PrivateHeaders/XCTest/XCDebugLogDelegate-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCPointerEvent.h +63 -0
- package/PrivateHeaders/XCTest/XCPointerEventPath.h +65 -0
- package/PrivateHeaders/XCTest/XCSynthesizedEventRecord.h +55 -0
- package/PrivateHeaders/XCTest/XCTAggregateSuiteRunStatistics.h +38 -0
- package/PrivateHeaders/XCTest/XCTAttachmentManager.h +33 -0
- package/PrivateHeaders/XCTest/XCTCapabilities.h +35 -0
- package/PrivateHeaders/XCTest/XCTCapabilitiesProviding-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCTElementSetTransformer-Protocol.h +35 -0
- package/PrivateHeaders/XCTest/XCTElementSnapshotAttributeDataSource-Protocol.h +33 -0
- package/PrivateHeaders/XCTest/XCTElementSnapshotProvider-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCTExpectedFailureContextManager.h +35 -0
- package/PrivateHeaders/XCTest/XCTFuture.h +45 -0
- package/PrivateHeaders/XCTest/XCTHarnessEventReporting-Protocol.h +29 -0
- package/PrivateHeaders/XCTest/XCTIssue.h +49 -0
- package/PrivateHeaders/XCTest/XCTIssueHandling-Protocol.h +26 -0
- package/PrivateHeaders/XCTest/XCTMacCatalystStatusProviding-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCTMeasureOptions.h +48 -0
- package/PrivateHeaders/XCTest/XCTMemoryChecker.h +50 -0
- package/PrivateHeaders/XCTest/XCTMemoryCheckerDelegate-Protocol.h +26 -0
- package/PrivateHeaders/XCTest/XCTMessagingChannel_IDEToRunner-Protocol.h +27 -0
- package/PrivateHeaders/XCTest/XCTMessagingChannel_RunnerToDaemon-Protocol.h +39 -0
- package/PrivateHeaders/XCTest/XCTMessagingChannel_RunnerToIDE-Protocol.h +32 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_ActivityReporting-Protocol.h +24 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_AttachmentFutureResultStatusUpdating-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_BundleRequesting-Protocol.h +24 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_CapabilityExchange-Protocol.h +56 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_DebugLogging-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_EventSynthesis-Protocol.h +34 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_ForcePressureSupportQuerying-Protocol.h +25 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_HIDEventRecording-Protocol.h +25 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_MemoryTesting-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_PerformanceMeasurementReporting-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_ProcessMonitoring-Protocol.h +25 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_ProtectedResourceAuthorization-Protocol.h +22 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_ScreenRecording-Protocol.h +24 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_SelfDiagnosisIssueReporting-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_SignpostRequesting-Protocol.h +24 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_SiriAutomation-Protocol.h +27 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_SystemConfiguration-Protocol.h +27 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_TelemetrySending-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_TestExecution-Protocol.h +28 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_TestReporting-Protocol.h +40 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_UIAutomation-Protocol.h +29 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_UIAutomationRunnerEventReporting-Protocol.h +27 -0
- package/PrivateHeaders/XCTest/XCTMessagingRole_UserPresence-Protocol.h +24 -0
- package/PrivateHeaders/XCTest/XCTMetricDiagnosticHelper.h +49 -0
- package/PrivateHeaders/XCTest/XCTNSPredicateExpectationObject-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCTPromise.h +30 -0
- package/PrivateHeaders/XCTest/XCTRemoteSignpostListenerProxy-Protocol.h +29 -0
- package/PrivateHeaders/XCTest/XCTRepetitionPolicy.h +43 -0
- package/PrivateHeaders/XCTest/XCTReportingSession.h +50 -0
- package/PrivateHeaders/XCTest/XCTReportingSessionConfiguration-Protocol.h +27 -0
- package/PrivateHeaders/XCTest/XCTReportingSessionIssueReporter-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCTReportingSessionTestContainer-Protocol.h +26 -0
- package/PrivateHeaders/XCTest/XCTReportingSessionTestReporter.h +51 -0
- package/PrivateHeaders/XCTest/XCTRunnerAutomationSession-Protocol.h +38 -0
- package/PrivateHeaders/XCTest/XCTRunnerDaemonSession.h +96 -0
- package/PrivateHeaders/XCTest/XCTRunnerDaemonSessionUIAutomationDelegate-Protocol.h +33 -0
- package/PrivateHeaders/XCTest/XCTRunnerIDESession.h +99 -0
- package/PrivateHeaders/XCTest/XCTRunnerIDESessionDelegate-Protocol.h +24 -0
- package/PrivateHeaders/XCTest/XCTRuntimeDiagnosticsPolicy.h +36 -0
- package/PrivateHeaders/XCTest/XCTRuntimeIssueDetectionPolicy.h +39 -0
- package/PrivateHeaders/XCTest/XCTScreenCapturePolicy.h +35 -0
- package/PrivateHeaders/XCTest/XCTSignpostListener-Protocol.h +25 -0
- package/PrivateHeaders/XCTest/XCTSkippedTestContext.h +37 -0
- package/PrivateHeaders/XCTest/XCTSourceCodeContext.h +39 -0
- package/PrivateHeaders/XCTest/XCTSourceCodeLocation.h +31 -0
- package/PrivateHeaders/XCTest/XCTTagSelection.h +41 -0
- package/PrivateHeaders/XCTest/XCTTestIdentifier.h +81 -0
- package/PrivateHeaders/XCTest/XCTTestIdentifierSet.h +54 -0
- package/PrivateHeaders/XCTest/XCTTestSelection.h +35 -0
- package/PrivateHeaders/XCTest/XCTWaiter.h +54 -0
- package/PrivateHeaders/XCTest/XCTWaiterManagement-Protocol.h +24 -0
- package/PrivateHeaders/XCTest/XCTWaiterManager-Protocol.h +25 -0
- package/PrivateHeaders/XCTest/XCTWaiterWait.h +40 -0
- package/PrivateHeaders/XCTest/XCTest.h +53 -0
- package/PrivateHeaders/XCTest/XCTestCase.h +180 -0
- package/PrivateHeaders/XCTest/XCTestCaseDiscoveryUIAutomationDelegate-Protocol.h +20 -0
- package/PrivateHeaders/XCTest/XCTestCaseRun.h +28 -0
- package/PrivateHeaders/XCTest/XCTestCaseUIAutomationDelegate-Protocol.h +25 -0
- package/PrivateHeaders/XCTest/XCTestCastMethodNamesUIAutomationDelegate-Protocol.h +24 -0
- package/PrivateHeaders/XCTest/XCTestConfiguration.h +94 -0
- package/PrivateHeaders/XCTest/XCTestDriver.h +64 -0
- package/PrivateHeaders/XCTest/XCTestExpectation.h +50 -0
- package/PrivateHeaders/XCTest/XCTestExpectationDelegate-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCTestObservationCenter.h +60 -0
- package/PrivateHeaders/XCTest/XCTestRun.h +44 -0
- package/PrivateHeaders/XCTest/XCUIAXNotificationHandling-Protocol.h +25 -0
- package/PrivateHeaders/XCTest/XCUIAccessibilityInterface-Protocol.h +58 -0
- package/PrivateHeaders/XCTest/XCUIAlertMonitoring-Protocol.h +27 -0
- package/PrivateHeaders/XCTest/XCUIApplication.h +98 -0
- package/PrivateHeaders/XCTest/XCUIApplicationAutomationSessionProviding-Protocol.h +26 -0
- package/PrivateHeaders/XCTest/XCUIApplicationImpl.h +90 -0
- package/PrivateHeaders/XCTest/XCUIApplicationImplReporter-Protocol.h +26 -0
- package/PrivateHeaders/XCTest/XCUIApplicationManaging-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCUIApplicationMonitor-Protocol.h +43 -0
- package/PrivateHeaders/XCTest/XCUIApplicationOpenRequest.h +34 -0
- package/PrivateHeaders/XCTest/XCUIApplicationPlatformServicesProviderDelegate-Protocol.h +25 -0
- package/PrivateHeaders/XCTest/XCUIApplicationProcess.h +105 -0
- package/PrivateHeaders/XCTest/XCUIApplicationProcessDelegate-Protocol.h +25 -0
- package/PrivateHeaders/XCTest/XCUIApplicationProcessManaging-Protocol.h +26 -0
- package/PrivateHeaders/XCTest/XCUIApplicationProcessTracker-Protocol.h +28 -0
- package/PrivateHeaders/XCTest/XCUIApplicationRegistry.h +32 -0
- package/PrivateHeaders/XCTest/XCUIButtonConsole.h +26 -0
- package/PrivateHeaders/XCTest/XCUICoordinate.h +49 -0
- package/PrivateHeaders/XCTest/XCUIDevice.h +134 -0
- package/PrivateHeaders/XCTest/XCUIDeviceAutomationModeInterface-Protocol.h +25 -0
- package/PrivateHeaders/XCTest/XCUIDeviceDelayedAttachmentTransferSupportInterface-Protocol.h +22 -0
- package/PrivateHeaders/XCTest/XCUIDeviceEventAndStateInterface-Protocol.h +40 -0
- package/PrivateHeaders/XCTest/XCUIElement.h +207 -0
- package/PrivateHeaders/XCTest/XCUIElementAttributesPrivate-Protocol.h +26 -0
- package/PrivateHeaders/XCTest/XCUIElementEventTarget-Protocol.h +38 -0
- package/PrivateHeaders/XCTest/XCUIElementQuery.h +166 -0
- package/PrivateHeaders/XCTest/XCUIElementTypeQueryProvider_Private-Protocol.h +24 -0
- package/PrivateHeaders/XCTest/XCUIEventRecording-Protocol.h +37 -0
- package/PrivateHeaders/XCTest/XCUIHitPointResult.h +25 -0
- package/PrivateHeaders/XCTest/XCUIInterruptionMonitoring-Protocol.h +27 -0
- package/PrivateHeaders/XCTest/XCUIIssueDiagnosticsProviding-Protocol.h +23 -0
- package/PrivateHeaders/XCTest/XCUIKnobControl.h +26 -0
- package/PrivateHeaders/XCTest/XCUILocation.h +24 -0
- package/PrivateHeaders/XCTest/XCUIPlatformApplicationServicesProviding-Protocol.h +33 -0
- package/PrivateHeaders/XCTest/XCUIRemoteAccessibilityInterface-Protocol.h +45 -0
- package/PrivateHeaders/XCTest/XCUIRemoteDeviceRunner-Protocol.h +24 -0
- package/PrivateHeaders/XCTest/XCUIRemoteSiriInterface-Protocol.h +30 -0
- package/PrivateHeaders/XCTest/XCUIResetAuthorizationStatusOfProtectedResourcesInterface-Protocol.h +22 -0
- package/PrivateHeaders/XCTest/XCUIScreen.h +53 -0
- package/PrivateHeaders/XCTest/XCUIScreenDataSource-Protocol.h +35 -0
- package/PrivateHeaders/XCTest/XCUISiriService.h +39 -0
- package/PrivateHeaders/XCTest/XCUISystem.h +26 -0
- package/PrivateHeaders/XCTest/XCUIXcodeApplicationManaging-Protocol.h +27 -0
- package/PrivateHeaders/XCTest/_TtC10XCTestCore19XCTReportingContext.h +26 -0
- package/PrivateHeaders/XCTest/_XCTMessaging_VoidProtocol-Protocol.h +20 -0
- package/PrivateHeaders/XCTest/_XCTestObservationInternal-Protocol.h +26 -0
- package/PrivateHeaders/XCTest/_XCTestObservationPrivate-Protocol.h +27 -0
- package/README.md +57 -2
- package/Scripts/build-webdriveragent.mjs +93 -0
- package/Scripts/build.sh +137 -0
- package/Scripts/bundle-mobile-assets.sh +35 -0
- package/Scripts/embed-runner-icon.sh +118 -0
- package/Scripts/fetch-prebuilt-wda.mjs +81 -0
- package/Scripts/update-wda-version.mjs +44 -0
- package/WebDriverAgent.xcodeproj/project.pbxproj +8522 -0
- package/WebDriverAgent.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +5 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationApp.xcscheme +87 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationApp_tvOS.xcscheme +78 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationApp_watchOS.xcscheme +78 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationTests_1.xcscheme +93 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationTests_2.xcscheme +93 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationTests_3.xcscheme +93 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationTests_tvOS.xcscheme +93 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationTests_watchOS.xcscheme +93 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentLib.xcscheme +125 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentLib_tvOS.xcscheme +95 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentLib_watchOS.xcscheme +85 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentRunner-nodebug.xcscheme +87 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentRunner.xcscheme +132 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentRunner_noauth.xcscheme +70 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentRunner_tvOS.xcscheme +123 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentRunner_watchOS.xcscheme +128 -0
- package/WebDriverAgentLib/Categories/FBXCElementSnapshotWrapper+Helpers.h +100 -0
- package/WebDriverAgentLib/Categories/FBXCElementSnapshotWrapper+Helpers.m +192 -0
- package/WebDriverAgentLib/Categories/NSDictionary+FBUtf8SafeDictionary.h +39 -0
- package/WebDriverAgentLib/Categories/NSDictionary+FBUtf8SafeDictionary.m +105 -0
- package/WebDriverAgentLib/Categories/NSExpression+FBFormat.h +29 -0
- package/WebDriverAgentLib/Categories/NSExpression+FBFormat.m +34 -0
- package/WebDriverAgentLib/Categories/NSString+FBVisualLength.h +18 -0
- package/WebDriverAgentLib/Categories/NSString+FBVisualLength.m +18 -0
- package/WebDriverAgentLib/Categories/NSString+FBXMLSafeString.h +27 -0
- package/WebDriverAgentLib/Categories/NSString+FBXMLSafeString.m +30 -0
- package/WebDriverAgentLib/Categories/XCAXClient_iOS+FBSnapshotReqParams.h +26 -0
- package/WebDriverAgentLib/Categories/XCAXClient_iOS+FBSnapshotReqParams.m +181 -0
- package/WebDriverAgentLib/Categories/XCTIssue+FBPatcher.h +17 -0
- package/WebDriverAgentLib/Categories/XCTIssue+FBPatcher.m +35 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBAlert.h +47 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBAlert.m +179 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBFocused.h +23 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.h +186 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.m +674 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBQuiescence.h +24 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBQuiescence.m +28 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBTouchAction.h +82 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBTouchAction.m +198 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBUIInterruptions.h +22 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBUIInterruptions.m +31 -0
- package/WebDriverAgentLib/Categories/XCUIApplicationProcess+FBQuiescence.h +27 -0
- package/WebDriverAgentLib/Categories/XCUIApplicationProcess+FBQuiescence.m +111 -0
- package/WebDriverAgentLib/Categories/XCUIDevice+FBHealthCheck.h +30 -0
- package/WebDriverAgentLib/Categories/XCUIDevice+FBHealthCheck.m +47 -0
- package/WebDriverAgentLib/Categories/XCUIDevice+FBHelpers.h +236 -0
- package/WebDriverAgentLib/Categories/XCUIDevice+FBHelpers.m +478 -0
- package/WebDriverAgentLib/Categories/XCUIDevice+FBHinge.h +41 -0
- package/WebDriverAgentLib/Categories/XCUIDevice+FBHinge.m +215 -0
- package/WebDriverAgentLib/Categories/XCUIDevice+FBRotation.h +46 -0
- package/WebDriverAgentLib/Categories/XCUIDevice+FBRotation.m +108 -0
- package/WebDriverAgentLib/Categories/XCUIDevice+FBVoiceOver.h +66 -0
- package/WebDriverAgentLib/Categories/XCUIDevice+FBVoiceOver.m +218 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBAccessibility.h +29 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBAccessibility.m +50 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBCaching.h +19 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBCaching.m +36 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBClassChain.h +57 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBClassChain.m +239 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBCustomActions.h +27 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBCustomActions.m +127 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBFind.h +75 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBFind.m +146 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBForceTouch.h +38 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBForceTouch.m +55 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBIsVisible.h +28 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBIsVisible.m +78 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBMinMax.h +33 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBMinMax.m +75 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBPickerWheel.h +45 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBPickerWheel.m +59 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBResolve.h +37 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBResolve.m +51 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBScrolling.h +98 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBScrolling.m +465 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBSwiping.h +38 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBSwiping.m +56 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBTVFocuse.h +35 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBTVFocuse.m +71 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBTyping.h +97 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBTyping.m +233 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBUID.h +42 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBUID.m +85 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBUtilities.h +108 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBUtilities.m +175 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBVisibleFrame.h +35 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBVisibleFrame.m +61 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBWebDriverAttributes.h +32 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBWebDriverAttributes.m +299 -0
- package/WebDriverAgentLib/Categories/XCUIElementQuery+FBHelpers.h +28 -0
- package/WebDriverAgentLib/Categories/XCUIElementQuery+FBHelpers.m +47 -0
- package/WebDriverAgentLib/Commands/AxeAuthCommands.h +30 -0
- package/WebDriverAgentLib/Commands/AxeAuthCommands.m +175 -0
- package/WebDriverAgentLib/Commands/AxeAutoScanCommands.h +19 -0
- package/WebDriverAgentLib/Commands/AxeAutoScanCommands.m +143 -0
- package/WebDriverAgentLib/Commands/AxeProductDeclaration.h +21 -0
- package/WebDriverAgentLib/Commands/AxeProductDeclaration.m +40 -0
- package/WebDriverAgentLib/Commands/AxeReportCommands.h +20 -0
- package/WebDriverAgentLib/Commands/AxeReportCommands.m +62 -0
- package/WebDriverAgentLib/Commands/AxeScanCommands.h +20 -0
- package/WebDriverAgentLib/Commands/AxeScanCommands.m +386 -0
- package/WebDriverAgentLib/Commands/AxeUsageCommands.h +27 -0
- package/WebDriverAgentLib/Commands/AxeUsageCommands.m +90 -0
- package/WebDriverAgentLib/Commands/FBAlertViewCommands.h +19 -0
- package/WebDriverAgentLib/Commands/FBAlertViewCommands.m +104 -0
- package/WebDriverAgentLib/Commands/FBCustomCommands.h +19 -0
- package/WebDriverAgentLib/Commands/FBCustomCommands.m +848 -0
- package/WebDriverAgentLib/Commands/FBDebugCommands.h +19 -0
- package/WebDriverAgentLib/Commands/FBDebugCommands.m +81 -0
- package/WebDriverAgentLib/Commands/FBElementCommands.h +19 -0
- package/WebDriverAgentLib/Commands/FBElementCommands.m +775 -0
- package/WebDriverAgentLib/Commands/FBFindElementCommands.h +18 -0
- package/WebDriverAgentLib/Commands/FBFindElementCommands.m +186 -0
- package/WebDriverAgentLib/Commands/FBOrientationCommands.h +19 -0
- package/WebDriverAgentLib/Commands/FBOrientationCommands.m +192 -0
- package/WebDriverAgentLib/Commands/FBScreenshotCommands.h +19 -0
- package/WebDriverAgentLib/Commands/FBScreenshotCommands.m +40 -0
- package/WebDriverAgentLib/Commands/FBSessionCommands.h +19 -0
- package/WebDriverAgentLib/Commands/FBSessionCommands.m +519 -0
- package/WebDriverAgentLib/Commands/FBTouchActionCommands.h +19 -0
- package/WebDriverAgentLib/Commands/FBTouchActionCommands.m +41 -0
- package/WebDriverAgentLib/Commands/FBTouchIDCommands.h +19 -0
- package/WebDriverAgentLib/Commands/FBTouchIDCommands.m +30 -0
- package/WebDriverAgentLib/Commands/FBUnknownCommands.h +19 -0
- package/WebDriverAgentLib/Commands/FBUnknownCommands.m +39 -0
- package/WebDriverAgentLib/Commands/FBVideoCommands.h +19 -0
- package/WebDriverAgentLib/Commands/FBVideoCommands.m +84 -0
- package/WebDriverAgentLib/FBAlert.h +104 -0
- package/WebDriverAgentLib/FBAlert.m +454 -0
- package/WebDriverAgentLib/Info.plist +26 -0
- package/WebDriverAgentLib/Routing/FBCommandHandler.h +38 -0
- package/WebDriverAgentLib/Routing/FBCommandStatus.h +80 -0
- package/WebDriverAgentLib/Routing/FBCommandStatus.m +279 -0
- package/WebDriverAgentLib/Routing/FBElement.h +98 -0
- package/WebDriverAgentLib/Routing/FBElementCache.h +61 -0
- package/WebDriverAgentLib/Routing/FBElementCache.m +100 -0
- package/WebDriverAgentLib/Routing/FBElementUtils.h +76 -0
- package/WebDriverAgentLib/Routing/FBElementUtils.m +153 -0
- package/WebDriverAgentLib/Routing/FBExceptionHandler.h +29 -0
- package/WebDriverAgentLib/Routing/FBExceptionHandler.m +65 -0
- package/WebDriverAgentLib/Routing/FBExceptions.h +69 -0
- package/WebDriverAgentLib/Routing/FBExceptions.m +27 -0
- package/WebDriverAgentLib/Routing/FBHTTPServer.h +97 -0
- package/WebDriverAgentLib/Routing/FBHTTPServer.m +955 -0
- package/WebDriverAgentLib/Routing/FBHTTPStatusCodes.h +581 -0
- package/WebDriverAgentLib/Routing/FBResponseJSONPayload.h +29 -0
- package/WebDriverAgentLib/Routing/FBResponseJSONPayload.m +58 -0
- package/WebDriverAgentLib/Routing/FBResponsePayload.h +74 -0
- package/WebDriverAgentLib/Routing/FBResponsePayload.m +148 -0
- package/WebDriverAgentLib/Routing/FBRoute.h +86 -0
- package/WebDriverAgentLib/Routing/FBRoute.m +183 -0
- package/WebDriverAgentLib/Routing/FBRouteRequest-Private.h +20 -0
- package/WebDriverAgentLib/Routing/FBRouteRequest.h +39 -0
- package/WebDriverAgentLib/Routing/FBRouteRequest.m +32 -0
- package/WebDriverAgentLib/Routing/FBScreenRecordingContainer.h +65 -0
- package/WebDriverAgentLib/Routing/FBScreenRecordingContainer.m +88 -0
- package/WebDriverAgentLib/Routing/FBScreenRecordingPromise.h +29 -0
- package/WebDriverAgentLib/Routing/FBScreenRecordingPromise.m +31 -0
- package/WebDriverAgentLib/Routing/FBScreenRecordingRequest.h +39 -0
- package/WebDriverAgentLib/Routing/FBScreenRecordingRequest.m +99 -0
- package/WebDriverAgentLib/Routing/FBSession-Private.h +26 -0
- package/WebDriverAgentLib/Routing/FBSession.h +179 -0
- package/WebDriverAgentLib/Routing/FBSession.m +575 -0
- package/WebDriverAgentLib/Routing/FBTCPSocket.h +117 -0
- package/WebDriverAgentLib/Routing/FBTCPSocket.m +244 -0
- package/WebDriverAgentLib/Routing/FBWebServer.h +68 -0
- package/WebDriverAgentLib/Routing/FBWebServer.m +306 -0
- package/WebDriverAgentLib/Routing/FBXCAccessibilityElement.h +34 -0
- package/WebDriverAgentLib/Routing/FBXCAccessibilityElement.m +17 -0
- package/WebDriverAgentLib/Routing/FBXCDeviceEvent.h +34 -0
- package/WebDriverAgentLib/Routing/FBXCDeviceEvent.m +42 -0
- package/WebDriverAgentLib/Routing/FBXCElementSnapshot.h +82 -0
- package/WebDriverAgentLib/Routing/FBXCElementSnapshot.m +9 -0
- package/WebDriverAgentLib/Routing/FBXCElementSnapshotWrapper.h +29 -0
- package/WebDriverAgentLib/Routing/FBXCElementSnapshotWrapper.m +114 -0
- package/WebDriverAgentLib/Routing/RouteRequest.h +28 -0
- package/WebDriverAgentLib/Routing/RouteRequest.m +25 -0
- package/WebDriverAgentLib/Routing/RouteResponse.h +30 -0
- package/WebDriverAgentLib/Routing/RouteResponse.m +54 -0
- package/WebDriverAgentLib/Utilities/FBAccessibilityTraits.h +20 -0
- package/WebDriverAgentLib/Utilities/FBAccessibilityTraits.m +61 -0
- package/WebDriverAgentLib/Utilities/FBActiveAppDetectionPoint.h +56 -0
- package/WebDriverAgentLib/Utilities/FBActiveAppDetectionPoint.m +115 -0
- package/WebDriverAgentLib/Utilities/FBAlertsMonitor.h +51 -0
- package/WebDriverAgentLib/Utilities/FBAlertsMonitor.m +110 -0
- package/WebDriverAgentLib/Utilities/FBBaseActionsSynthesizer.h +132 -0
- package/WebDriverAgentLib/Utilities/FBBaseActionsSynthesizer.m +165 -0
- package/WebDriverAgentLib/Utilities/FBCapabilities.h +43 -0
- package/WebDriverAgentLib/Utilities/FBCapabilities.m +24 -0
- package/WebDriverAgentLib/Utilities/FBClassChainQueryParser.h +99 -0
- package/WebDriverAgentLib/Utilities/FBClassChainQueryParser.m +666 -0
- package/WebDriverAgentLib/Utilities/FBConfiguration.h +379 -0
- package/WebDriverAgentLib/Utilities/FBConfiguration.m +476 -0
- package/WebDriverAgentLib/Utilities/FBDebugLogDelegateDecorator.h +26 -0
- package/WebDriverAgentLib/Utilities/FBDebugLogDelegateDecorator.m +49 -0
- package/WebDriverAgentLib/Utilities/FBElementHelpers.h +29 -0
- package/WebDriverAgentLib/Utilities/FBElementHelpers.m +21 -0
- package/WebDriverAgentLib/Utilities/FBElementTypeTransformer.h +45 -0
- package/WebDriverAgentLib/Utilities/FBElementTypeTransformer.m +149 -0
- package/WebDriverAgentLib/Utilities/FBErrorBuilder.h +64 -0
- package/WebDriverAgentLib/Utilities/FBErrorBuilder.m +75 -0
- package/WebDriverAgentLib/Utilities/FBFailureProofTestCase.h +19 -0
- package/WebDriverAgentLib/Utilities/FBFailureProofTestCase.m +74 -0
- package/WebDriverAgentLib/Utilities/FBImageProcessor.h +55 -0
- package/WebDriverAgentLib/Utilities/FBImageProcessor.m +197 -0
- package/WebDriverAgentLib/Utilities/FBImageUtils.h +25 -0
- package/WebDriverAgentLib/Utilities/FBImageUtils.m +80 -0
- package/WebDriverAgentLib/Utilities/FBKeyboard.h +37 -0
- package/WebDriverAgentLib/Utilities/FBKeyboard.m +123 -0
- package/WebDriverAgentLib/Utilities/FBLogger.h +32 -0
- package/WebDriverAgentLib/Utilities/FBLogger.m +47 -0
- package/WebDriverAgentLib/Utilities/FBMacros.h +66 -0
- package/WebDriverAgentLib/Utilities/FBMathUtils.h +100 -0
- package/WebDriverAgentLib/Utilities/FBMathUtils.m +147 -0
- package/WebDriverAgentLib/Utilities/FBMjpegServer.h +36 -0
- package/WebDriverAgentLib/Utilities/FBMjpegServer.m +248 -0
- package/WebDriverAgentLib/Utilities/FBNotificationsHelper.h +37 -0
- package/WebDriverAgentLib/Utilities/FBNotificationsHelper.m +29 -0
- package/WebDriverAgentLib/Utilities/FBPasteboard.h +40 -0
- package/WebDriverAgentLib/Utilities/FBPasteboard.m +176 -0
- package/WebDriverAgentLib/Utilities/FBProtocolHelpers.h +46 -0
- package/WebDriverAgentLib/Utilities/FBProtocolHelpers.m +144 -0
- package/WebDriverAgentLib/Utilities/FBReflectionUtils.h +23 -0
- package/WebDriverAgentLib/Utilities/FBReflectionUtils.m +31 -0
- package/WebDriverAgentLib/Utilities/FBRunLoopSpinner.h +77 -0
- package/WebDriverAgentLib/Utilities/FBRunLoopSpinner.m +94 -0
- package/WebDriverAgentLib/Utilities/FBRuntimeUtils.h +79 -0
- package/WebDriverAgentLib/Utilities/FBRuntimeUtils.m +112 -0
- package/WebDriverAgentLib/Utilities/FBScreen.h +49 -0
- package/WebDriverAgentLib/Utilities/FBScreen.m +128 -0
- package/WebDriverAgentLib/Utilities/FBScreenshot.h +44 -0
- package/WebDriverAgentLib/Utilities/FBScreenshot.m +231 -0
- package/WebDriverAgentLib/Utilities/FBSettings.h +51 -0
- package/WebDriverAgentLib/Utilities/FBSettings.m +45 -0
- package/WebDriverAgentLib/Utilities/FBSettingsHandler.h +35 -0
- package/WebDriverAgentLib/Utilities/FBSettingsHandler.m +398 -0
- package/WebDriverAgentLib/Utilities/FBTVNavigationTracker-Private.h +37 -0
- package/WebDriverAgentLib/Utilities/FBTVNavigationTracker.h +77 -0
- package/WebDriverAgentLib/Utilities/FBTVNavigationTracker.m +177 -0
- package/WebDriverAgentLib/Utilities/FBUnattachedAppLauncher.h +26 -0
- package/WebDriverAgentLib/Utilities/FBUnattachedAppLauncher.m +21 -0
- package/WebDriverAgentLib/Utilities/FBW3CActionsHelpers.h +42 -0
- package/WebDriverAgentLib/Utilities/FBW3CActionsHelpers.m +119 -0
- package/WebDriverAgentLib/Utilities/FBW3CActionsSynthesizer.h +19 -0
- package/WebDriverAgentLib/Utilities/FBW3CActionsSynthesizer.m +1011 -0
- package/WebDriverAgentLib/Utilities/FBWebServerParams.h +22 -0
- package/WebDriverAgentLib/Utilities/FBWebServerParams.m +23 -0
- package/WebDriverAgentLib/Utilities/FBXCAXClientProxy.h +171 -0
- package/WebDriverAgentLib/Utilities/FBXCAXClientProxy.m +240 -0
- package/WebDriverAgentLib/Utilities/FBXCTestDaemonsProxy.h +45 -0
- package/WebDriverAgentLib/Utilities/FBXCTestDaemonsProxy.m +362 -0
- package/WebDriverAgentLib/Utilities/FBXCodeCompatibility.h +73 -0
- package/WebDriverAgentLib/Utilities/FBXCodeCompatibility.m +129 -0
- package/WebDriverAgentLib/Utilities/FBXMLGenerationOptions.h +45 -0
- package/WebDriverAgentLib/Utilities/FBXMLGenerationOptions.m +25 -0
- package/WebDriverAgentLib/Utilities/FBXPath-Private.h +61 -0
- package/WebDriverAgentLib/Utilities/FBXPath.h +59 -0
- package/WebDriverAgentLib/Utilities/FBXPath.m +1087 -0
- package/WebDriverAgentLib/Utilities/FBXPathExtensions.h +40 -0
- package/WebDriverAgentLib/Utilities/FBXPathExtensions.m +418 -0
- package/WebDriverAgentLib/Utilities/LRUCache/LRUCache.h +66 -0
- package/WebDriverAgentLib/Utilities/LRUCache/LRUCache.m +149 -0
- package/WebDriverAgentLib/Utilities/LRUCache/LRUCacheNode.h +43 -0
- package/WebDriverAgentLib/Utilities/LRUCache/LRUCacheNode.m +51 -0
- package/WebDriverAgentLib/Utilities/NSPredicate+FBFormat.h +42 -0
- package/WebDriverAgentLib/Utilities/NSPredicate+FBFormat.m +69 -0
- package/WebDriverAgentLib/Utilities/XCTestPrivateSymbols.h +78 -0
- package/WebDriverAgentLib/Utilities/XCTestPrivateSymbols.m +127 -0
- package/WebDriverAgentLib/Utilities/XCUIApplicationProcessDelay.h +37 -0
- package/WebDriverAgentLib/Utilities/XCUIApplicationProcessDelay.m +83 -0
- package/WebDriverAgentLib/WebDriverAgentLib.h +61 -0
- package/WebDriverAgentRunner/Assets.xcassets/AppIcon.appiconset/Contents.json +14 -0
- package/WebDriverAgentRunner/Assets.xcassets/AppIcon.appiconset/icon-1024.png +0 -0
- package/WebDriverAgentRunner/Assets.xcassets/Contents.json +6 -0
- package/WebDriverAgentRunner/Info.plist +30 -0
- package/WebDriverAgentRunner/UITestingUITests.m +58 -0
- package/WebDriverAgentTests/IntegrationApp/COORDINATE_PROBE.md +52 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/AppDelegate.h +14 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/AppDelegate.m +38 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBAlertViewController.h +14 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBAlertViewController.m +82 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBCoordinateProbeViewController.h +4 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBCoordinateProbeViewController.m +194 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBNavigationController.h +12 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBNavigationController.m +25 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBScrollViewController.h +13 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBScrollViewController.m +52 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBTableDataSource.h +16 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBTableDataSource.m +35 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/SceneDelegate.h +20 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/SceneDelegate.m +81 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/TouchSpotView.h +17 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/TouchSpotView.m +28 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/TouchViewController.h +23 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/TouchViewController.m +29 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/TouchableView.h +30 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/TouchableView.m +119 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/ViewController.h +12 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/ViewController.m +144 -0
- package/WebDriverAgentTests/IntegrationApp/Info.plist +71 -0
- package/WebDriverAgentTests/IntegrationApp/Resources/Base.lproj/Main.storyboard +650 -0
- package/WebDriverAgentTests/IntegrationApp/main.m +15 -0
- package/WebDriverAgentTests/IntegrationApp_tvOS/AppDelegate.h +13 -0
- package/WebDriverAgentTests/IntegrationApp_tvOS/AppDelegate.m +26 -0
- package/WebDriverAgentTests/IntegrationApp_tvOS/Info.plist +41 -0
- package/WebDriverAgentTests/IntegrationApp_tvOS/SceneDelegate.h +15 -0
- package/WebDriverAgentTests/IntegrationApp_tvOS/SceneDelegate.m +22 -0
- package/WebDriverAgentTests/IntegrationApp_tvOS/ViewController.h +13 -0
- package/WebDriverAgentTests/IntegrationApp_tvOS/ViewController.m +79 -0
- package/WebDriverAgentTests/IntegrationApp_tvOS/main.m +17 -0
- package/WebDriverAgentTests/IntegrationApp_watchOS/ContentView.swift +31 -0
- package/WebDriverAgentTests/IntegrationApp_watchOS/WatchSpikeApp.swift +18 -0
- package/WebDriverAgentTests/IntegrationTests/FBAlertTests.m +175 -0
- package/WebDriverAgentTests/IntegrationTests/FBAutoAlertsHandlerTests.m +79 -0
- package/WebDriverAgentTests/IntegrationTests/FBConfigurationTests.m +123 -0
- package/WebDriverAgentTests/IntegrationTests/FBDisplayGestureTests.m +541 -0
- package/WebDriverAgentTests/IntegrationTests/FBElementAttributeTests.m +273 -0
- package/WebDriverAgentTests/IntegrationTests/FBElementSwipingTests.m +222 -0
- package/WebDriverAgentTests/IntegrationTests/FBElementVisibilityTests.m +68 -0
- package/WebDriverAgentTests/IntegrationTests/FBFailureProofTestCaseTests.m +41 -0
- package/WebDriverAgentTests/IntegrationTests/FBForceTouchTests.m +88 -0
- package/WebDriverAgentTests/IntegrationTests/FBImageProcessorTests.m +116 -0
- package/WebDriverAgentTests/IntegrationTests/FBIntegrationAppTests.m +87 -0
- package/WebDriverAgentTests/IntegrationTests/FBIntegrationTestCase.h +101 -0
- package/WebDriverAgentTests/IntegrationTests/FBIntegrationTestCase.m +176 -0
- package/WebDriverAgentTests/IntegrationTests/FBKeyboardTests.m +61 -0
- package/WebDriverAgentTests/IntegrationTests/FBPasteboardTests.m +92 -0
- package/WebDriverAgentTests/IntegrationTests/FBPickerWheelSelectTests.m +55 -0
- package/WebDriverAgentTests/IntegrationTests/FBSafariAlertTests.m +77 -0
- package/WebDriverAgentTests/IntegrationTests/FBScreenTests.m +450 -0
- package/WebDriverAgentTests/IntegrationTests/FBScrollingTests.m +123 -0
- package/WebDriverAgentTests/IntegrationTests/FBSessionIntegrationTests.m +228 -0
- package/WebDriverAgentTests/IntegrationTests/FBTapTest.m +186 -0
- package/WebDriverAgentTests/IntegrationTests/FBTestMacros.h +33 -0
- package/WebDriverAgentTests/IntegrationTests/FBTypingTest.m +68 -0
- package/WebDriverAgentTests/IntegrationTests/FBVideoRecordingTests.m +63 -0
- package/WebDriverAgentTests/IntegrationTests/FBVoiceOverTests.m +103 -0
- package/WebDriverAgentTests/IntegrationTests/FBW3CMultiTouchActionsIntegrationTests.m +159 -0
- package/WebDriverAgentTests/IntegrationTests/FBW3CTouchActionsIntegrationTests.m +700 -0
- package/WebDriverAgentTests/IntegrationTests/FBW3CTypeActionsTests.m +184 -0
- package/WebDriverAgentTests/IntegrationTests/FBXPathIntegrationTests.m +260 -0
- package/WebDriverAgentTests/IntegrationTests/Info.plist +24 -0
- package/WebDriverAgentTests/IntegrationTests/XCElementSnapshotHelperTests.m +205 -0
- package/WebDriverAgentTests/IntegrationTests/XCElementSnapshotHitPointTests.m +30 -0
- package/WebDriverAgentTests/IntegrationTests/XCUIApplicationHelperTests.m +162 -0
- package/WebDriverAgentTests/IntegrationTests/XCUIDeviceHealthCheckTests.m +27 -0
- package/WebDriverAgentTests/IntegrationTests/XCUIDeviceHelperTests.m +236 -0
- package/WebDriverAgentTests/IntegrationTests/XCUIDeviceRotationTests.m +105 -0
- package/WebDriverAgentTests/IntegrationTests/XCUIElementAttributesTests.m +248 -0
- package/WebDriverAgentTests/IntegrationTests/XCUIElementFBFindTests.m +673 -0
- package/WebDriverAgentTests/IntegrationTests/XCUIElementHelperIntegrationTests.m +51 -0
- package/WebDriverAgentTests/IntegrationTests_tvOS/FBTVFocusIntegrationTests.m +84 -0
- package/WebDriverAgentTests/IntegrationTests_tvOS/Info.plist +24 -0
- package/WebDriverAgentTests/IntegrationTests_watchOS/IntegrationTests_watchOS-Bridging-Header.h +23 -0
- package/WebDriverAgentTests/IntegrationTests_watchOS/WDAAlertIntegrationTests.swift +25 -0
- package/WebDriverAgentTests/IntegrationTests_watchOS/WDAAppLifecycleIntegrationTests.swift +37 -0
- package/WebDriverAgentTests/IntegrationTests_watchOS/WDAClickIntegrationTests.swift +25 -0
- package/WebDriverAgentTests/IntegrationTests_watchOS/WDADeviceIntegrationTests.swift +92 -0
- package/WebDriverAgentTests/IntegrationTests_watchOS/WDAElementAttributeIntegrationTests.swift +39 -0
- package/WebDriverAgentTests/IntegrationTests_watchOS/WDAFindIntegrationTests.swift +101 -0
- package/WebDriverAgentTests/IntegrationTests_watchOS/WDAMjpegStreamingIntegrationTests.swift +81 -0
- package/WebDriverAgentTests/IntegrationTests_watchOS/WDAScreenshotAndSourceIntegrationTests.swift +54 -0
- package/WebDriverAgentTests/IntegrationTests_watchOS/WDATypingIntegrationTests.swift +73 -0
- package/WebDriverAgentTests/IntegrationTests_watchOS/WDAWatchInProcessTestCase.swift +51 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCElementSnapshotDouble.h +16 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCElementSnapshotDouble.m +110 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCUIApplicationDouble.h +17 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCUIApplicationDouble.m +66 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCUIElementDouble.h +55 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCUIElementDouble.m +114 -0
- package/WebDriverAgentTests/UnitTests/FBClassChainTests.m +313 -0
- package/WebDriverAgentTests/UnitTests/FBConfigurationTests.m +72 -0
- package/WebDriverAgentTests/UnitTests/FBCustomCommandsTests.m +144 -0
- package/WebDriverAgentTests/UnitTests/FBElementCacheTests.m +124 -0
- package/WebDriverAgentTests/UnitTests/FBElementTypeTransformerTests.m +45 -0
- package/WebDriverAgentTests/UnitTests/FBElementUtilitiesTests.m +76 -0
- package/WebDriverAgentTests/UnitTests/FBErrorBuilderTests.m +61 -0
- package/WebDriverAgentTests/UnitTests/FBExceptionHandlerTests.m +59 -0
- package/WebDriverAgentTests/UnitTests/FBHTTPServerSessionTests.m +151 -0
- package/WebDriverAgentTests/UnitTests/FBHTTPServerTests.m +458 -0
- package/WebDriverAgentTests/UnitTests/FBLRUCacheTests.m +161 -0
- package/WebDriverAgentTests/UnitTests/FBMathUtilsTests.m +196 -0
- package/WebDriverAgentTests/UnitTests/FBProtocolHelpersTests.m +81 -0
- package/WebDriverAgentTests/UnitTests/FBResponseJSONPayloadTests.m +76 -0
- package/WebDriverAgentTests/UnitTests/FBRouteTests.m +129 -0
- package/WebDriverAgentTests/UnitTests/FBRunLoopSpinnerTests.m +98 -0
- package/WebDriverAgentTests/UnitTests/FBRuntimeUtilsTests.m +45 -0
- package/WebDriverAgentTests/UnitTests/FBSDKVersionTests.m +66 -0
- package/WebDriverAgentTests/UnitTests/FBSessionTests.m +268 -0
- package/WebDriverAgentTests/UnitTests/FBTouchableViewTests.m +121 -0
- package/WebDriverAgentTests/UnitTests/FBXCAXClientProxyTests.m +90 -0
- package/WebDriverAgentTests/UnitTests/FBXMLSafeStringTests.m +35 -0
- package/WebDriverAgentTests/UnitTests/FBXPathTests.m +381 -0
- package/WebDriverAgentTests/UnitTests/Info.plist +24 -0
- package/WebDriverAgentTests/UnitTests/NSDictionaryFBUtf8SafeTests.m +77 -0
- package/WebDriverAgentTests/UnitTests/NSExpressionFBFormatTests.m +60 -0
- package/WebDriverAgentTests/UnitTests/NSPredicateFBFormatTests.m +72 -0
- package/WebDriverAgentTests/UnitTests/XCUIElementHelpersTests.m +50 -0
- package/WebDriverAgentTests/UnitTests_tvOS/Doubles/FBXCAccessibilityElementDouble.h +27 -0
- package/WebDriverAgentTests/UnitTests_tvOS/Doubles/FBXCAccessibilityElementDouble.m +23 -0
- package/WebDriverAgentTests/UnitTests_tvOS/Doubles/FBXCElementSnapshotDouble.h +43 -0
- package/WebDriverAgentTests/UnitTests_tvOS/Doubles/FBXCElementSnapshotDouble.m +24 -0
- package/WebDriverAgentTests/UnitTests_tvOS/Doubles/XCUIElementDouble.h +47 -0
- package/WebDriverAgentTests/UnitTests_tvOS/Doubles/XCUIElementDouble.m +81 -0
- package/WebDriverAgentTests/UnitTests_tvOS/FBTVNavigationTrackerTests.m +134 -0
- package/WebDriverAgentTests/UnitTests_tvOS/Info.plist +24 -0
- package/axeDevToolsXCUI.xcframework/Info.plist +50 -0
- package/axeDevToolsXCUI.xcframework/LICENSE-3RD-PARTY-axe-devtools-ios.md +29 -0
- package/axeDevToolsXCUI.xcframework/axe-devtools-ios-4.3.1.cdx.json +75 -0
- package/axeDevToolsXCUI.xcframework/axe-devtools-ios-4.3.1.spdx.json +67 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/HTMLReportTemplate.html +1912 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Headers/AxeTestBundleObserver.h +55 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Headers/axeDevToolsXCUI-Swift.h +1546 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Headers/axeDevToolsXCUI.h +17 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Info.plist +57 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/LICENSE.md +7 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios.abi.json +34308 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios.private.swiftinterface +927 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios.swiftinterface +927 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Modules/module.modulemap +10 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/axeDevToolsXCUI +0 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/HTMLReportTemplate.html +1912 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Headers/AxeTestBundleObserver.h +55 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Headers/axeDevToolsXCUI-Swift.h +3088 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Headers/axeDevToolsXCUI.h +17 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Info.plist +53 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/LICENSE.md +7 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios-simulator.abi.json +34308 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +927 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +927 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/x86_64-apple-ios-simulator.abi.json +34308 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +927 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +927 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/module.modulemap +10 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/_CodeSignature/CodeResources +278 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/axeDevToolsXCUI +0 -0
- package/build/lib/check-dependencies.d.ts +6 -0
- package/build/lib/check-dependencies.d.ts.map +1 -0
- package/build/lib/check-dependencies.js +50 -0
- package/build/lib/check-dependencies.js.map +1 -0
- package/build/lib/constants.d.ts +25 -0
- package/build/lib/constants.d.ts.map +1 -0
- package/build/lib/constants.js +28 -0
- package/build/lib/constants.js.map +1 -0
- package/build/lib/index.d.ts +7 -0
- package/build/lib/index.d.ts.map +1 -0
- package/build/lib/index.js +7 -0
- package/build/lib/index.js.map +1 -0
- package/build/lib/logger.d.ts +2 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +3 -0
- package/build/lib/logger.js.map +1 -0
- package/build/lib/no-session-proxy.d.ts +7 -0
- package/build/lib/no-session-proxy.d.ts.map +1 -0
- package/build/lib/no-session-proxy.js +17 -0
- package/build/lib/no-session-proxy.js.map +1 -0
- package/build/lib/types.d.ts +206 -0
- package/build/lib/types.d.ts.map +1 -0
- package/build/lib/types.js +2 -0
- package/build/lib/types.js.map +1 -0
- package/build/lib/utils/index.d.ts +11 -0
- package/build/lib/utils/index.d.ts.map +1 -0
- package/build/lib/utils/index.js +13 -0
- package/build/lib/utils/index.js.map +1 -0
- package/build/lib/utils/module.d.ts +25 -0
- package/build/lib/utils/module.d.ts.map +1 -0
- package/build/lib/utils/module.js +47 -0
- package/build/lib/utils/module.js.map +1 -0
- package/build/lib/utils/platform.d.ts +19 -0
- package/build/lib/utils/platform.d.ts.map +1 -0
- package/build/lib/utils/platform.js +32 -0
- package/build/lib/utils/platform.js.map +1 -0
- package/build/lib/utils/processes.d.ts +34 -0
- package/build/lib/utils/processes.d.ts.map +1 -0
- package/build/lib/utils/processes.js +151 -0
- package/build/lib/utils/processes.js.map +1 -0
- package/build/lib/utils/security.d.ts +5 -0
- package/build/lib/utils/security.d.ts.map +1 -0
- package/build/lib/utils/security.js +12 -0
- package/build/lib/utils/security.js.map +1 -0
- package/build/lib/utils/xctestrun.d.ts +51 -0
- package/build/lib/utils/xctestrun.d.ts.map +1 -0
- package/build/lib/utils/xctestrun.js +135 -0
- package/build/lib/utils/xctestrun.js.map +1 -0
- package/build/lib/wda-strategies.d.ts +69 -0
- package/build/lib/wda-strategies.d.ts.map +1 -0
- package/build/lib/wda-strategies.js +247 -0
- package/build/lib/wda-strategies.js.map +1 -0
- package/build/lib/webdriveragent.d.ts +175 -0
- package/build/lib/webdriveragent.d.ts.map +1 -0
- package/build/lib/webdriveragent.js +540 -0
- package/build/lib/webdriveragent.js.map +1 -0
- package/build/lib/xcodebuild.d.ts +98 -0
- package/build/lib/xcodebuild.d.ts.map +1 -0
- package/build/lib/xcodebuild.js +562 -0
- package/build/lib/xcodebuild.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -0
- package/lib/check-dependencies.ts +64 -0
- package/lib/constants.ts +33 -0
- package/lib/index.ts +7 -0
- package/lib/logger.ts +3 -0
- package/lib/no-session-proxy.ts +19 -0
- package/lib/types.ts +238 -0
- package/lib/utils/index.ts +20 -0
- package/lib/utils/module.ts +66 -0
- package/lib/utils/platform.ts +34 -0
- package/lib/utils/processes.ts +174 -0
- package/lib/utils/security.ts +16 -0
- package/lib/utils/xctestrun.ts +188 -0
- package/lib/wda-strategies.ts +343 -0
- package/lib/webdriveragent.ts +642 -0
- package/lib/xcodebuild.ts +678 -0
- package/package.json +114 -3
|
@@ -0,0 +1,642 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
|
|
3
|
+
import {WebDriverProxy} from '@appium/base-driver';
|
|
4
|
+
import {strongbox} from '@appium/strongbox';
|
|
5
|
+
import {fs, util} from '@appium/support';
|
|
6
|
+
import type {AppiumLogger, StringRecord} from '@appium/types';
|
|
7
|
+
import AsyncLock from 'async-lock';
|
|
8
|
+
import {waitForCondition} from 'asyncbox';
|
|
9
|
+
|
|
10
|
+
import {WDA_RUNNER_BUNDLE_ID, WDA_BASE_URL, DEFAULT_TEST_BUNDLE_SUFFIX} from './constants.js';
|
|
11
|
+
import {log as defaultLogger} from './logger.js';
|
|
12
|
+
import {NoSessionProxy} from './no-session-proxy.js';
|
|
13
|
+
import type {
|
|
14
|
+
WebDriverAgentArgs,
|
|
15
|
+
AppleDevice,
|
|
16
|
+
XcodeBuildSettings,
|
|
17
|
+
RetrieveBuildSettingsOptions,
|
|
18
|
+
WdaHostOps,
|
|
19
|
+
} from './types.js';
|
|
20
|
+
import {BOOTSTRAP_PATH, getWDAUpgradeTimestamp, isWatchOS} from './utils/index.js';
|
|
21
|
+
import {
|
|
22
|
+
createDefaultWdaHostOps,
|
|
23
|
+
createWdaStartupStrategy,
|
|
24
|
+
type WdaStartupStrategy,
|
|
25
|
+
type WdaStartupStrategyContext,
|
|
26
|
+
} from './wda-strategies.js';
|
|
27
|
+
import {XcodeBuild} from './xcodebuild.js';
|
|
28
|
+
|
|
29
|
+
const WDA_LAUNCH_TIMEOUT = 60 * 1000;
|
|
30
|
+
const WDA_AGENT_PORT = 8100;
|
|
31
|
+
const SHARED_RESOURCES_GUARD = new AsyncLock();
|
|
32
|
+
const RECENT_MODULE_VERSION_ITEM_NAME = 'recentWdaModuleVersion';
|
|
33
|
+
const URL_PROTOCOL_SEPARATOR = '://';
|
|
34
|
+
|
|
35
|
+
export class WebDriverAgent {
|
|
36
|
+
bootstrapPath!: string;
|
|
37
|
+
agentPath!: string;
|
|
38
|
+
readonly args: WebDriverAgentArgs;
|
|
39
|
+
readonly device: AppleDevice;
|
|
40
|
+
readonly platformVersion?: string;
|
|
41
|
+
readonly platformName?: string;
|
|
42
|
+
readonly iosSdkVersion?: string;
|
|
43
|
+
readonly host?: string;
|
|
44
|
+
readonly isRealDevice: boolean;
|
|
45
|
+
readonly wdaRemotePort: number;
|
|
46
|
+
readonly wdaBaseUrl: string;
|
|
47
|
+
readonly wdaBindingIP?: string;
|
|
48
|
+
webDriverAgentUrl?: string;
|
|
49
|
+
started: boolean;
|
|
50
|
+
updatedWDABundleId?: string;
|
|
51
|
+
noSessionProxy?: NoSessionProxy;
|
|
52
|
+
jwproxy?: WebDriverProxy;
|
|
53
|
+
proxyReqRes?: any;
|
|
54
|
+
private readonly log: AppiumLogger;
|
|
55
|
+
private readonly wdaLocalPort?: number;
|
|
56
|
+
private readonly prebuildWDA?: boolean;
|
|
57
|
+
private readonly wdaConnectionTimeout?: number;
|
|
58
|
+
private readonly useXctestrunFile?: boolean;
|
|
59
|
+
private readonly usePrebuiltWDA?: boolean;
|
|
60
|
+
private readonly mjpegServerPort?: number;
|
|
61
|
+
private readonly maxHttpRequestBodySize?: number;
|
|
62
|
+
private readonly wdaLaunchTimeout: number;
|
|
63
|
+
private readonly usePreinstalledWDA?: boolean;
|
|
64
|
+
private readonly updatedWDABundleIdSuffix: string;
|
|
65
|
+
private readonly hostOps: Required<WdaHostOps>;
|
|
66
|
+
private activeStartupStrategy?: WdaStartupStrategy;
|
|
67
|
+
private _xcodebuild?: XcodeBuild | null;
|
|
68
|
+
private _url?: URL;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Creates a new WebDriverAgent instance.
|
|
72
|
+
* @param args - Configuration arguments for WebDriverAgent
|
|
73
|
+
* @param log - Optional logger instance
|
|
74
|
+
*/
|
|
75
|
+
constructor(args: WebDriverAgentArgs, log: AppiumLogger | null = null) {
|
|
76
|
+
this.args = {...args};
|
|
77
|
+
this.log = log ?? defaultLogger;
|
|
78
|
+
|
|
79
|
+
this.device = args.device;
|
|
80
|
+
this.platformVersion = args.platformVersion;
|
|
81
|
+
this.platformName = args.platformName;
|
|
82
|
+
this.iosSdkVersion = args.iosSdkVersion;
|
|
83
|
+
this.host = args.host;
|
|
84
|
+
this.isRealDevice = !!args.realDevice;
|
|
85
|
+
|
|
86
|
+
if (isWatchOS(this.platformName || '') && this.isRealDevice) {
|
|
87
|
+
throw new Error(
|
|
88
|
+
'Real watchOS device testing is not supported; watchOS is only available via the Simulator.',
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
this.setWDAPaths(args.bootstrapPath, args.agentPath);
|
|
93
|
+
|
|
94
|
+
this.wdaLocalPort = args.wdaLocalPort;
|
|
95
|
+
this.wdaRemotePort =
|
|
96
|
+
((this.isRealDevice ? args.wdaRemotePort : null) ?? args.wdaLocalPort) || WDA_AGENT_PORT;
|
|
97
|
+
this.wdaBaseUrl = args.wdaBaseUrl || WDA_BASE_URL;
|
|
98
|
+
this.wdaBindingIP = args.wdaBindingIP;
|
|
99
|
+
this.prebuildWDA = args.prebuildWDA;
|
|
100
|
+
|
|
101
|
+
// this.args.webDriverAgentUrl guiarantees the capabilities acually
|
|
102
|
+
// gave 'appium:webDriverAgentUrl' but 'this.webDriverAgentUrl'
|
|
103
|
+
// could be used for caching WDA with xcodebuild.
|
|
104
|
+
this.webDriverAgentUrl = args.webDriverAgentUrl;
|
|
105
|
+
|
|
106
|
+
this.started = false;
|
|
107
|
+
|
|
108
|
+
this.wdaConnectionTimeout = args.wdaConnectionTimeout;
|
|
109
|
+
|
|
110
|
+
this.useXctestrunFile = args.useXctestrunFile;
|
|
111
|
+
this.usePrebuiltWDA = args.usePrebuiltWDA;
|
|
112
|
+
this.mjpegServerPort = args.mjpegServerPort;
|
|
113
|
+
this.maxHttpRequestBodySize = args.maxHttpRequestBodySize;
|
|
114
|
+
|
|
115
|
+
this.updatedWDABundleId = args.updatedWDABundleId;
|
|
116
|
+
|
|
117
|
+
this.wdaLaunchTimeout = args.wdaLaunchTimeout || WDA_LAUNCH_TIMEOUT;
|
|
118
|
+
this.usePreinstalledWDA = args.usePreinstalledWDA;
|
|
119
|
+
this.updatedWDABundleIdSuffix = args.updatedWDABundleIdSuffix ?? DEFAULT_TEST_BUNDLE_SUFFIX;
|
|
120
|
+
const defaultHostOps = createDefaultWdaHostOps();
|
|
121
|
+
this.hostOps = {
|
|
122
|
+
simulator: {
|
|
123
|
+
...defaultHostOps.simulator,
|
|
124
|
+
...args.hostOps?.simulator,
|
|
125
|
+
},
|
|
126
|
+
realDevicePreinstalled: {
|
|
127
|
+
...defaultHostOps.realDevicePreinstalled,
|
|
128
|
+
...args.hostOps?.realDevicePreinstalled,
|
|
129
|
+
},
|
|
130
|
+
realDeviceXcodebuild: {
|
|
131
|
+
...defaultHostOps.realDeviceXcodebuild,
|
|
132
|
+
...args.hostOps?.realDeviceXcodebuild,
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
this._xcodebuild = this.canSkipXcodebuild
|
|
137
|
+
? null
|
|
138
|
+
: new XcodeBuild(
|
|
139
|
+
this.device,
|
|
140
|
+
{
|
|
141
|
+
platformVersion: this.platformVersion,
|
|
142
|
+
platformName: this.platformName,
|
|
143
|
+
iosSdkVersion: this.iosSdkVersion,
|
|
144
|
+
agentPath: this.agentPath,
|
|
145
|
+
bootstrapPath: this.bootstrapPath,
|
|
146
|
+
realDevice: this.isRealDevice,
|
|
147
|
+
showXcodeLog: args.showXcodeLog,
|
|
148
|
+
xcodeConfigFile: args.xcodeConfigFile,
|
|
149
|
+
xcodeOrgId: args.xcodeOrgId,
|
|
150
|
+
xcodeSigningId: args.xcodeSigningId,
|
|
151
|
+
keychainPath: args.keychainPath,
|
|
152
|
+
keychainPassword: args.keychainPassword,
|
|
153
|
+
useSimpleBuildTest: args.useSimpleBuildTest,
|
|
154
|
+
usePrebuiltWDA: args.usePrebuiltWDA,
|
|
155
|
+
updatedWDABundleId: this.updatedWDABundleId,
|
|
156
|
+
launchTimeout: this.wdaLaunchTimeout,
|
|
157
|
+
wdaRemotePort: this.wdaRemotePort,
|
|
158
|
+
wdaBindingIP: this.wdaBindingIP,
|
|
159
|
+
useXctestrunFile: this.useXctestrunFile,
|
|
160
|
+
derivedDataPath: args.derivedDataPath,
|
|
161
|
+
mjpegServerPort: this.mjpegServerPort,
|
|
162
|
+
maxHttpRequestBodySize: this.maxHttpRequestBodySize,
|
|
163
|
+
allowProvisioningDeviceRegistration: args.allowProvisioningDeviceRegistration,
|
|
164
|
+
resultBundlePath: args.resultBundlePath,
|
|
165
|
+
resultBundleVersion: args.resultBundleVersion,
|
|
166
|
+
},
|
|
167
|
+
this.log,
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Return true if the session does not need xcodebuild.
|
|
173
|
+
* @returns Whether the session needs/has xcodebuild.
|
|
174
|
+
*/
|
|
175
|
+
get canSkipXcodebuild(): boolean {
|
|
176
|
+
// Use this.args.webDriverAgentUrl to guarantee
|
|
177
|
+
// the capabilities set gave the `appium:webDriverAgentUrl`.
|
|
178
|
+
return this.usePreinstalledWDA || !!this.args.webDriverAgentUrl;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Get the xcodebuild instance. Throws if not initialized.
|
|
183
|
+
* @returns The XcodeBuild instance
|
|
184
|
+
* @throws Error if xcodebuild is not available
|
|
185
|
+
*/
|
|
186
|
+
get xcodebuild(): XcodeBuild {
|
|
187
|
+
if (!this._xcodebuild) {
|
|
188
|
+
throw new Error('xcodebuild is not available');
|
|
189
|
+
}
|
|
190
|
+
return this._xcodebuild;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Return bundle id for WebDriverAgent to launch the WDA.
|
|
195
|
+
* The primary usage is with 'this.usePreinstalledWDA'.
|
|
196
|
+
* It adds `.xctrunner` as suffix by default but 'this.updatedWDABundleIdSuffix'
|
|
197
|
+
* lets skip it.
|
|
198
|
+
*
|
|
199
|
+
* @returns Bundle ID for Xctest.
|
|
200
|
+
*/
|
|
201
|
+
get bundleIdForXctest(): string {
|
|
202
|
+
return `${this.updatedWDABundleId ? this.updatedWDABundleId : WDA_RUNNER_BUNDLE_ID}${this.updatedWDABundleIdSuffix}`;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Gets the base path for the WebDriverAgent URL.
|
|
207
|
+
* @returns The base path (empty string if root path)
|
|
208
|
+
*/
|
|
209
|
+
get basePath(): string {
|
|
210
|
+
if (this.url.pathname === '/') {
|
|
211
|
+
return '';
|
|
212
|
+
}
|
|
213
|
+
return this.url.pathname || '';
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Gets the WebDriverAgent URL.
|
|
218
|
+
* Constructs the URL from webDriverAgentUrl if provided, otherwise
|
|
219
|
+
* builds it from wdaBaseUrl, wdaBindingIP, and wdaLocalPort.
|
|
220
|
+
* @returns The parsed URL object
|
|
221
|
+
*/
|
|
222
|
+
get url(): URL {
|
|
223
|
+
if (!this._url) {
|
|
224
|
+
if (this.webDriverAgentUrl) {
|
|
225
|
+
this._url = this.toUrl(this.webDriverAgentUrl);
|
|
226
|
+
} else {
|
|
227
|
+
const port = this.wdaLocalPort || WDA_AGENT_PORT;
|
|
228
|
+
const parsedBaseUrl = this.toUrl(this.wdaBaseUrl || WDA_BASE_URL);
|
|
229
|
+
this._url = new URL(
|
|
230
|
+
`${parsedBaseUrl.protocol}//${this.wdaBindingIP || parsedBaseUrl.hostname}:${port}`,
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return this._url;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Gets whether WebDriverAgent has fully started.
|
|
239
|
+
* @returns `true` if WDA has started, `false` otherwise
|
|
240
|
+
*/
|
|
241
|
+
get fullyStarted(): boolean {
|
|
242
|
+
return this.started;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Sets whether WebDriverAgent has fully started.
|
|
247
|
+
* @param started - `true` if WDA has started, `false` otherwise
|
|
248
|
+
*/
|
|
249
|
+
set fullyStarted(started: boolean) {
|
|
250
|
+
this.started = started ?? false;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Sets the WebDriverAgent URL.
|
|
255
|
+
* @param _url - The URL string to parse and set
|
|
256
|
+
*/
|
|
257
|
+
set url(_url: string) {
|
|
258
|
+
this._url = this.toUrl(_url);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Cleans up obsolete cached processes from previous WDA sessions
|
|
263
|
+
* that are listening on the same port but belong to different devices.
|
|
264
|
+
*/
|
|
265
|
+
async cleanupObsoleteProcesses(): Promise<void> {
|
|
266
|
+
try {
|
|
267
|
+
await this.hostOps.realDeviceXcodebuild.cleanupObsoleteProcesses?.({
|
|
268
|
+
udid: this.device.udid,
|
|
269
|
+
port: this.url.port as string,
|
|
270
|
+
commandLineIncludes: '/WebDriverAgentRunner',
|
|
271
|
+
});
|
|
272
|
+
} catch (e: any) {
|
|
273
|
+
this.log.warn(`Failed to clean obsolete cached processes. Original error: ${e.message}`);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Return current running WDA's status like below after launching WDA
|
|
282
|
+
* {
|
|
283
|
+
* "state": "success",
|
|
284
|
+
* "os": {
|
|
285
|
+
* "name": "iOS",
|
|
286
|
+
* "version": "11.4",
|
|
287
|
+
* "sdkVersion": "11.3"
|
|
288
|
+
* },
|
|
289
|
+
* "ios": {
|
|
290
|
+
* "simulatorVersion": "11.4",
|
|
291
|
+
* "ip": "172.254.99.34"
|
|
292
|
+
* },
|
|
293
|
+
* "build": {
|
|
294
|
+
* "time": "Jun 24 2018 17:08:21",
|
|
295
|
+
* "productBundleIdentifier": "com.deque.WebDriverAgentRunner"
|
|
296
|
+
* }
|
|
297
|
+
* }
|
|
298
|
+
*
|
|
299
|
+
* @param sessionId Launch WDA and establish the session with this sessionId
|
|
300
|
+
*/
|
|
301
|
+
async launch(sessionId: string): Promise<StringRecord | null> {
|
|
302
|
+
const startupStrategy = this.createStartupStrategy();
|
|
303
|
+
this.log.info(`Selected '${startupStrategy.name}' WebDriverAgent startup strategy`);
|
|
304
|
+
this.activeStartupStrategy = startupStrategy;
|
|
305
|
+
return await startupStrategy.launch(sessionId);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Checks if the WebDriverAgent source is fresh by verifying
|
|
310
|
+
* that required resource files exist.
|
|
311
|
+
* @returns `true` if source is fresh (all required files exist), `false` otherwise
|
|
312
|
+
*/
|
|
313
|
+
async isSourceFresh(): Promise<boolean> {
|
|
314
|
+
const existsPromises = ['Resources', path.join('Resources', 'WebDriverAgent.bundle')].map(
|
|
315
|
+
(subPath) => fs.exists(path.resolve(this.bootstrapPath, subPath)),
|
|
316
|
+
);
|
|
317
|
+
return (await Promise.all(existsPromises)).every((v) => v === true);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Stops the WebDriverAgent session and cleans up resources.
|
|
322
|
+
* Handles both preinstalled WDA and xcodebuild-based sessions.
|
|
323
|
+
*/
|
|
324
|
+
async quit(): Promise<void> {
|
|
325
|
+
await (this.activeStartupStrategy ?? this.createStartupStrategy()).quit();
|
|
326
|
+
|
|
327
|
+
if (this.jwproxy) {
|
|
328
|
+
this.jwproxy.sessionId = null;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
this.started = false;
|
|
332
|
+
|
|
333
|
+
if (!this.args.webDriverAgentUrl) {
|
|
334
|
+
// if we populated the url ourselves (during `setupCaching` call, for instance)
|
|
335
|
+
// then clean that up. If the url was supplied, we want to keep it
|
|
336
|
+
this.webDriverAgentUrl = undefined;
|
|
337
|
+
}
|
|
338
|
+
this.activeStartupStrategy = undefined;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Retrieves Xcode build settings.
|
|
343
|
+
* @param options - Optional scheme, SDK, configuration, or destination
|
|
344
|
+
* @returns Build settings, or `undefined` if xcodebuild is skipped or settings cannot be determined
|
|
345
|
+
*/
|
|
346
|
+
async retrieveBuildSettings(
|
|
347
|
+
options?: RetrieveBuildSettingsOptions,
|
|
348
|
+
): Promise<XcodeBuildSettings | undefined> {
|
|
349
|
+
if (this.canSkipXcodebuild) {
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
return await this.xcodebuild.retrieveBuildSettings(options);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Reuse running WDA if it has the same bundle id with updatedWDABundleId.
|
|
357
|
+
* Or reuse it if it has the default id without updatedWDABundleId.
|
|
358
|
+
*
|
|
359
|
+
* @returns The WDA URL used for caching on success, or `undefined` if caching was skipped.
|
|
360
|
+
*/
|
|
361
|
+
async setupCaching(): Promise<string | undefined> {
|
|
362
|
+
const status = await this.getStatus(0);
|
|
363
|
+
if (!status || !status.build) {
|
|
364
|
+
this.log.debug('WDA is currently not running. There is nothing to cache');
|
|
365
|
+
return undefined;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
const {productBundleIdentifier, upgradedAt} = status.build as any;
|
|
369
|
+
// for real device
|
|
370
|
+
if (
|
|
371
|
+
util.hasValue(productBundleIdentifier) &&
|
|
372
|
+
util.hasValue(this.updatedWDABundleId) &&
|
|
373
|
+
this.updatedWDABundleId !== productBundleIdentifier
|
|
374
|
+
) {
|
|
375
|
+
this.log.info(
|
|
376
|
+
`Will not reuse running WDA since it has different bundle id. The actual value is '${productBundleIdentifier}'.`,
|
|
377
|
+
);
|
|
378
|
+
return undefined;
|
|
379
|
+
}
|
|
380
|
+
// for simulator
|
|
381
|
+
if (
|
|
382
|
+
util.hasValue(productBundleIdentifier) &&
|
|
383
|
+
!util.hasValue(this.updatedWDABundleId) &&
|
|
384
|
+
WDA_RUNNER_BUNDLE_ID !== productBundleIdentifier
|
|
385
|
+
) {
|
|
386
|
+
this.log.info(
|
|
387
|
+
`Will not reuse running WDA since its bundle id is not equal to the default value ${WDA_RUNNER_BUNDLE_ID}`,
|
|
388
|
+
);
|
|
389
|
+
return undefined;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
const actualUpgradeTimestamp = await getWDAUpgradeTimestamp();
|
|
393
|
+
this.log.debug(`Upgrade timestamp of the currently bundled WDA: ${actualUpgradeTimestamp}`);
|
|
394
|
+
this.log.debug(`Upgrade timestamp of the WDA on the device: ${upgradedAt}`);
|
|
395
|
+
if (
|
|
396
|
+
actualUpgradeTimestamp &&
|
|
397
|
+
upgradedAt &&
|
|
398
|
+
`${actualUpgradeTimestamp}`.toLowerCase() !== `${upgradedAt}`.toLowerCase()
|
|
399
|
+
) {
|
|
400
|
+
this.log.info(
|
|
401
|
+
'Will not reuse running WDA since it has different version in comparison to the one ' +
|
|
402
|
+
`which is bundled with appium-xcuitest-driver module (${actualUpgradeTimestamp} != ${upgradedAt})`,
|
|
403
|
+
);
|
|
404
|
+
return undefined;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
const cachedUrl = this.url.href;
|
|
408
|
+
const message = util.hasValue(productBundleIdentifier)
|
|
409
|
+
? `Will reuse previously cached WDA instance at '${cachedUrl}' with '${productBundleIdentifier}'`
|
|
410
|
+
: `Will reuse previously cached WDA instance at '${cachedUrl}'`;
|
|
411
|
+
this.log.info(
|
|
412
|
+
`${message}. Set the wdaLocalPort capability to a value different from ${this.url.port} if this is an undesired behavior.`,
|
|
413
|
+
);
|
|
414
|
+
this.webDriverAgentUrl = cachedUrl;
|
|
415
|
+
return cachedUrl;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
private createStartupStrategy(): WdaStartupStrategy {
|
|
419
|
+
const context: WdaStartupStrategyContext = {
|
|
420
|
+
argsWebDriverAgentUrl: this.args.webDriverAgentUrl,
|
|
421
|
+
webDriverAgentUrl: this.webDriverAgentUrl,
|
|
422
|
+
usePreinstalledWDA: this.usePreinstalledWDA,
|
|
423
|
+
useXctestrunFile: this.useXctestrunFile,
|
|
424
|
+
usePrebuiltWDA: this.usePrebuiltWDA,
|
|
425
|
+
prebuildWDA: this.prebuildWDA,
|
|
426
|
+
isRealDevice: this.isRealDevice,
|
|
427
|
+
device: this.device,
|
|
428
|
+
agentPath: this.agentPath,
|
|
429
|
+
bootstrapPath: this.bootstrapPath,
|
|
430
|
+
bundleIdForXctest: this.bundleIdForXctest,
|
|
431
|
+
wdaLocalPort: this.wdaLocalPort,
|
|
432
|
+
wdaRemotePort: this.wdaRemotePort,
|
|
433
|
+
wdaBindingIP: this.wdaBindingIP,
|
|
434
|
+
wdaLaunchTimeout: this.wdaLaunchTimeout,
|
|
435
|
+
mjpegServerPort: this.mjpegServerPort,
|
|
436
|
+
maxHttpRequestBodySize: this.maxHttpRequestBodySize,
|
|
437
|
+
platformName: this.platformName,
|
|
438
|
+
platformVersion: this.platformVersion,
|
|
439
|
+
log: this.log,
|
|
440
|
+
hostOps: this.hostOps,
|
|
441
|
+
setWebDriverAgentUrl: (value) => {
|
|
442
|
+
this.webDriverAgentUrl = value;
|
|
443
|
+
},
|
|
444
|
+
setUrl: (value) => {
|
|
445
|
+
this.url = value;
|
|
446
|
+
},
|
|
447
|
+
setupProxies: (sessionId) => this.setupProxies(sessionId),
|
|
448
|
+
getStatus: async (timeoutMs) => await this.getStatus(timeoutMs),
|
|
449
|
+
cleanupProjectIfFresh: async () => {
|
|
450
|
+
const synchronizationKey = path.normalize(this.bootstrapPath);
|
|
451
|
+
await SHARED_RESOURCES_GUARD.acquire(
|
|
452
|
+
synchronizationKey,
|
|
453
|
+
async () => await this._cleanupProjectIfFresh(),
|
|
454
|
+
);
|
|
455
|
+
},
|
|
456
|
+
xcodebuild: () => this.xcodebuild,
|
|
457
|
+
noSessionProxy: () => {
|
|
458
|
+
if (!this.noSessionProxy) {
|
|
459
|
+
throw new Error('noSessionProxy is not available');
|
|
460
|
+
}
|
|
461
|
+
return this.noSessionProxy;
|
|
462
|
+
},
|
|
463
|
+
setStarted: (started) => {
|
|
464
|
+
this.started = started;
|
|
465
|
+
},
|
|
466
|
+
};
|
|
467
|
+
return createWdaStartupStrategy(context);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
private setupProxies(sessionId: string): void {
|
|
471
|
+
const proxyOpts: any = {
|
|
472
|
+
log: this.log,
|
|
473
|
+
server: this.url.hostname ?? undefined,
|
|
474
|
+
port: parseInt(this.url.port ?? '', 10) || undefined,
|
|
475
|
+
base: this.basePath,
|
|
476
|
+
timeout: this.wdaConnectionTimeout,
|
|
477
|
+
keepAlive: true,
|
|
478
|
+
scheme: this.url.protocol ? this.url.protocol.replace(':', '') : 'http',
|
|
479
|
+
headers: this.args.extraRequestHeaders,
|
|
480
|
+
};
|
|
481
|
+
if (this.args.reqBasePath) {
|
|
482
|
+
proxyOpts.reqBasePath = this.args.reqBasePath;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
this.jwproxy = new WebDriverProxy(proxyOpts);
|
|
486
|
+
this.jwproxy.sessionId = sessionId;
|
|
487
|
+
this.proxyReqRes = this.jwproxy.proxyReqRes.bind(this.jwproxy);
|
|
488
|
+
|
|
489
|
+
this.noSessionProxy = new NoSessionProxy(proxyOpts);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
private toUrl(value: string): URL {
|
|
493
|
+
// Treat values without `://` as host/path inputs and normalize to http.
|
|
494
|
+
if (!value.includes(URL_PROTOCOL_SEPARATOR)) {
|
|
495
|
+
return new URL(`http://${value}`);
|
|
496
|
+
}
|
|
497
|
+
try {
|
|
498
|
+
return new URL(value);
|
|
499
|
+
} catch {
|
|
500
|
+
throw new Error(`Invalid URL: ${value}`);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
private setWDAPaths(bootstrapPath?: string, agentPath?: string): void {
|
|
505
|
+
// allow the user to specify a place for WDA. This is undocumented and
|
|
506
|
+
// only here for the purposes of testing development of WDA
|
|
507
|
+
this.bootstrapPath = bootstrapPath || BOOTSTRAP_PATH;
|
|
508
|
+
this.log.info(`Using WDA path: '${this.bootstrapPath}'`);
|
|
509
|
+
|
|
510
|
+
// for backward compatibility we need to be able to specify agentPath too
|
|
511
|
+
this.agentPath = agentPath || path.resolve(this.bootstrapPath, 'WebDriverAgent.xcodeproj');
|
|
512
|
+
this.log.info(`Using WDA agent: '${this.agentPath}'`);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Return current running WDA's status like below
|
|
517
|
+
* {
|
|
518
|
+
* "state": "success",
|
|
519
|
+
* "os": {
|
|
520
|
+
* "name": "iOS",
|
|
521
|
+
* "version": "11.4",
|
|
522
|
+
* "sdkVersion": "11.3"
|
|
523
|
+
* },
|
|
524
|
+
* "ios": {
|
|
525
|
+
* "simulatorVersion": "11.4",
|
|
526
|
+
* "ip": "172.254.99.34"
|
|
527
|
+
* },
|
|
528
|
+
* "build": {
|
|
529
|
+
* "time": "Jun 24 2018 17:08:21",
|
|
530
|
+
* "productBundleIdentifier": "com.deque.WebDriverAgentRunner"
|
|
531
|
+
* }
|
|
532
|
+
* }
|
|
533
|
+
*
|
|
534
|
+
* @param timeoutMs If zero or negative, returns immediately. Otherwise, waits up to timeoutMs.
|
|
535
|
+
*/
|
|
536
|
+
private async getStatus(timeoutMs: number = 0): Promise<StringRecord | null> {
|
|
537
|
+
const noSessionProxy = new NoSessionProxy({
|
|
538
|
+
scheme: this.url.protocol ? this.url.protocol.replace(':', '') : 'http',
|
|
539
|
+
server: this.url.hostname ?? undefined,
|
|
540
|
+
port: parseInt(this.url.port ?? '', 10) || undefined,
|
|
541
|
+
base: this.basePath,
|
|
542
|
+
timeout: 3000,
|
|
543
|
+
headers: this.args.extraRequestHeaders,
|
|
544
|
+
});
|
|
545
|
+
|
|
546
|
+
const sendGetStatus = async () =>
|
|
547
|
+
(await noSessionProxy.command('/status', 'GET')) as StringRecord;
|
|
548
|
+
|
|
549
|
+
if (timeoutMs == null || timeoutMs <= 0) {
|
|
550
|
+
try {
|
|
551
|
+
return await sendGetStatus();
|
|
552
|
+
} catch (err: any) {
|
|
553
|
+
this.log.debug(
|
|
554
|
+
`WDA is not listening at '${this.url.href}'. Original error:: ${err.message}`,
|
|
555
|
+
);
|
|
556
|
+
return null;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
let lastError: any = null;
|
|
561
|
+
let status: StringRecord | null = null;
|
|
562
|
+
try {
|
|
563
|
+
await waitForCondition(
|
|
564
|
+
async () => {
|
|
565
|
+
try {
|
|
566
|
+
status = await sendGetStatus();
|
|
567
|
+
return true;
|
|
568
|
+
} catch (err) {
|
|
569
|
+
lastError = err;
|
|
570
|
+
}
|
|
571
|
+
return false;
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
waitMs: timeoutMs,
|
|
575
|
+
intervalMs: 300,
|
|
576
|
+
},
|
|
577
|
+
);
|
|
578
|
+
} catch (err: any) {
|
|
579
|
+
this.log.debug(
|
|
580
|
+
`Failed to get the status endpoint in ${timeoutMs} ms. ` +
|
|
581
|
+
`The last error while accessing ${this.url.href}: ${lastError}. Original error:: ${err.message}.`,
|
|
582
|
+
);
|
|
583
|
+
throw new Error(`WDA was not ready in ${timeoutMs} ms.`, {cause: err});
|
|
584
|
+
}
|
|
585
|
+
return status;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
private async _cleanupProjectIfFresh(): Promise<void> {
|
|
589
|
+
if (this.canSkipXcodebuild) {
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
const packageInfo = JSON.parse(
|
|
594
|
+
await fs.readFile(path.join(BOOTSTRAP_PATH, 'package.json'), 'utf8'),
|
|
595
|
+
);
|
|
596
|
+
const box = strongbox(packageInfo.name);
|
|
597
|
+
// Each Strongbox instance starts with an empty item map. Load the persisted value from disk.
|
|
598
|
+
const boxItem = await box.createItem<string>(RECENT_MODULE_VERSION_ITEM_NAME);
|
|
599
|
+
let recentModuleVersion = boxItem.value;
|
|
600
|
+
if (recentModuleVersion === undefined) {
|
|
601
|
+
this.log.info(
|
|
602
|
+
'There is no need to perform the project cleanup. A fresh install has been detected',
|
|
603
|
+
);
|
|
604
|
+
try {
|
|
605
|
+
await boxItem.write(packageInfo.version);
|
|
606
|
+
} catch (e: any) {
|
|
607
|
+
this.log.warn(`The actual module version cannot be persisted: ${e.message}`);
|
|
608
|
+
}
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
try {
|
|
613
|
+
recentModuleVersion = util.coerceVersion(recentModuleVersion, true);
|
|
614
|
+
} catch (e: any) {
|
|
615
|
+
this.log.warn(`The persisted module version string has been damaged: ${e.message}`);
|
|
616
|
+
this.log.info(
|
|
617
|
+
`Updating it to '${packageInfo.version}' assuming the project clenup is not needed`,
|
|
618
|
+
);
|
|
619
|
+
await boxItem.write(packageInfo.version);
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
if (util.compareVersions(recentModuleVersion, '>=', packageInfo.version)) {
|
|
624
|
+
this.log.info(
|
|
625
|
+
`WebDriverAgent does not need a cleanup. The project sources are up to date ` +
|
|
626
|
+
`(${recentModuleVersion} >= ${packageInfo.version})`,
|
|
627
|
+
);
|
|
628
|
+
return;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
this.log.info(
|
|
632
|
+
`Cleaning up the WebDriverAgent project after the module upgrade has happened ` +
|
|
633
|
+
`(${recentModuleVersion} < ${packageInfo.version})`,
|
|
634
|
+
);
|
|
635
|
+
try {
|
|
636
|
+
await this.xcodebuild.cleanProject();
|
|
637
|
+
await boxItem.write(packageInfo.version);
|
|
638
|
+
} catch (e: any) {
|
|
639
|
+
this.log.warn(`Cannot perform WebDriverAgent project cleanup. Original error: ${e.message}`);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|