@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,386 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
7
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#import "AxeScanCommands.h"
|
|
11
|
+
#import "AxeAuthCommands.h"
|
|
12
|
+
#import <WebDriverAgentLib/FBRouteRequest.h>
|
|
13
|
+
|
|
14
|
+
#if AUTH
|
|
15
|
+
#import "axeDevToolsXCUI/axeDevToolsXCUI-Swift.h"
|
|
16
|
+
#else
|
|
17
|
+
#import "axeDevToolsXCUI_noauth/axeDevToolsXCUI_noauth-Swift.h"
|
|
18
|
+
#endif
|
|
19
|
+
|
|
20
|
+
#import "MySwiftFramework/MySwiftFramework-Swift.h"
|
|
21
|
+
|
|
22
|
+
@implementation AxeScanCommands
|
|
23
|
+
|
|
24
|
+
#pragma mark - <FBCommandHandler>
|
|
25
|
+
|
|
26
|
+
+ (NSArray *)routes
|
|
27
|
+
{
|
|
28
|
+
return
|
|
29
|
+
@[
|
|
30
|
+
[[FBRoute POST:@"/axeScan"] respondWithTarget:self action:@selector(handleAxeScanCommand:)],
|
|
31
|
+
[[FBRoute POST:@"/axeScan"].withoutSession respondWithTarget:self action:@selector(handleAxeScanCommand:)],
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
#pragma mark - Commands
|
|
36
|
+
|
|
37
|
+
+ (void)warnDeprecatedScanSettings:(NSDictionary *)settings
|
|
38
|
+
{
|
|
39
|
+
if (settings[@"apiKey"]) {
|
|
40
|
+
NSLog(@"[axe-devtools] DEPRECATION: the 'apiKey' settings property is deprecated on the axeScan command and will be removed in a future release. Please pass it to the 'axeStartSession' command once at session start instead.");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (settings[@"licenseKey"]) {
|
|
44
|
+
NSLog(@"[axe-devtools] DEPRECATION: the 'licenseKey' settings property is deprecated on the axeScan command and will be removed in a future release. Please pass it to the 'axeStartSession' command once at session start instead.");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (settings[@"axeAccountURL"]) {
|
|
48
|
+
NSLog(@"[axe-devtools] DEPRECATION: the 'axeAccountURL' settings property is deprecated on the axeScan command and will be removed in a future release. Please pass it to the 'axeStartSession' command once at session start instead.");
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (settings[@"axeServiceUrl"]) {
|
|
52
|
+
NSLog(@"[axe-devtools] DEPRECATION: the 'axeServiceUrl' settings property is deprecated on the axeScan command and will be removed in a future release. Please pass 'axeAccountURL' to the 'axeStartSession' command once at session start instead.");
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (settings[@"projectId"]) {
|
|
56
|
+
NSLog(@"[axe-devtools] DEPRECATION: the 'projectId' settings property is deprecated on the axeScan command and will be removed in a future release. Please pass it to the 'axeStartSession' command once at session start instead.");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (settings[@"uploadToDashboard"]) {
|
|
60
|
+
NSLog(@"[axe-devtools] DEPRECATION: the 'uploadToDashboard' settings property is deprecated and will be removed after the October 2026 release when the mobile dashboard is decommissioned. Please set 'axeUploadResults' on the 'axeStartSession' command instead; uploading requires both flags to stay on, so this property still suppresses uploads on its own.");
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (settings[@"tags"]) {
|
|
64
|
+
NSLog(@"[axe-devtools] DEPRECATION: the 'tags' settings property is deprecated and will be removed after the October 2026 release when the mobile dashboard is decommissioned. Tags only label dashboard uploads and have no effect on local results.");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (settings[@"scanName"]) {
|
|
68
|
+
NSLog(@"[axe-devtools] DEPRECATION: the 'scanName' settings property is deprecated and will be removed after the October 2026 release when the mobile dashboard is decommissioned. Scan names only label dashboard uploads and have no effect on local results.");
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (settings[@"ignoreRules"]) {
|
|
72
|
+
NSLog(@"[axe-devtools] DEPRECATION: the 'ignoreRules' settings property is deprecated on the axeScan command and will be removed in a future release. A session-level replacement has not shipped yet, so please keep using it until one does.");
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (settings[@"ignoreExperimental"]) {
|
|
76
|
+
NSLog(@"[axe-devtools] DEPRECATION: the 'ignoreExperimental' settings property is deprecated on the axeScan command and will be removed in a future release. A session-level replacement has not shipped yet, so please keep using it until one does.");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
+ (id<FBResponsePayload>)handleAxeScanCommand:(FBRouteRequest *)request
|
|
81
|
+
{
|
|
82
|
+
// Warn before any validation so a caller tripping an unrelated error still learns
|
|
83
|
+
// about the sunset. Covers both the authenticate-from-scan and existing-session
|
|
84
|
+
// paths below, which each read these settings separately.
|
|
85
|
+
[self warnDeprecatedScanSettings:request.arguments];
|
|
86
|
+
|
|
87
|
+
AxeDevTools *axeDevTools = [AxeAuthCommands sharedAxeDevTools];
|
|
88
|
+
BOOL hasUploadSession = [AxeAuthCommands sharedHasUploadSession];
|
|
89
|
+
|
|
90
|
+
// If the request provides credentials that differ from the ones used to
|
|
91
|
+
// create the current singleton, invalidate it so re-authentication occurs.
|
|
92
|
+
if (axeDevTools) {
|
|
93
|
+
NSDictionary *incomingSettings = request.arguments;
|
|
94
|
+
NSString *incomingCredential = nil;
|
|
95
|
+
|
|
96
|
+
#if AUTH
|
|
97
|
+
id rawToken = incomingSettings[@"accessToken"];
|
|
98
|
+
if ([rawToken isKindOfClass:[NSString class]] && [rawToken length] > 0) {
|
|
99
|
+
incomingCredential = rawToken;
|
|
100
|
+
} else {
|
|
101
|
+
id rawKey = incomingSettings[@"apiKey"];
|
|
102
|
+
incomingCredential = [rawKey isKindOfClass:[NSString class]] ? rawKey : nil;
|
|
103
|
+
}
|
|
104
|
+
#else
|
|
105
|
+
id rawKey = incomingSettings[@"licenseKey"];
|
|
106
|
+
incomingCredential = [rawKey isKindOfClass:[NSString class]] ? rawKey : nil;
|
|
107
|
+
#endif
|
|
108
|
+
NSString *currentKey = [AxeAuthCommands sharedCredentialKey];
|
|
109
|
+
|
|
110
|
+
if (incomingCredential != nil && ![incomingCredential isEqualToString:currentKey ?: @""]) {
|
|
111
|
+
axeDevTools = nil;
|
|
112
|
+
[AxeAuthCommands setSharedAxeDevTools:nil];
|
|
113
|
+
[AxeAuthCommands setSharedCredentialKey:nil];
|
|
114
|
+
[AxeAuthCommands setSharedHasUploadSession:NO];
|
|
115
|
+
[AxeAuthCommands setSharedUploadResults:YES];
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// TODO: (October release) Remove this if block and any other auth/user-verification steps. Why?: All user verification (auth and no-auth) happens in the axeAuth command now.
|
|
120
|
+
if (!axeDevTools) {
|
|
121
|
+
NSError *loginError = nil;
|
|
122
|
+
NSError *runScanError = nil;
|
|
123
|
+
NSError *postResultError = nil;
|
|
124
|
+
|
|
125
|
+
NSDictionary *settings = request.arguments;
|
|
126
|
+
|
|
127
|
+
// required properties
|
|
128
|
+
NSString *apiKey = settings[@"apiKey"];
|
|
129
|
+
NSString *accessToken = settings[@"accessToken"] ?: @"";
|
|
130
|
+
NSString *bundleId = settings[@"bundleId"];
|
|
131
|
+
#if !AUTH
|
|
132
|
+
NSString *licenseKey = settings[@"licenseKey"];
|
|
133
|
+
#endif
|
|
134
|
+
|
|
135
|
+
// optional properties with default values
|
|
136
|
+
NSString *axeAccountURL = settings[@"axeAccountURL"] ?: @"";
|
|
137
|
+
NSString *axeServiceUrl = settings[@"axeServiceUrl"] ?: @"";
|
|
138
|
+
NSString *scanName = settings[@"scanName"] ?: @"";
|
|
139
|
+
NSArray<NSString *> *tags = settings[@"tags"] ?: @[];
|
|
140
|
+
NSArray<NSString *> *ignoreRules = settings[@"ignoreRules"] ?: @[];
|
|
141
|
+
BOOL ignoreExperimental = [settings[@"ignoreExperimental"] ?: @NO boolValue];
|
|
142
|
+
BOOL uploadToDashboard = [settings[@"uploadToDashboard"] ?: @YES boolValue];
|
|
143
|
+
NSString *projectId = settings[@"projectId"] ?: @"";
|
|
144
|
+
|
|
145
|
+
#if AUTH
|
|
146
|
+
AxeDevToolsResultKey *axeResultKey;
|
|
147
|
+
|
|
148
|
+
if (accessToken.length > 0) {
|
|
149
|
+
// OAuth access token authentication (used by MCP server)
|
|
150
|
+
axeDevTools = [AxeDevTools loginWithAccessToken:accessToken axeAccountUrl:axeAccountURL error:&loginError];
|
|
151
|
+
uploadToDashboard = NO;
|
|
152
|
+
} else {
|
|
153
|
+
if (projectId.length > 0) {
|
|
154
|
+
NSLog(@"[axe-devtools] DEPRECATION: 'projectId' settings property is deprecated in conjunction with the axeScan command and will be removed in a future release from the axeScan command. Please use 'axeStartSession' command to initialize a Dev Hub session using a 'projectId' and then call 'axeScan' command without API key to post to the same session.");
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (axeServiceUrl.length > 0) {
|
|
158
|
+
NSLog(@"[axe-devtools] DEPRECATION: 'axeServiceUrl' settings property is deprecated and will be removed in a future release. Please migrate to 'axeAccountURL'.");
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (uploadToDashboard && axeAccountURL.length > 0 && projectId.length == 0) {
|
|
162
|
+
return FBResponseWithObject(@{ @"axeError": @"'axeAccountURL' requires a 'projectId' in order to start a session. Please provide your project ID from Axe Developer Hub." });
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (uploadToDashboard == NO) {
|
|
166
|
+
// uploadToDashboard is false: authenticate without creating a Dev Hub session.
|
|
167
|
+
// An unpopulated session lingers as a "waiting for data" zombie in Axe Developer
|
|
168
|
+
// Hub, so we validate credentials only and scan locally instead. See #355.
|
|
169
|
+
if (axeAccountURL.length == 0 && axeServiceUrl.length > 0) {
|
|
170
|
+
// serviceUrl-only creds can't use authenticate(); validate via the mobile
|
|
171
|
+
// service instead — no session created (#361). Remove at decommission.
|
|
172
|
+
axeDevTools = [AxeDevTools loginWithAPIKey:apiKey toServer:axeServiceUrl error:&loginError];
|
|
173
|
+
} else {
|
|
174
|
+
axeDevTools = [AxeDevTools authenticateWithApiKey:apiKey axeAccountUrl:axeAccountURL error:&loginError];
|
|
175
|
+
}
|
|
176
|
+
} else if (axeAccountURL.length == 0 && projectId.length > 0 && axeServiceUrl.length > 0) {
|
|
177
|
+
NSLog(@"[axe-devtools] DEPRECATION: The old Mobile Service is being deprecated. Please migrate to Axe Developer Hub and provide a 'projectId' with 'axeAccountURL'.");
|
|
178
|
+
axeDevTools = [AxeDevTools startSessionWithApiKey:apiKey url:axeServiceUrl projectId:projectId error:&loginError];
|
|
179
|
+
} else if (projectId.length > 0) {
|
|
180
|
+
axeDevTools = [AxeDevTools startScanSessionWithApiKey:apiKey axeAccountUrl:axeAccountURL projectId:projectId error:&loginError];
|
|
181
|
+
} else {
|
|
182
|
+
NSLog(@"[axe-devtools] DEPRECATION: The mobile dashboard is being deprecated. Please set up your project in Axe Developer Hub and provide a 'projectId' with 'axeAccountURL'.");
|
|
183
|
+
axeDevTools = [AxeDevTools loginWithAPIKey:apiKey toServer:axeServiceUrl error:&loginError];
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
#else
|
|
188
|
+
axeDevTools = [AxeDevTools loginWithLicenseKey:licenseKey error:&loginError];
|
|
189
|
+
uploadToDashboard = NO;
|
|
190
|
+
#endif
|
|
191
|
+
|
|
192
|
+
if (loginError) {
|
|
193
|
+
NSLog(@"Error logging in: %@", loginError.localizedDescription);
|
|
194
|
+
return FBResponseWithObject(@{ @"axeError" : loginError.localizedDescription});
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
[AxeAuthCommands setSharedAxeDevTools:axeDevTools];
|
|
198
|
+
[AxeAuthCommands setSharedHasUploadSession:(uploadToDashboard && projectId.length > 0)];
|
|
199
|
+
[AxeAuthCommands setSharedUploadResults:uploadToDashboard];
|
|
200
|
+
#if AUTH
|
|
201
|
+
[AxeAuthCommands setSharedCredentialKey:(accessToken.length > 0 ? accessToken : apiKey)];
|
|
202
|
+
#else
|
|
203
|
+
[AxeAuthCommands setSharedCredentialKey:licenseKey];
|
|
204
|
+
#endif
|
|
205
|
+
|
|
206
|
+
[[axeDevTools configuration] ignoreWithRules:ignoreRules :YES];
|
|
207
|
+
|
|
208
|
+
if (ignoreExperimental) {
|
|
209
|
+
[[axeDevTools configuration] ignoreExperimental];
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
AxeResult *axeResult = [axeDevTools runOnBundleIdentifier:bundleId error:&runScanError];
|
|
214
|
+
|
|
215
|
+
if (runScanError) {
|
|
216
|
+
NSLog(@"Error on running scan: %@", runScanError.localizedDescription);
|
|
217
|
+
return FBResponseWithObject(@{ @"axeError" : runScanError.localizedDescription});
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (uploadToDashboard) {
|
|
221
|
+
#if AUTH
|
|
222
|
+
axeResultKey = [axeDevTools postResult:axeResult
|
|
223
|
+
withTags:tags
|
|
224
|
+
withScanName:scanName
|
|
225
|
+
error:&postResultError];
|
|
226
|
+
#endif
|
|
227
|
+
} else {
|
|
228
|
+
axeResult.tags = tags;
|
|
229
|
+
axeResult.scanName = scanName;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (postResultError) {
|
|
233
|
+
NSLog(@"Error sending result: %@", postResultError.localizedDescription);
|
|
234
|
+
return FBResponseWithObject(@{ @"axeError" : postResultError.localizedDescription});
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
id jsonLocalScanResult = nil;
|
|
239
|
+
|
|
240
|
+
@try {
|
|
241
|
+
JSONHelper *helper = [[JSONHelper alloc] init];
|
|
242
|
+
|
|
243
|
+
NSError *jsonError = nil;
|
|
244
|
+
NSData *jsonData = [helper jsonDataFrom:axeResult error:&jsonError];
|
|
245
|
+
|
|
246
|
+
if (jsonError) @throw [NSException exceptionWithName:@"" reason:jsonError.localizedDescription userInfo:nil];
|
|
247
|
+
|
|
248
|
+
NSError *jsonSerializationError = nil;
|
|
249
|
+
jsonLocalScanResult = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingAllowFragments error:&jsonSerializationError];
|
|
250
|
+
|
|
251
|
+
if (jsonSerializationError) @throw [NSException exceptionWithName:@"" reason:jsonSerializationError.localizedDescription userInfo:nil];
|
|
252
|
+
|
|
253
|
+
#if AUTH
|
|
254
|
+
if (uploadToDashboard) {
|
|
255
|
+
NSMutableDictionary *axeResultWithAxeResultKey = [NSMutableDictionary dictionaryWithDictionary:jsonLocalScanResult];
|
|
256
|
+
|
|
257
|
+
axeResultWithAxeResultKey[@"axeResultKey"] = @{
|
|
258
|
+
@"userId": axeResultKey.userId ?: @"",
|
|
259
|
+
@"packageName": axeResultKey.packageName ?: @"",
|
|
260
|
+
@"resultId": axeResultKey.resultId ?: @"",
|
|
261
|
+
@"uuid": axeResultKey.uuid ?: @""
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
return FBResponseWithObject(axeResultWithAxeResultKey);
|
|
265
|
+
}
|
|
266
|
+
#endif
|
|
267
|
+
} @catch(NSException *e) {
|
|
268
|
+
NSString *errorMessage = [NSString stringWithFormat:@"Failed to process local scan result into json format, %@", e.reason];
|
|
269
|
+
return FBResponseWithObject(@{@"axeError": errorMessage });
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
return FBResponseWithObject(jsonLocalScanResult);
|
|
273
|
+
} else {
|
|
274
|
+
// Handles the scenario where someone is already authenticated through the axeStartSession command
|
|
275
|
+
NSError *runScanError = nil;
|
|
276
|
+
NSError *postResultError = nil;
|
|
277
|
+
|
|
278
|
+
NSDictionary *settings = request.arguments;
|
|
279
|
+
|
|
280
|
+
// required properties
|
|
281
|
+
NSString *bundleId = settings[@"bundleId"];
|
|
282
|
+
#if !AUTH
|
|
283
|
+
NSString *licenseKey = settings[@"licenseKey"];
|
|
284
|
+
#endif
|
|
285
|
+
|
|
286
|
+
// optional properties with default values
|
|
287
|
+
NSString *scanName = settings[@"scanName"] ?: @"";
|
|
288
|
+
NSArray<NSString *> *tags = settings[@"tags"] ?: @[];
|
|
289
|
+
NSArray<NSString *> *ignoreRules = settings[@"ignoreRules"] ?: @[];
|
|
290
|
+
BOOL ignoreExperimental = [settings[@"ignoreExperimental"] ?: @NO boolValue];
|
|
291
|
+
BOOL uploadToDashboard = [settings[@"uploadToDashboard"] ?: @YES boolValue];
|
|
292
|
+
|
|
293
|
+
#if AUTH
|
|
294
|
+
AxeDevToolsResultKey *axeResultKey;
|
|
295
|
+
|
|
296
|
+
// The session's choice wins over whatever this request asked for.
|
|
297
|
+
if (![AxeAuthCommands sharedUploadResults]) {
|
|
298
|
+
// An absent 'uploadToDashboard' defaults to YES and carries no intent, so the
|
|
299
|
+
// nil check keeps this off every ordinary local-only scan.
|
|
300
|
+
if (settings[@"uploadToDashboard"] != nil && uploadToDashboard) {
|
|
301
|
+
NSLog(@"[axe-devtools] 'uploadToDashboard' was ignored: this session does not upload results, so the scan is being kept local. Sessions started with 'axeUploadResults' false, and sessions authenticated with an 'accessToken', never upload.");
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
uploadToDashboard = NO;
|
|
305
|
+
}
|
|
306
|
+
#else
|
|
307
|
+
uploadToDashboard = NO;
|
|
308
|
+
#endif
|
|
309
|
+
|
|
310
|
+
[[axeDevTools configuration] ignoreWithRules:ignoreRules :YES];
|
|
311
|
+
|
|
312
|
+
if (ignoreExperimental) {
|
|
313
|
+
[[axeDevTools configuration] ignoreExperimental];
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
#if AUTH
|
|
317
|
+
if (hasUploadSession == YES && uploadToDashboard == NO) {
|
|
318
|
+
NSLog(@"Error on running scan: %@", @"The uploadToDashboard is set to false and projectId is set. Scan should be uploaded to show up in Axe Developer Hub.");
|
|
319
|
+
return FBResponseWithObject(@{ @"axeError" : @"The uploadToDashboard is set to false and projectId is set. Scan should be uploaded to show up in Axe Developer Hub."});
|
|
320
|
+
}
|
|
321
|
+
#endif
|
|
322
|
+
|
|
323
|
+
AxeResult *axeResult = [axeDevTools runOnBundleIdentifier:bundleId error:&runScanError];
|
|
324
|
+
|
|
325
|
+
if (runScanError) {
|
|
326
|
+
NSLog(@"Error on running scan: %@", runScanError.localizedDescription);
|
|
327
|
+
return FBResponseWithObject(@{ @"axeError" : runScanError.localizedDescription});
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
if (uploadToDashboard) {
|
|
331
|
+
#if AUTH
|
|
332
|
+
axeResultKey = [axeDevTools postResult:axeResult
|
|
333
|
+
withTags:tags
|
|
334
|
+
withScanName:scanName
|
|
335
|
+
error:&postResultError];
|
|
336
|
+
#endif
|
|
337
|
+
} else {
|
|
338
|
+
axeResult.tags = tags;
|
|
339
|
+
axeResult.scanName = scanName;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
if (postResultError) {
|
|
343
|
+
NSLog(@"Error sending result: %@", postResultError.localizedDescription);
|
|
344
|
+
return FBResponseWithObject(@{ @"axeError" : postResultError.localizedDescription});
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
id jsonLocalScanResult = nil;
|
|
349
|
+
|
|
350
|
+
@try {
|
|
351
|
+
JSONHelper *helper = [[JSONHelper alloc] init];
|
|
352
|
+
|
|
353
|
+
NSError *jsonError = nil;
|
|
354
|
+
NSData *jsonData = [helper jsonDataFrom:axeResult error:&jsonError];
|
|
355
|
+
|
|
356
|
+
if (jsonError) @throw [NSException exceptionWithName:@"" reason:jsonError.localizedDescription userInfo:nil];
|
|
357
|
+
|
|
358
|
+
NSError *jsonSerializationError = nil;
|
|
359
|
+
jsonLocalScanResult = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingAllowFragments error:&jsonSerializationError];
|
|
360
|
+
|
|
361
|
+
if (jsonSerializationError) @throw [NSException exceptionWithName:@"" reason:jsonSerializationError.localizedDescription userInfo:nil];
|
|
362
|
+
|
|
363
|
+
#if AUTH
|
|
364
|
+
if (uploadToDashboard) {
|
|
365
|
+
NSMutableDictionary *axeResultWithAxeResultKey = [NSMutableDictionary dictionaryWithDictionary:jsonLocalScanResult];
|
|
366
|
+
|
|
367
|
+
axeResultWithAxeResultKey[@"axeResultKey"] = @{
|
|
368
|
+
@"userId": axeResultKey.userId ?: @"",
|
|
369
|
+
@"packageName": axeResultKey.packageName ?: @"",
|
|
370
|
+
@"resultId": axeResultKey.resultId ?: @"",
|
|
371
|
+
@"uuid": axeResultKey.uuid ?: @""
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
return FBResponseWithObject(axeResultWithAxeResultKey);
|
|
375
|
+
}
|
|
376
|
+
#endif
|
|
377
|
+
} @catch(NSException *e) {
|
|
378
|
+
NSString *errorMessage = [NSString stringWithFormat:@"Failed to process local scan result into json format, %@", e.reason];
|
|
379
|
+
return FBResponseWithObject(@{@"axeError": errorMessage });
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
return FBResponseWithObject(jsonLocalScanResult);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
@end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AxeUsageCommands.h
|
|
3
|
+
// WebDriverAgent
|
|
4
|
+
//
|
|
5
|
+
// Copyright © 2026 Facebook. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
#import <WebDriverAgentLib/FBCommandHandler.h>
|
|
11
|
+
|
|
12
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
13
|
+
|
|
14
|
+
/// `POST /axeSetUsage`: records who started the session (`actor`) and which product it came
|
|
15
|
+
/// from (`productComponent`) for MAU attribution, via the SDK's `AxeIntegration.setUsage`.
|
|
16
|
+
/// The driver calls it before every sign-in; it also works without a driver session, so a
|
|
17
|
+
/// product using this WebDriverAgent on its own can set usage too. See dequelabs/AttestIOS#3121.
|
|
18
|
+
@interface AxeUsageCommands : NSObject <FBCommandHandler>
|
|
19
|
+
|
|
20
|
+
/// Checks a request's values against the rules the SDK's `setUsage` applies, so a bad value is
|
|
21
|
+
/// refused with a reason instead of silently dropped by the SDK. Returns the error message, or
|
|
22
|
+
/// nil when both values are valid.
|
|
23
|
+
+ (nullable NSString *)usageErrorForActor:(nullable id)actor productComponent:(nullable id)productComponent;
|
|
24
|
+
|
|
25
|
+
@end
|
|
26
|
+
|
|
27
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AxeUsageCommands.m
|
|
3
|
+
// WebDriverAgent
|
|
4
|
+
//
|
|
5
|
+
// Copyright © 2026 Facebook. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
#import "AxeUsageCommands.h"
|
|
8
|
+
#import <WebDriverAgentLib/FBRouteRequest.h>
|
|
9
|
+
|
|
10
|
+
#if AUTH
|
|
11
|
+
#import "axeDevToolsXCUI/axeDevToolsXCUI-Swift.h"
|
|
12
|
+
#else
|
|
13
|
+
#import "axeDevToolsXCUI_noauth/axeDevToolsXCUI_noauth-Swift.h"
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
@implementation AxeUsageCommands
|
|
17
|
+
|
|
18
|
+
#pragma mark - <FBCommandHandler>
|
|
19
|
+
|
|
20
|
+
+ (NSArray *)routes
|
|
21
|
+
{
|
|
22
|
+
return
|
|
23
|
+
@[
|
|
24
|
+
[[FBRoute POST:@"/axeSetUsage"] respondWithTarget:self action:@selector(handleAxeSetUsageCommand:)],
|
|
25
|
+
[[FBRoute POST:@"/axeSetUsage"].withoutSession respondWithTarget:self action:@selector(handleAxeSetUsageCommand:)],
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
#pragma mark - Commands
|
|
30
|
+
|
|
31
|
+
// The SDK bounds productComponent to 64 Unicode scalars including its 4-scalar "-ios" suffix.
|
|
32
|
+
static const NSUInteger AxeMaxProductComponentScalars = 60;
|
|
33
|
+
|
|
34
|
+
+ (nullable NSString *)usageErrorForActor:(nullable id)actor productComponent:(nullable id)productComponent
|
|
35
|
+
{
|
|
36
|
+
if (![actor isEqual:@"human"] && ![actor isEqual:@"automation"]) {
|
|
37
|
+
return @"actor should be 'human' or 'automation'.";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (![productComponent isKindOfClass:[NSString class]] || [productComponent length] == 0) {
|
|
41
|
+
return @"productComponent should be a non-empty string.";
|
|
42
|
+
}
|
|
43
|
+
NSString *value = productComponent;
|
|
44
|
+
|
|
45
|
+
// Whitespace-only values land here too: trimming them leaves an empty string.
|
|
46
|
+
NSString *trimmed = [value stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
|
47
|
+
if (![trimmed isEqualToString:value]) {
|
|
48
|
+
return @"productComponent should not have leading or trailing whitespace.";
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Control and format characters plus newlines: the same set the SDK rejects.
|
|
52
|
+
NSMutableCharacterSet *disallowed = [[NSCharacterSet controlCharacterSet] mutableCopy];
|
|
53
|
+
[disallowed formUnionWithCharacterSet:[NSCharacterSet newlineCharacterSet]];
|
|
54
|
+
if ([value rangeOfCharacterFromSet:disallowed].location != NSNotFound) {
|
|
55
|
+
return @"productComponent should not contain control or format characters or line separators.";
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// A lone surrogate has no Unicode scalar, so the lossless UTF-32 conversion fails.
|
|
59
|
+
NSData *scalars = [value dataUsingEncoding:NSUTF32LittleEndianStringEncoding allowLossyConversion:NO];
|
|
60
|
+
if (scalars == nil) {
|
|
61
|
+
return @"productComponent should not contain invalid characters.";
|
|
62
|
+
}
|
|
63
|
+
if (scalars.length / 4 > AxeMaxProductComponentScalars) {
|
|
64
|
+
return [NSString stringWithFormat:@"productComponent should be at most %lu Unicode code points.",
|
|
65
|
+
(unsigned long)AxeMaxProductComponentScalars];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return nil;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
+ (id<FBResponsePayload>)handleAxeSetUsageCommand:(FBRouteRequest *)request
|
|
72
|
+
{
|
|
73
|
+
id actorValue = request.arguments[@"actor"];
|
|
74
|
+
id productComponent = request.arguments[@"productComponent"];
|
|
75
|
+
|
|
76
|
+
NSString *error = [self usageErrorForActor:actorValue productComponent:productComponent];
|
|
77
|
+
if (error != nil) {
|
|
78
|
+
return FBResponseWithObject(@{ @"axeError": error });
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// AxeUsageActor crosses the bridge by ordinal, so map the wire string explicitly rather
|
|
82
|
+
// than trusting a number from the caller.
|
|
83
|
+
AxeUsageActor actor = [actorValue isEqual:@"human"] ? AxeUsageActorHuman : AxeUsageActorAutomation;
|
|
84
|
+
|
|
85
|
+
// The SDK appends the platform suffix.
|
|
86
|
+
[AxeIntegration setUsageWithActor:actor productComponent:productComponent];
|
|
87
|
+
return FBResponseWithObject(@{ @"actor": actorValue, @"productComponent": productComponent });
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#import <WebDriverAgentLib/FBCommandHandler.h>
|
|
12
|
+
|
|
13
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
14
|
+
|
|
15
|
+
@interface FBAlertViewCommands : NSObject <FBCommandHandler>
|
|
16
|
+
|
|
17
|
+
@end
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
#import "FBAlertViewCommands.h"
|
|
10
|
+
|
|
11
|
+
#import "FBAlert.h"
|
|
12
|
+
#import "FBRouteRequest.h"
|
|
13
|
+
#import "FBSession.h"
|
|
14
|
+
#import "XCUIApplication+FBHelpers.h"
|
|
15
|
+
|
|
16
|
+
@implementation FBAlertViewCommands
|
|
17
|
+
|
|
18
|
+
#pragma mark - <FBCommandHandler>
|
|
19
|
+
|
|
20
|
+
+ (NSArray *)routes
|
|
21
|
+
{
|
|
22
|
+
return
|
|
23
|
+
@[
|
|
24
|
+
[[FBRoute GET:@"/alert/text"] respondWithTarget:self action:@selector(handleAlertGetTextCommand:)],
|
|
25
|
+
[[FBRoute GET:@"/alert/text"].withoutSession respondWithTarget:self action:@selector(handleAlertGetTextCommand:)],
|
|
26
|
+
[[FBRoute POST:@"/alert/text"] respondWithTarget:self action:@selector(handleAlertSetTextCommand:)],
|
|
27
|
+
[[FBRoute POST:@"/alert/accept"] respondWithTarget:self action:@selector(handleAlertAcceptCommand:)],
|
|
28
|
+
[[FBRoute POST:@"/alert/accept"].withoutSession respondWithTarget:self action:@selector(handleAlertAcceptCommand:)],
|
|
29
|
+
[[FBRoute POST:@"/alert/dismiss"] respondWithTarget:self action:@selector(handleAlertDismissCommand:)],
|
|
30
|
+
[[FBRoute POST:@"/alert/dismiss"].withoutSession respondWithTarget:self action:@selector(handleAlertDismissCommand:)],
|
|
31
|
+
[[FBRoute GET:@"/wda/alert/buttons"] respondWithTarget:self action:@selector(handleGetAlertButtonsCommand:)],
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
#pragma mark - Commands
|
|
37
|
+
|
|
38
|
+
+ (id<FBResponsePayload>)handleAlertGetTextCommand:(FBRouteRequest *)request
|
|
39
|
+
{
|
|
40
|
+
XCUIApplication *application = request.session.activeApplication ?: XCUIApplication.fb_activeApplication;
|
|
41
|
+
NSString *alertText = [FBAlert alertWithApplication:application].text;
|
|
42
|
+
if (!alertText) {
|
|
43
|
+
return FBResponseWithStatus([FBCommandStatus noAlertOpenErrorWithMessage:nil
|
|
44
|
+
traceback:nil]);
|
|
45
|
+
}
|
|
46
|
+
return FBResponseWithObject(alertText);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
+ (id<FBResponsePayload>)handleAlertSetTextCommand:(FBRouteRequest *)request
|
|
50
|
+
{
|
|
51
|
+
FBSession *session = request.session;
|
|
52
|
+
id value = request.arguments[@"value"];
|
|
53
|
+
if (!value) {
|
|
54
|
+
return FBResponseWithStatus([FBCommandStatus invalidArgumentErrorWithMessage:@"Missing 'value' parameter" traceback:nil]);
|
|
55
|
+
}
|
|
56
|
+
FBAlert *alert = [FBAlert alertWithApplication:session.activeApplication];
|
|
57
|
+
NSString *textToType = value;
|
|
58
|
+
if ([value isKindOfClass:[NSArray class]]) {
|
|
59
|
+
textToType = [value componentsJoinedByString:@""];
|
|
60
|
+
}
|
|
61
|
+
[alert typeText:textToType];
|
|
62
|
+
return FBResponseWithOK();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
+ (id<FBResponsePayload>)handleAlertAcceptCommand:(FBRouteRequest *)request
|
|
66
|
+
{
|
|
67
|
+
XCUIApplication *application = request.session.activeApplication ?: XCUIApplication.fb_activeApplication;
|
|
68
|
+
NSString *name = request.arguments[@"name"];
|
|
69
|
+
FBAlert *alert = [FBAlert alertWithApplication:application];
|
|
70
|
+
|
|
71
|
+
if (name) {
|
|
72
|
+
[alert clickAlertButton:name];
|
|
73
|
+
} else {
|
|
74
|
+
[alert accept];
|
|
75
|
+
}
|
|
76
|
+
return FBResponseWithOK();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
+ (id<FBResponsePayload>)handleAlertDismissCommand:(FBRouteRequest *)request
|
|
80
|
+
{
|
|
81
|
+
XCUIApplication *application = request.session.activeApplication ?: XCUIApplication.fb_activeApplication;
|
|
82
|
+
NSString *name = request.arguments[@"name"];
|
|
83
|
+
FBAlert *alert = [FBAlert alertWithApplication:application];
|
|
84
|
+
|
|
85
|
+
if (name) {
|
|
86
|
+
[alert clickAlertButton:name];
|
|
87
|
+
} else {
|
|
88
|
+
[alert dismiss];
|
|
89
|
+
}
|
|
90
|
+
return FBResponseWithOK();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
+ (id<FBResponsePayload>)handleGetAlertButtonsCommand:(FBRouteRequest *)request {
|
|
94
|
+
FBSession *session = request.session;
|
|
95
|
+
FBAlert *alert = [FBAlert alertWithApplication:session.activeApplication];
|
|
96
|
+
|
|
97
|
+
NSArray *labels = alert.buttonLabels;
|
|
98
|
+
if (!labels) {
|
|
99
|
+
return FBResponseWithStatus([FBCommandStatus noAlertOpenErrorWithMessage:nil
|
|
100
|
+
traceback:nil]);
|
|
101
|
+
}
|
|
102
|
+
return FBResponseWithObject(labels);
|
|
103
|
+
}
|
|
104
|
+
@end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#import <WebDriverAgentLib/FBCommandHandler.h>
|
|
12
|
+
|
|
13
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
14
|
+
|
|
15
|
+
@interface FBCustomCommands : NSObject <FBCommandHandler>
|
|
16
|
+
|
|
17
|
+
@end
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_END
|