@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,678 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
|
|
3
|
+
import {logger, timing, util} from '@appium/support';
|
|
4
|
+
import type {AppiumLogger, StringRecord} from '@appium/types';
|
|
5
|
+
import {retryInterval} from 'asyncbox';
|
|
6
|
+
import {SubProcess, exec} from 'teen_process';
|
|
7
|
+
|
|
8
|
+
import {IS_NOAUTH, WDA_RUNNER_BUNDLE_ID, XCODEBUILD_PROCESS_MARKER} from './constants.js';
|
|
9
|
+
import {log as defaultLogger} from './logger.js';
|
|
10
|
+
import {PACKAGE_VERSION} from './utils/module.js';
|
|
11
|
+
import type {NoSessionProxy} from './no-session-proxy.js';
|
|
12
|
+
import type {
|
|
13
|
+
AppleDevice,
|
|
14
|
+
RetrieveBuildSettingsOptions,
|
|
15
|
+
XcodeBuildArgs,
|
|
16
|
+
XcodeBuildSettings,
|
|
17
|
+
XcodeShowBuildSettingsEntry,
|
|
18
|
+
} from './types.js';
|
|
19
|
+
import {
|
|
20
|
+
getPlatformSchemeSuffix,
|
|
21
|
+
getWDAUpgradeTimestamp,
|
|
22
|
+
isTvOS,
|
|
23
|
+
isWatchOS,
|
|
24
|
+
setRealDeviceSecurity,
|
|
25
|
+
setXctestrunFile,
|
|
26
|
+
} from './utils/index.js';
|
|
27
|
+
|
|
28
|
+
const DEFAULT_SIGNING_ID = 'iPhone Developer';
|
|
29
|
+
const PREBUILD_DELAY = 0;
|
|
30
|
+
const RUNNER_SCHEME_IOS = IS_NOAUTH ? 'WebDriverAgentRunner_noauth' : 'WebDriverAgentRunner';
|
|
31
|
+
// Bounds the best-effort udid case lookup so a hung 'xcodebuild -showdestinations' cannot stall
|
|
32
|
+
// session startup past wdaLaunchTimeout, which does not cover this step.
|
|
33
|
+
const XCODE_DEVICE_UDID_RESOLUTION_TIMEOUT_MS = 15000;
|
|
34
|
+
|
|
35
|
+
const ERROR_WRITING_ATTACHMENT = 'Error writing attachment data to file';
|
|
36
|
+
const ERROR_COPYING_ATTACHMENT = 'Error copying testing attachment';
|
|
37
|
+
const IGNORED_ERRORS = [
|
|
38
|
+
ERROR_WRITING_ATTACHMENT,
|
|
39
|
+
ERROR_COPYING_ATTACHMENT,
|
|
40
|
+
'Failed to remove screenshot at path',
|
|
41
|
+
];
|
|
42
|
+
const IGNORED_ERRORS_PATTERN = new RegExp(
|
|
43
|
+
'(' + IGNORED_ERRORS.map((errStr) => util.escapeRegExp(errStr)).join('|') + ')',
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const REAL_DEVICES_CONFIG_DOCS_LINK =
|
|
47
|
+
'https://appium.github.io/appium-xcuitest-driver/latest/preparation/real-device-config/';
|
|
48
|
+
|
|
49
|
+
const xcodeLog = logger.getLogger('Xcode');
|
|
50
|
+
|
|
51
|
+
export class XcodeBuild {
|
|
52
|
+
readonly device: AppleDevice;
|
|
53
|
+
readonly realDevice: boolean;
|
|
54
|
+
readonly agentPath: string;
|
|
55
|
+
private _xcodeDeviceUdidPromise?: Promise<string>;
|
|
56
|
+
readonly bootstrapPath: string;
|
|
57
|
+
readonly platformVersion?: string;
|
|
58
|
+
readonly platformName?: string;
|
|
59
|
+
readonly iosSdkVersion?: string;
|
|
60
|
+
readonly xcodeSigningId: string;
|
|
61
|
+
private xcodebuild?: SubProcess;
|
|
62
|
+
private usePrebuiltWDA?: boolean;
|
|
63
|
+
private derivedDataPath?: string;
|
|
64
|
+
private readonly log: AppiumLogger;
|
|
65
|
+
private readonly showXcodeLog?: boolean;
|
|
66
|
+
private readonly xcodeConfigFile?: string;
|
|
67
|
+
private readonly xcodeOrgId?: string;
|
|
68
|
+
private readonly keychainPath?: string;
|
|
69
|
+
private readonly keychainPassword?: string;
|
|
70
|
+
private readonly useSimpleBuildTest?: boolean;
|
|
71
|
+
private readonly useXctestrunFile?: boolean;
|
|
72
|
+
private readonly launchTimeout?: number;
|
|
73
|
+
private readonly wdaRemotePort?: number;
|
|
74
|
+
private readonly wdaBindingIP?: string;
|
|
75
|
+
private readonly updatedWDABundleId?: string;
|
|
76
|
+
private readonly mjpegServerPort?: number;
|
|
77
|
+
private readonly maxHttpRequestBodySize?: number;
|
|
78
|
+
private readonly prebuildDelay: number;
|
|
79
|
+
private readonly allowProvisioningDeviceRegistration?: boolean;
|
|
80
|
+
private readonly resultBundlePath?: string;
|
|
81
|
+
private readonly resultBundleVersion?: string;
|
|
82
|
+
private _didBuildFail: boolean;
|
|
83
|
+
private readonly _buildSettingsPromises = new Map<
|
|
84
|
+
string,
|
|
85
|
+
Promise<XcodeBuildSettings | undefined>
|
|
86
|
+
>();
|
|
87
|
+
private noSessionProxy?: NoSessionProxy;
|
|
88
|
+
private xctestrunFilePath?: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Creates a new XcodeBuild instance.
|
|
92
|
+
* @param device - The Apple device to build for
|
|
93
|
+
* @param args - Configuration arguments for xcodebuild
|
|
94
|
+
* @param log - Optional logger instance
|
|
95
|
+
*/
|
|
96
|
+
constructor(device: AppleDevice, args: XcodeBuildArgs, log: AppiumLogger | null = null) {
|
|
97
|
+
this.device = device;
|
|
98
|
+
this.log = log ?? defaultLogger;
|
|
99
|
+
|
|
100
|
+
this.realDevice = args.realDevice;
|
|
101
|
+
|
|
102
|
+
this.agentPath = args.agentPath;
|
|
103
|
+
this.bootstrapPath = args.bootstrapPath;
|
|
104
|
+
|
|
105
|
+
this.platformVersion = args.platformVersion;
|
|
106
|
+
this.platformName = args.platformName;
|
|
107
|
+
this.iosSdkVersion = args.iosSdkVersion;
|
|
108
|
+
|
|
109
|
+
this.showXcodeLog = args.showXcodeLog;
|
|
110
|
+
|
|
111
|
+
this.xcodeConfigFile = args.xcodeConfigFile;
|
|
112
|
+
this.xcodeOrgId = args.xcodeOrgId;
|
|
113
|
+
this.xcodeSigningId = args.xcodeSigningId || DEFAULT_SIGNING_ID;
|
|
114
|
+
this.keychainPath = args.keychainPath;
|
|
115
|
+
this.keychainPassword = args.keychainPassword;
|
|
116
|
+
|
|
117
|
+
this.usePrebuiltWDA = args.usePrebuiltWDA;
|
|
118
|
+
this.useSimpleBuildTest = args.useSimpleBuildTest;
|
|
119
|
+
|
|
120
|
+
this.useXctestrunFile = args.useXctestrunFile;
|
|
121
|
+
|
|
122
|
+
this.launchTimeout = args.launchTimeout;
|
|
123
|
+
|
|
124
|
+
this.wdaRemotePort = args.wdaRemotePort;
|
|
125
|
+
this.wdaBindingIP = args.wdaBindingIP;
|
|
126
|
+
|
|
127
|
+
this.updatedWDABundleId = args.updatedWDABundleId;
|
|
128
|
+
this.derivedDataPath = args.derivedDataPath;
|
|
129
|
+
|
|
130
|
+
this.mjpegServerPort = args.mjpegServerPort;
|
|
131
|
+
this.maxHttpRequestBodySize = args.maxHttpRequestBodySize;
|
|
132
|
+
|
|
133
|
+
this.prebuildDelay =
|
|
134
|
+
typeof args.prebuildDelay === 'number' ? args.prebuildDelay : PREBUILD_DELAY;
|
|
135
|
+
|
|
136
|
+
this.allowProvisioningDeviceRegistration = args.allowProvisioningDeviceRegistration;
|
|
137
|
+
|
|
138
|
+
this.resultBundlePath = args.resultBundlePath;
|
|
139
|
+
this.resultBundleVersion = args.resultBundleVersion;
|
|
140
|
+
|
|
141
|
+
this._didBuildFail = false;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Initializes the XcodeBuild instance with a no-session proxy.
|
|
146
|
+
* Sets up xctestrun file if needed.
|
|
147
|
+
* @param noSessionProxy - The proxy instance for WDA communication
|
|
148
|
+
*/
|
|
149
|
+
async init(noSessionProxy: NoSessionProxy): Promise<void> {
|
|
150
|
+
this.noSessionProxy = noSessionProxy;
|
|
151
|
+
|
|
152
|
+
if (this.useXctestrunFile) {
|
|
153
|
+
// Keep the caller's udid casing: the canonical case is only for '-destination id=';
|
|
154
|
+
// switching it here would orphan an existing .xctestrun file on case-sensitive filesystems.
|
|
155
|
+
const deviceInfo = {
|
|
156
|
+
isRealDevice: !!this.realDevice,
|
|
157
|
+
udid: this.device.udid,
|
|
158
|
+
platformVersion: this.platformVersion || '',
|
|
159
|
+
platformName: this.platformName || '',
|
|
160
|
+
};
|
|
161
|
+
this.xctestrunFilePath = await setXctestrunFile({
|
|
162
|
+
deviceInfo,
|
|
163
|
+
sdkVersion: this.iosSdkVersion || '',
|
|
164
|
+
bootstrapPath: this.bootstrapPath,
|
|
165
|
+
wdaRemotePort: this.wdaRemotePort || 8100,
|
|
166
|
+
wdaBindingIP: this.wdaBindingIP,
|
|
167
|
+
maxHttpRequestBodySize: this.maxHttpRequestBodySize,
|
|
168
|
+
});
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Retrieves Xcode build settings via `xcodebuild -showBuildSettings -json`.
|
|
175
|
+
* @param options - Optional scheme, SDK, configuration, or destination
|
|
176
|
+
* @returns Build settings for the `build` action, or `undefined` if they cannot be determined
|
|
177
|
+
*/
|
|
178
|
+
async retrieveBuildSettings(
|
|
179
|
+
options?: RetrieveBuildSettingsOptions,
|
|
180
|
+
): Promise<XcodeBuildSettings | undefined> {
|
|
181
|
+
const cacheKey = buildSettingsCacheKey(options);
|
|
182
|
+
let promise = this._buildSettingsPromises.get(cacheKey);
|
|
183
|
+
if (!promise) {
|
|
184
|
+
promise = this.fetchBuildSettings(options);
|
|
185
|
+
this._buildSettingsPromises.set(cacheKey, promise);
|
|
186
|
+
}
|
|
187
|
+
return await promise;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* @returns The derived data path, or `undefined` if it cannot be determined
|
|
192
|
+
*/
|
|
193
|
+
async retrieveDerivedDataPath(): Promise<string | undefined> {
|
|
194
|
+
if (this.derivedDataPath) {
|
|
195
|
+
return this.derivedDataPath;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// iOS/tvOS share the same derived data path
|
|
199
|
+
const buildSettings = await this.retrieveBuildSettings({
|
|
200
|
+
scheme: 'WebDriverAgentRunner',
|
|
201
|
+
});
|
|
202
|
+
const buildDir = buildSettings?.BUILD_DIR;
|
|
203
|
+
if (!buildDir) {
|
|
204
|
+
this.log.warn('Cannot parse WDA BUILD_DIR from build settings');
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
this.log.debug(`Parsed BUILD_DIR configuration value: '${buildDir}'`);
|
|
209
|
+
// Derived data root is two levels higher over the build dir
|
|
210
|
+
this.derivedDataPath = path.dirname(path.dirname(path.normalize(buildDir)));
|
|
211
|
+
this.log.debug(`Got derived data root: '${this.derivedDataPath}'`);
|
|
212
|
+
return this.derivedDataPath;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Pre-builds WebDriverAgent before launching tests.
|
|
217
|
+
* Performs a build-only operation and sets usePrebuiltWDA flag.
|
|
218
|
+
*/
|
|
219
|
+
async prebuild(): Promise<void> {
|
|
220
|
+
// first do a build phase
|
|
221
|
+
this.log.debug('Pre-building WDA before launching test');
|
|
222
|
+
this.usePrebuiltWDA = true;
|
|
223
|
+
await this.start(true);
|
|
224
|
+
|
|
225
|
+
if (this.prebuildDelay > 0) {
|
|
226
|
+
// pause a moment
|
|
227
|
+
await new Promise((resolve) => setTimeout(resolve, this.prebuildDelay));
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Cleans the Xcode project to remove leftovers from previous installs.
|
|
233
|
+
* Cleans both the library and runner schemes for the appropriate platform.
|
|
234
|
+
*/
|
|
235
|
+
async cleanProject(): Promise<void> {
|
|
236
|
+
const schemeSuffix = getPlatformSchemeSuffix(this.platformName || '');
|
|
237
|
+
const libScheme = `WebDriverAgentLib${schemeSuffix}`;
|
|
238
|
+
const runnerScheme = `${RUNNER_SCHEME_IOS}${schemeSuffix}`;
|
|
239
|
+
|
|
240
|
+
for (const scheme of [libScheme, runnerScheme]) {
|
|
241
|
+
this.log.debug(
|
|
242
|
+
`Cleaning the project scheme '${scheme}' to make sure there are no leftovers from previous installs`,
|
|
243
|
+
);
|
|
244
|
+
await exec('xcodebuild', ['clean', '-project', this.agentPath, '-scheme', scheme]);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Starts the xcodebuild process to build and/or test WebDriverAgent.
|
|
250
|
+
* @param buildOnly - If `true`, only builds without running tests. Defaults to `false`.
|
|
251
|
+
* @returns The WDA status record if tests are run, `void` if build-only
|
|
252
|
+
* @throws Error if xcodebuild fails or cannot start
|
|
253
|
+
*/
|
|
254
|
+
async start(buildOnly: boolean = false): Promise<StringRecord | void> {
|
|
255
|
+
this.xcodebuild = await this.createSubProcess(buildOnly);
|
|
256
|
+
|
|
257
|
+
// wrap the start procedure in a promise so that we can catch, and report,
|
|
258
|
+
// any startup errors that are thrown as events
|
|
259
|
+
if (!this.xcodebuild) {
|
|
260
|
+
throw new Error('xcodebuild subprocess was not created');
|
|
261
|
+
}
|
|
262
|
+
const xcodebuild = this.xcodebuild;
|
|
263
|
+
// Exit state belongs to this invocation, including build-only invocations.
|
|
264
|
+
let didProcessExit = false;
|
|
265
|
+
return await new Promise<StringRecord | void>((resolve, reject) => {
|
|
266
|
+
xcodebuild.once('exit', (code, signal) => {
|
|
267
|
+
xcodeLog.error(`xcodebuild exited with code '${code}' and signal '${signal}'`);
|
|
268
|
+
xcodebuild.removeAllListeners();
|
|
269
|
+
didProcessExit = true;
|
|
270
|
+
if (this._didBuildFail || (!signal && code !== 0)) {
|
|
271
|
+
let errorMessage =
|
|
272
|
+
`xcodebuild failed with code ${code}.` +
|
|
273
|
+
` This usually indicates an issue with the local Xcode setup or WebDriverAgent` +
|
|
274
|
+
` project configuration or the driver-to-platform version mismatch.`;
|
|
275
|
+
if (!this.showXcodeLog) {
|
|
276
|
+
errorMessage +=
|
|
277
|
+
` Consider setting 'showXcodeLog' capability to true in` +
|
|
278
|
+
` order to check the Appium server log for build-related error messages.`;
|
|
279
|
+
} else if (this.realDevice) {
|
|
280
|
+
errorMessage +=
|
|
281
|
+
` Consider checking the WebDriverAgent configuration guide` +
|
|
282
|
+
` for real iOS devices at ${REAL_DEVICES_CONFIG_DOCS_LINK}.`;
|
|
283
|
+
}
|
|
284
|
+
return reject(new Error(errorMessage));
|
|
285
|
+
}
|
|
286
|
+
// in the case of just building, the process will exit and that is our finish
|
|
287
|
+
if (buildOnly) {
|
|
288
|
+
return resolve();
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
return (async () => {
|
|
293
|
+
try {
|
|
294
|
+
const timer = new timing.Timer().start();
|
|
295
|
+
if (!xcodebuild) {
|
|
296
|
+
throw new Error('xcodebuild subprocess was not created');
|
|
297
|
+
}
|
|
298
|
+
await xcodebuild.start(true);
|
|
299
|
+
if (!buildOnly) {
|
|
300
|
+
const result = await this.waitForStart(timer, () => didProcessExit);
|
|
301
|
+
resolve(result ?? undefined);
|
|
302
|
+
}
|
|
303
|
+
} catch (err: any) {
|
|
304
|
+
const msg = `Unable to start WebDriverAgent: ${err}`;
|
|
305
|
+
this.log.error(msg);
|
|
306
|
+
reject(new Error(msg));
|
|
307
|
+
}
|
|
308
|
+
})();
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Stops the xcodebuild process and cleans up resources.
|
|
314
|
+
*/
|
|
315
|
+
async quit(): Promise<void> {
|
|
316
|
+
const xcodebuild = this.xcodebuild;
|
|
317
|
+
if (!xcodebuild || !xcodebuild.isRunning) {
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
this.log.info(`Shutting down 'xcodebuild' process (pid '${xcodebuild.proc?.pid}')`);
|
|
322
|
+
|
|
323
|
+
try {
|
|
324
|
+
await xcodebuild.stop('SIGTERM', 1000);
|
|
325
|
+
return;
|
|
326
|
+
} catch (err: unknown) {
|
|
327
|
+
if (!(err as Error)?.message?.includes(`Process didn't end after`)) {
|
|
328
|
+
throw err;
|
|
329
|
+
}
|
|
330
|
+
this.log.debug(
|
|
331
|
+
`xcodebuild process did not end in a timely fashion: '${(err as Error)?.message}'.`,
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
try {
|
|
336
|
+
await xcodebuild.stop('SIGKILL');
|
|
337
|
+
} catch (err: unknown) {
|
|
338
|
+
if ((err as Error)?.message?.includes('not currently running')) {
|
|
339
|
+
// The process ended but for some reason we were not informed.
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
throw err;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
private async fetchBuildSettings(
|
|
347
|
+
options?: RetrieveBuildSettingsOptions,
|
|
348
|
+
): Promise<XcodeBuildSettings | undefined> {
|
|
349
|
+
const schemeLabel = options?.scheme ?? 'default';
|
|
350
|
+
let stdout: string;
|
|
351
|
+
try {
|
|
352
|
+
({stdout} = await exec('xcodebuild', [
|
|
353
|
+
'-project',
|
|
354
|
+
this.agentPath,
|
|
355
|
+
'-showBuildSettings',
|
|
356
|
+
'-json',
|
|
357
|
+
...buildSettingsArgsFromOptions(options),
|
|
358
|
+
]));
|
|
359
|
+
} catch (err: any) {
|
|
360
|
+
this.log.warn(
|
|
361
|
+
`Cannot retrieve WDA build settings for scheme '${schemeLabel}'. Original error: ${err.message}`,
|
|
362
|
+
);
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
let entries: XcodeShowBuildSettingsEntry[];
|
|
367
|
+
try {
|
|
368
|
+
entries = JSON.parse(stdout) as XcodeShowBuildSettingsEntry[];
|
|
369
|
+
} catch (err: any) {
|
|
370
|
+
this.log.warn(
|
|
371
|
+
`Cannot parse WDA build settings for scheme '${schemeLabel}' from ${util.truncateString(stdout, 300)}. ` +
|
|
372
|
+
`Original error: ${err.message}`,
|
|
373
|
+
);
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
const entry = entries.find(({action}) => action === 'build') ?? entries[0];
|
|
378
|
+
if (!entry?.buildSettings) {
|
|
379
|
+
this.log.warn(`Cannot find build settings for scheme '${schemeLabel}'`);
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
return entry.buildSettings;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Best-effort resolves this real device's udid to the case xcodebuild's own
|
|
387
|
+
* `-showdestinations` listing reports it in, so the `-destination id=` argument this class
|
|
388
|
+
* builds does not depend on whatever case the caller happened to pass in — different Apple
|
|
389
|
+
* tooling doesn't agree on udid letter case. Falls back to `device.udid` unchanged on any
|
|
390
|
+
* failure, timeout, or when no destination matches. A no-op for simulators, whose udid is
|
|
391
|
+
* already canonical by construction.
|
|
392
|
+
*/
|
|
393
|
+
private resolveXcodeDeviceUdid(): Promise<string> {
|
|
394
|
+
if (!this.realDevice) {
|
|
395
|
+
return Promise.resolve(this.device.udid);
|
|
396
|
+
}
|
|
397
|
+
// Cache the in-flight promise itself (not just a "did we start" flag), so concurrent callers
|
|
398
|
+
// await the same resolution instead of one of them racing ahead with a value that isn't
|
|
399
|
+
// resolved yet.
|
|
400
|
+
if (!this._xcodeDeviceUdidPromise) {
|
|
401
|
+
this._xcodeDeviceUdidPromise = this.fetchXcodeDeviceUdid();
|
|
402
|
+
}
|
|
403
|
+
return this._xcodeDeviceUdidPromise;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
private async fetchXcodeDeviceUdid(): Promise<string> {
|
|
407
|
+
const runnerScheme = `WebDriverAgentRunner${getPlatformSchemeSuffix(this.platformName || '')}`;
|
|
408
|
+
let stdout: string;
|
|
409
|
+
try {
|
|
410
|
+
({stdout} = await exec(
|
|
411
|
+
'xcodebuild',
|
|
412
|
+
['-showdestinations', '-project', this.agentPath, '-scheme', runnerScheme],
|
|
413
|
+
{
|
|
414
|
+
timeout: XCODE_DEVICE_UDID_RESOLUTION_TIMEOUT_MS,
|
|
415
|
+
},
|
|
416
|
+
));
|
|
417
|
+
} catch (err: any) {
|
|
418
|
+
this.log.debug(
|
|
419
|
+
`Cannot list xcodebuild destinations to resolve the canonical udid case for '${this.device.udid}'. ` +
|
|
420
|
+
`Will use it as is. Original error: ${err.message}`,
|
|
421
|
+
);
|
|
422
|
+
return this.device.udid;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
const udid = this.device.udid.toLowerCase();
|
|
426
|
+
const match = [...stdout.matchAll(/\bid:([0-9A-Fa-f-]+)/g)].find(
|
|
427
|
+
([, id]) => id.toLowerCase() === udid,
|
|
428
|
+
);
|
|
429
|
+
return match?.[1] ?? this.device.udid;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
private getCommand(buildOnly: boolean, resolvedUdid: string): {cmd: string; args: string[]} {
|
|
433
|
+
const cmd = 'xcodebuild';
|
|
434
|
+
const args: string[] = [];
|
|
435
|
+
|
|
436
|
+
// figure out the targets for xcodebuild
|
|
437
|
+
const [buildCmd, testCmd] = this.useSimpleBuildTest
|
|
438
|
+
? ['build', 'test']
|
|
439
|
+
: ['build-for-testing', 'test-without-building'];
|
|
440
|
+
if (buildOnly) {
|
|
441
|
+
args.push(buildCmd);
|
|
442
|
+
} else if (this.usePrebuiltWDA || this.useXctestrunFile) {
|
|
443
|
+
args.push(testCmd);
|
|
444
|
+
} else {
|
|
445
|
+
args.push(buildCmd, testCmd);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
if (this.allowProvisioningDeviceRegistration) {
|
|
449
|
+
// To -allowProvisioningDeviceRegistration flag takes effect, -allowProvisioningUpdates needs to be passed as well.
|
|
450
|
+
args.push('-allowProvisioningUpdates', '-allowProvisioningDeviceRegistration');
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
if (this.resultBundlePath) {
|
|
454
|
+
args.push('-resultBundlePath', this.resultBundlePath);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
if (this.resultBundleVersion) {
|
|
458
|
+
args.push('-resultBundleVersion', this.resultBundleVersion);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
if (this.useXctestrunFile && this.xctestrunFilePath) {
|
|
462
|
+
args.push('-xctestrun', this.xctestrunFilePath);
|
|
463
|
+
} else {
|
|
464
|
+
const runnerScheme = `${RUNNER_SCHEME_IOS}${getPlatformSchemeSuffix(this.platformName || '')}`;
|
|
465
|
+
args.push('-project', this.agentPath, '-scheme', runnerScheme);
|
|
466
|
+
if (this.derivedDataPath) {
|
|
467
|
+
args.push('-derivedDataPath', this.derivedDataPath);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
args.push('-destination', `id=${resolvedUdid}`);
|
|
471
|
+
|
|
472
|
+
const versionMatch = this.platformVersion
|
|
473
|
+
? new RegExp(/^(\d+)\.(\d+)/).exec(this.platformVersion)
|
|
474
|
+
: null;
|
|
475
|
+
if (versionMatch) {
|
|
476
|
+
const deploymentTargetPrefix = getDeploymentTargetPrefix(this.platformName || '');
|
|
477
|
+
args.push(
|
|
478
|
+
`${deploymentTargetPrefix}OS_DEPLOYMENT_TARGET=${versionMatch[1]}.${versionMatch[2]}`,
|
|
479
|
+
);
|
|
480
|
+
} else {
|
|
481
|
+
this.log.warn(
|
|
482
|
+
`Cannot parse major and minor version numbers from platformVersion "${this.platformVersion}". ` +
|
|
483
|
+
'Will build for the default platform instead',
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
if (this.realDevice) {
|
|
488
|
+
if (this.xcodeConfigFile) {
|
|
489
|
+
this.log.debug(`Using Xcode configuration file: '${this.xcodeConfigFile}'`);
|
|
490
|
+
args.push('-xcconfig', this.xcodeConfigFile);
|
|
491
|
+
}
|
|
492
|
+
if (this.xcodeOrgId && this.xcodeSigningId) {
|
|
493
|
+
args.push(
|
|
494
|
+
`DEVELOPMENT_TEAM=${this.xcodeOrgId}`,
|
|
495
|
+
`CODE_SIGN_IDENTITY=${this.xcodeSigningId}`,
|
|
496
|
+
);
|
|
497
|
+
}
|
|
498
|
+
if (this.updatedWDABundleId) {
|
|
499
|
+
args.push(`PRODUCT_BUNDLE_IDENTIFIER=${this.updatedWDABundleId}`);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
if (!process.env.APPIUM_XCUITEST_TREAT_WARNINGS_AS_ERRORS) {
|
|
504
|
+
// This sometimes helps to survive Xcode updates
|
|
505
|
+
args.push('GCC_TREAT_WARNINGS_AS_ERRORS=0');
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// Below option slightly reduces build time in debug build
|
|
509
|
+
// with preventing to generate `/Index/DataStore` which is used by development
|
|
510
|
+
args.push('COMPILER_INDEX_STORE_ENABLE=NO');
|
|
511
|
+
|
|
512
|
+
// Tags this process so resetTestProcesses() can kill only xcodebuild instances
|
|
513
|
+
// this package started, not unrelated ones sharing the same device udid.
|
|
514
|
+
args.push(XCODEBUILD_PROCESS_MARKER);
|
|
515
|
+
|
|
516
|
+
return {cmd, args};
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
private async createSubProcess(buildOnly: boolean = false): Promise<SubProcess> {
|
|
520
|
+
if (!this.useXctestrunFile && this.realDevice && this.keychainPath && this.keychainPassword) {
|
|
521
|
+
await setRealDeviceSecurity(this.keychainPath, this.keychainPassword);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
const resolvedUdid = await this.resolveXcodeDeviceUdid();
|
|
525
|
+
const {cmd, args} = this.getCommand(buildOnly, resolvedUdid);
|
|
526
|
+
this.log.debug(
|
|
527
|
+
`Beginning ${buildOnly ? 'build' : 'test'} with command '${cmd} ${args.join(' ')}' ` +
|
|
528
|
+
`in directory '${this.bootstrapPath}'`,
|
|
529
|
+
);
|
|
530
|
+
const env: Record<string, any> = Object.assign({}, process.env, {
|
|
531
|
+
USE_PORT: this.wdaRemotePort,
|
|
532
|
+
WDA_PRODUCT_BUNDLE_IDENTIFIER: this.updatedWDABundleId || WDA_RUNNER_BUNDLE_ID,
|
|
533
|
+
WDA_PACKAGE_VERSION: PACKAGE_VERSION,
|
|
534
|
+
});
|
|
535
|
+
delete env.MAX_HTTP_REQUEST_BODY_SIZE;
|
|
536
|
+
if (this.maxHttpRequestBodySize) {
|
|
537
|
+
env.MAX_HTTP_REQUEST_BODY_SIZE = this.maxHttpRequestBodySize;
|
|
538
|
+
}
|
|
539
|
+
if (this.mjpegServerPort) {
|
|
540
|
+
// https://github.com/appium/WebDriverAgent/pull/105
|
|
541
|
+
env.MJPEG_SERVER_PORT = this.mjpegServerPort;
|
|
542
|
+
}
|
|
543
|
+
if (this.wdaBindingIP) {
|
|
544
|
+
env.USE_IP = this.wdaBindingIP;
|
|
545
|
+
}
|
|
546
|
+
const upgradeTimestamp = await getWDAUpgradeTimestamp();
|
|
547
|
+
if (upgradeTimestamp) {
|
|
548
|
+
env.UPGRADE_TIMESTAMP = upgradeTimestamp;
|
|
549
|
+
}
|
|
550
|
+
this._didBuildFail = false;
|
|
551
|
+
const xcodebuild = new SubProcess(cmd, args, {
|
|
552
|
+
cwd: this.bootstrapPath,
|
|
553
|
+
env,
|
|
554
|
+
detached: true,
|
|
555
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
556
|
+
});
|
|
557
|
+
|
|
558
|
+
let logXcodeOutput = !!this.showXcodeLog;
|
|
559
|
+
const logMsg =
|
|
560
|
+
typeof this.showXcodeLog === 'boolean'
|
|
561
|
+
? `Output from xcodebuild ${this.showXcodeLog ? 'will' : 'will not'} be logged`
|
|
562
|
+
: 'Output from xcodebuild will only be logged if any errors are present there';
|
|
563
|
+
this.log.debug(`${logMsg}. To change this, use 'showXcodeLog' desired capability`);
|
|
564
|
+
|
|
565
|
+
const onStreamLine = (line: string) => {
|
|
566
|
+
if (this.showXcodeLog === false || IGNORED_ERRORS_PATTERN.test(line)) {
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
// if we have an error we want to output the logs
|
|
570
|
+
// otherwise the failure is inscrutible
|
|
571
|
+
// but do not log permission errors from trying to write to attachments folder
|
|
572
|
+
if (line.includes('Error Domain=')) {
|
|
573
|
+
logXcodeOutput = true;
|
|
574
|
+
// handle case where xcode returns 0 but is failing
|
|
575
|
+
this._didBuildFail = true;
|
|
576
|
+
}
|
|
577
|
+
if (logXcodeOutput) {
|
|
578
|
+
xcodeLog.info(line);
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
for (const streamName of ['stderr', 'stdout']) {
|
|
582
|
+
xcodebuild.on(`line-${streamName}`, onStreamLine);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
return xcodebuild;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
private async waitForStart(
|
|
589
|
+
timer: timing.Timer,
|
|
590
|
+
didProcessExit: () => boolean,
|
|
591
|
+
): Promise<StringRecord | null> {
|
|
592
|
+
// try to connect once every 0.5 seconds, until `launchTimeout` is up
|
|
593
|
+
const timeout = this.launchTimeout || 60000; // Default to 60 seconds if not set
|
|
594
|
+
this.log.debug(`Waiting up to ${timeout}ms for WebDriverAgent to start`);
|
|
595
|
+
let currentStatus: StringRecord | null = null;
|
|
596
|
+
try {
|
|
597
|
+
const retries = Math.trunc(timeout / 500);
|
|
598
|
+
if (!this.noSessionProxy) {
|
|
599
|
+
throw new Error('noSessionProxy was not initialized');
|
|
600
|
+
}
|
|
601
|
+
const noSessionProxy = this.noSessionProxy;
|
|
602
|
+
await retryInterval(retries, 1000, async () => {
|
|
603
|
+
if (didProcessExit()) {
|
|
604
|
+
// there has been an error elsewhere and we need to short-circuit
|
|
605
|
+
return currentStatus;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
const proxyTimeout = noSessionProxy.timeout;
|
|
609
|
+
(noSessionProxy as any).timeout = 1000;
|
|
610
|
+
try {
|
|
611
|
+
currentStatus = (await noSessionProxy.command('/status', 'GET')) as StringRecord;
|
|
612
|
+
this.log.debug(`WebDriverAgent information:`);
|
|
613
|
+
this.log.debug(JSON.stringify(currentStatus, null, 2));
|
|
614
|
+
} catch (err: any) {
|
|
615
|
+
throw new Error(`Unable to connect to running WebDriverAgent: ${err.message}`, {
|
|
616
|
+
cause: err,
|
|
617
|
+
});
|
|
618
|
+
} finally {
|
|
619
|
+
(noSessionProxy as any).timeout = proxyTimeout;
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
|
|
623
|
+
if (didProcessExit()) {
|
|
624
|
+
// there has been an error elsewhere and we need to short-circuit
|
|
625
|
+
return currentStatus;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
this.log.debug(
|
|
629
|
+
`WebDriverAgent successfully started after ${timer.getDuration().asMilliSeconds.toFixed(0)}ms`,
|
|
630
|
+
);
|
|
631
|
+
} catch (err: any) {
|
|
632
|
+
this.log.debug(err.stack);
|
|
633
|
+
throw new Error(
|
|
634
|
+
`We were not able to retrieve the /status response from the WebDriverAgent server after ${timeout}ms timeout.` +
|
|
635
|
+
`Try to increase the value of 'appium:wdaLaunchTimeout' capability as a possible workaround.`,
|
|
636
|
+
{cause: err},
|
|
637
|
+
);
|
|
638
|
+
}
|
|
639
|
+
return currentStatus;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* @returns The `xcodebuild` deployment target setting prefix for the given platform.
|
|
645
|
+
*/
|
|
646
|
+
function getDeploymentTargetPrefix(platformName: string): string {
|
|
647
|
+
if (isTvOS(platformName)) {
|
|
648
|
+
return 'TV';
|
|
649
|
+
}
|
|
650
|
+
if (isWatchOS(platformName)) {
|
|
651
|
+
return 'WATCH';
|
|
652
|
+
}
|
|
653
|
+
return 'IPHONE';
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
function buildSettingsArgsFromOptions(options?: RetrieveBuildSettingsOptions): string[] {
|
|
657
|
+
const args: string[] = [];
|
|
658
|
+
if (!options) {
|
|
659
|
+
return args;
|
|
660
|
+
}
|
|
661
|
+
if (options.scheme) {
|
|
662
|
+
args.push('-scheme', options.scheme);
|
|
663
|
+
}
|
|
664
|
+
if (options.sdk) {
|
|
665
|
+
args.push('-sdk', options.sdk);
|
|
666
|
+
}
|
|
667
|
+
if (options.configuration) {
|
|
668
|
+
args.push('-configuration', options.configuration);
|
|
669
|
+
}
|
|
670
|
+
if (options.destination) {
|
|
671
|
+
args.push('-destination', options.destination);
|
|
672
|
+
}
|
|
673
|
+
return args;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
function buildSettingsCacheKey(options?: RetrieveBuildSettingsOptions): string {
|
|
677
|
+
return buildSettingsArgsFromOptions(options).join('\0');
|
|
678
|
+
}
|