├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── Cartfile ├── Cartfile.resolved ├── Configurations └── ProjectSettings.xcconfig ├── Inspector ├── .eslintignore ├── .eslintrc ├── .flowconfig ├── assets │ └── IPhone_5.png ├── css │ ├── app.css │ ├── device.css │ ├── inspector.css │ ├── screen.css │ └── tree.css ├── index.html ├── js │ ├── app.js │ ├── device_list.js │ ├── gesture_recognizer.js │ ├── http.js │ ├── image_utils.js │ ├── inspector.js │ ├── screen.js │ ├── screenshot_factory.js │ ├── tree.js │ ├── tree_context.js │ └── tree_node.js ├── package-lock.json ├── package.json ├── server.js └── webpack.config.js ├── LICENSE ├── PATENTS ├── Podfile ├── Podfile.lock ├── Pods ├── Headers │ ├── Private │ │ └── SDVersion │ │ │ ├── SDVersion.h │ │ │ └── SDiOSVersion.h │ └── Public │ │ └── SDVersion │ │ ├── SDVersion.h │ │ └── SDiOSVersion.h ├── Manifest.lock ├── Pods.xcodeproj │ └── project.pbxproj ├── SDVersion │ ├── LICENSE │ ├── README.md │ └── SDVersion │ │ ├── SDVersion.h │ │ └── SDiOSVersion │ │ ├── SDiOSVersion.h │ │ └── SDiOSVersion.m └── Target Support Files │ ├── Pods-IntegrationApp │ ├── Pods-IntegrationApp-acknowledgements.markdown │ ├── Pods-IntegrationApp-acknowledgements.plist │ ├── Pods-IntegrationApp-dummy.m │ ├── Pods-IntegrationApp-frameworks.sh │ ├── Pods-IntegrationApp-resources.sh │ ├── Pods-IntegrationApp.debug.xcconfig │ └── Pods-IntegrationApp.release.xcconfig │ ├── Pods-WebDriverAgentLib │ ├── Pods-WebDriverAgentLib-acknowledgements.markdown │ ├── Pods-WebDriverAgentLib-acknowledgements.plist │ ├── Pods-WebDriverAgentLib-dummy.m │ ├── Pods-WebDriverAgentLib-resources.sh │ ├── Pods-WebDriverAgentLib.debug.xcconfig │ └── Pods-WebDriverAgentLib.release.xcconfig │ └── SDVersion │ ├── SDVersion-dummy.m │ ├── SDVersion-prefix.pch │ └── SDVersion.xcconfig ├── PrivateHeaders └── XCTest │ ├── CDStructures.h │ ├── NSString-XCTAdditions.h │ ├── NSValue-XCTestAdditions.h │ ├── UIGestureRecognizer-RecordingAdditions.h │ ├── UILongPressGestureRecognizer-RecordingAdditions.h │ ├── UIPanGestureRecognizer-RecordingAdditions.h │ ├── UIPinchGestureRecognizer-RecordingAdditions.h │ ├── UISwipeGestureRecognizer-RecordingAdditions.h │ ├── UITapGestureRecognizer-RecordingAdditions.h │ ├── XCAXClient_iOS.h │ ├── XCAccessibilityElement.h │ ├── XCActivityRecord.h │ ├── XCApplicationMonitor.h │ ├── XCApplicationMonitor_iOS.h │ ├── XCApplicationQuery.h │ ├── XCDebugLogDelegate-Protocol.h │ ├── XCDeviceEvent.h │ ├── XCElementSnapshot.h │ ├── XCEventGenerator.h │ ├── XCKeyMappingPath.h │ ├── XCKeyboardInputSolver.h │ ├── XCKeyboardKeyMap.h │ ├── XCKeyboardLayout.h │ ├── XCPointerEvent.h │ ├── XCPointerEventPath.h │ ├── XCSourceCodeRecording.h │ ├── XCSourceCodeTreeNode.h │ ├── XCSourceCodeTreeNodeEnumerator.h │ ├── XCSymbolicationRecord.h │ ├── XCSymbolicatorHolder.h │ ├── XCSynthesizedEventRecord.h │ ├── XCTAXClient-Protocol.h │ ├── XCTAsyncActivity-Protocol.h │ ├── XCTAsyncActivity.h │ ├── XCTAutomationTarget-Protocol.h │ ├── XCTDarwinNotificationExpectation.h │ ├── XCTKVOExpectation.h │ ├── XCTMetric.h │ ├── XCTNSNotificationExpectation.h │ ├── XCTNSPredicateExpectation.h │ ├── XCTNSPredicateExpectationObject-Protocol.h │ ├── XCTRunnerAutomationSession.h │ ├── XCTRunnerDaemonSession.h │ ├── XCTRunnerIDESession.h │ ├── XCTTestRunSession.h │ ├── XCTTestRunSessionDelegate-Protocol.h │ ├── XCTUIApplicationMonitor-Protocol.h │ ├── XCTWaiter.h │ ├── XCTWaiterDelegate-Protocol.h │ ├── XCTWaiterDelegatePrivate-Protocol.h │ ├── XCTWaiterManagement-Protocol.h │ ├── XCTWaiterManager.h │ ├── XCTest.h │ ├── XCTestCase.h │ ├── XCTestCaseRun.h │ ├── XCTestCaseSuite.h │ ├── XCTestConfiguration.h │ ├── XCTestContext.h │ ├── XCTestContextScope.h │ ├── XCTestDriver.h │ ├── XCTestDriverInterface-Protocol.h │ ├── XCTestExpectation.h │ ├── XCTestExpectationDelegate-Protocol.h │ ├── XCTestExpectationWaiter.h │ ├── XCTestLog.h │ ├── XCTestManager_IDEInterface-Protocol.h │ ├── XCTestManager_ManagerInterface-Protocol.h │ ├── XCTestManager_TestsInterface-Protocol.h │ ├── XCTestMisuseObserver.h │ ├── XCTestObservation-Protocol.h │ ├── XCTestObservationCenter.h │ ├── XCTestObserver.h │ ├── XCTestProbe.h │ ├── XCTestRun.h │ ├── XCTestSuite.h │ ├── XCTestSuiteRun.h │ ├── XCTestWaiter.h │ ├── XCUIApplication.h │ ├── XCUIApplicationImpl.h │ ├── XCUIApplicationProcess.h │ ├── XCUICoordinate.h │ ├── XCUIDevice.h │ ├── XCUIElement.h │ ├── XCUIElementAsynchronousHandlerWrapper.h │ ├── XCUIElementHitPointCoordinate.h │ ├── XCUIElementQuery.h │ ├── XCUIRecorderNodeFinder.h │ ├── XCUIRecorderNodeFinderMatch.h │ ├── XCUIRecorderTimingMessage.h │ ├── XCUIRecorderUtilities.h │ ├── XCUIScreen.h │ ├── _XCInternalTestRun.h │ ├── _XCKVOExpectationImplementation.h │ ├── _XCTDarwinNotificationExpectationImplementation.h │ ├── _XCTNSNotificationExpectationImplementation.h │ ├── _XCTNSPredicateExpectationImplementation.h │ ├── _XCTWaiterImpl.h │ ├── _XCTestCaseImplementation.h │ ├── _XCTestCaseInterruptionException.h │ ├── _XCTestExpectationImplementation.h │ ├── _XCTestImplementation.h │ ├── _XCTestObservationCenterImplementation.h │ └── _XCTestSuiteImplementation.h ├── README.md ├── Scripts ├── bootstrap.sh ├── build-socket.sh ├── build.sh └── start-server.sh ├── WebDriverAgent.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ ├── WebDriverAgentLib.xcscheme │ ├── WebDriverAgentRunner-nodebug.xcscheme │ └── WebDriverAgentRunner.xcscheme ├── WebDriverAgent.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── WebDriverAgentLib ├── Categories │ ├── NSExpression+FBFormat.h │ ├── NSExpression+FBFormat.m │ ├── NSString+FBVisualLength.h │ ├── NSString+FBVisualLength.m │ ├── NSString+FBXMLSafeString.h │ ├── NSString+FBXMLSafeString.m │ ├── XCElementSnapshot+FBHelpers.h │ ├── XCElementSnapshot+FBHelpers.m │ ├── XCElementSnapshot+FBHitPoint.h │ ├── XCElementSnapshot+FBHitPoint.m │ ├── XCUIApplication+FBHelpers.h │ ├── XCUIApplication+FBHelpers.m │ ├── XCUICoordinate+FBFix.h │ ├── XCUICoordinate+FBFix.m │ ├── XCUIDevice+FBHealthCheck.h │ ├── XCUIDevice+FBHealthCheck.m │ ├── XCUIDevice+FBHelpers.h │ ├── XCUIDevice+FBHelpers.m │ ├── XCUIDevice+FBRotation.h │ ├── XCUIDevice+FBRotation.m │ ├── XCUIElement+FBAccessibility.h │ ├── XCUIElement+FBAccessibility.m │ ├── XCUIElement+FBClassChain.h │ ├── XCUIElement+FBClassChain.m │ ├── XCUIElement+FBFind.h │ ├── XCUIElement+FBFind.m │ ├── XCUIElement+FBIsVisible.h │ ├── XCUIElement+FBIsVisible.m │ ├── XCUIElement+FBPickerWheel.h │ ├── XCUIElement+FBPickerWheel.m │ ├── XCUIElement+FBScrolling.h │ ├── XCUIElement+FBScrolling.m │ ├── XCUIElement+FBTap.h │ ├── XCUIElement+FBTap.m │ ├── XCUIElement+FBTyping.h │ ├── XCUIElement+FBTyping.m │ ├── XCUIElement+FBUID.h │ ├── XCUIElement+FBUID.m │ ├── XCUIElement+FBUtilities.h │ ├── XCUIElement+FBUtilities.m │ ├── XCUIElement+FBWebDriverAttributes.h │ └── XCUIElement+FBWebDriverAttributes.m ├── Commands │ ├── FBAlertViewCommands.h │ ├── FBAlertViewCommands.m │ ├── FBCustomCommands.h │ ├── FBCustomCommands.m │ ├── FBDebugCommands.h │ ├── FBDebugCommands.m │ ├── FBElementCommands.h │ ├── FBElementCommands.m │ ├── FBFindElementCommands.h │ ├── FBFindElementCommands.m │ ├── FBInspectorCommands.h │ ├── FBInspectorCommands.m │ ├── FBOrientationCommands.h │ ├── FBOrientationCommands.m │ ├── FBScreenshotCommands.h │ ├── FBScreenshotCommands.m │ ├── FBSessionCommands.h │ ├── FBSessionCommands.m │ ├── FBTouchIDCommands.h │ ├── FBTouchIDCommands.m │ ├── FBUnknownCommands.h │ └── FBUnknownCommands.m ├── FBAlert.h ├── FBAlert.m ├── FBApplication.h ├── FBApplication.m ├── FBApplicationProcessProxy.h ├── FBApplicationProcessProxy.m ├── FBSpringboardApplication.h ├── FBSpringboardApplication.m ├── Info.plist ├── Routing │ ├── FBCommandHandler.h │ ├── FBCommandStatus.h │ ├── FBElement.h │ ├── FBElementCache.h │ ├── FBElementCache.m │ ├── FBElementUtils.h │ ├── FBElementUtils.m │ ├── FBExceptionHandler.h │ ├── FBExceptionHandler.m │ ├── FBResponseFilePayload.h │ ├── FBResponseFilePayload.m │ ├── FBResponseJSONPayload.h │ ├── FBResponseJSONPayload.m │ ├── FBResponsePayload.h │ ├── FBResponsePayload.m │ ├── FBRoute.h │ ├── FBRoute.m │ ├── FBRouteRequest-Private.h │ ├── FBRouteRequest.h │ ├── FBRouteRequest.m │ ├── FBRouteResponse.h │ ├── FBRouteResponse.m │ ├── FBSession-Private.h │ ├── FBSession.h │ ├── FBSession.m │ ├── FBWebServer.h │ ├── FBWebServer.m │ ├── FBWebSocket.h │ ├── FBWebSocket.m │ ├── WebSocketScreenCasting.h │ └── WebSocketScreenCasting.m ├── Utilities │ ├── FBClassChainQueryParser.h │ ├── FBClassChainQueryParser.m │ ├── FBConfiguration.h │ ├── FBConfiguration.m │ ├── FBDebugLogDelegateDecorator.h │ ├── FBDebugLogDelegateDecorator.m │ ├── FBElementTypeTransformer.h │ ├── FBElementTypeTransformer.m │ ├── FBErrorBuilder.h │ ├── FBErrorBuilder.m │ ├── FBFailureProofTestCase.h │ ├── FBFailureProofTestCase.m │ ├── FBKeyboard.h │ ├── FBKeyboard.m │ ├── FBLogger.h │ ├── FBLogger.m │ ├── FBMacros.h │ ├── FBMathUtils.h │ ├── FBMathUtils.m │ ├── FBPredicate.h │ ├── FBPredicate.m │ ├── FBRunLoopSpinner.h │ ├── FBRunLoopSpinner.m │ ├── FBRuntimeUtils.h │ ├── FBRuntimeUtils.m │ ├── FBXCTestCaseImplementationFailureHoldingProxy.h │ ├── FBXCTestCaseImplementationFailureHoldingProxy.m │ ├── FBXCTestDaemonsProxy.h │ ├── FBXCTestDaemonsProxy.m │ ├── FBXCodeCompatibility.h │ ├── FBXCodeCompatibility.m │ ├── FBXPath-Private.h │ ├── FBXPath.h │ ├── FBXPath.m │ ├── FBXPathCreator.h │ ├── FBXPathCreator.m │ ├── NSPredicate+FBFormat.h │ ├── NSPredicate+FBFormat.m │ ├── XCTestPrivateSymbols.h │ └── XCTestPrivateSymbols.m └── WebDriverAgentLib.h ├── WebDriverAgentRunner ├── Info.plist └── UITestingUITests.m ├── WebDriverAgentTests ├── IntegrationApp │ ├── Classes │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── FBAlertViewController.h │ │ ├── FBAlertViewController.m │ │ ├── FBNavigationController.h │ │ ├── FBNavigationController.m │ │ ├── FBScrollViewController.h │ │ ├── FBScrollViewController.m │ │ ├── FBTableDataSource.h │ │ ├── FBTableDataSource.m │ │ ├── ViewController.h │ │ └── ViewController.m │ ├── Info.plist │ ├── Resources │ │ └── Base.lproj │ │ │ └── Main.storyboard │ └── main.m ├── IntegrationTests │ ├── FBAlertTests.m │ ├── FBElementAttributeTests.m │ ├── FBElementScreenshotTests.m │ ├── FBElementVisibilityTests.m │ ├── FBFailureProofTestCaseTests.m │ ├── FBIntegrationTestCase.h │ ├── FBIntegrationTestCase.m │ ├── FBKeyboardTests.m │ ├── FBPickerWheelSelectTests.m │ ├── FBScrollingTests.m │ ├── FBTapTest.m │ ├── FBTestMacros.h │ ├── FBTypingTest.m │ ├── FBXPathIntegrationTests.m │ ├── Info.plist │ ├── XCElementSnapshotHelperTests.m │ ├── XCElementSnapshotHitPointTests.m │ ├── XCUIApplicationHelperTests.m │ ├── XCUIDeviceHealthCheckTests.m │ ├── XCUIDeviceHelperTests.m │ ├── XCUIDeviceRotationTests.m │ ├── XCUIElementAttributesTests.m │ ├── XCUIElementFBFindTests.m │ └── XCUIElementHelperIntegrationTests.m └── UnitTests │ ├── Doubles │ ├── FBApplicationDouble.h │ ├── FBApplicationDouble.m │ ├── XCUIElementDouble.h │ └── XCUIElementDouble.m │ ├── FBClassChainTests.m │ ├── FBConfigurationTests.m │ ├── FBElementCacheTests.m │ ├── FBElementTypeTransformerTests.m │ ├── FBElementUtilitiesTests.m │ ├── FBErrorBuilderTests.m │ ├── FBMathUtilsTests.m │ ├── FBRouteTests.m │ ├── FBRunLoopSpinnerTests.m │ ├── FBRuntimeUtilsTests.m │ ├── FBSDKVersionTests.m │ ├── FBSessionTests.m │ ├── FBXMLSafeStringTests.m │ ├── FBXPathCreatorTests.m │ ├── FBXPathTests.m │ ├── Info.plist │ ├── NSExpressionFBFormatTests.m │ ├── NSPredicateFBFormatTests.m │ ├── XCUICoordinateFix.m │ └── XCUIElementHelpersTests.m └── npm-debug.log /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | # 6 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 7 | Podfile.lock 8 | Pods/* 9 | WebDriverAgent.xcodeproj/* 10 | 11 | 12 | ## Build generated 13 | build/ 14 | clang/ 15 | DerivedData 16 | 17 | ## Various settings 18 | *.pbxuser 19 | !default.pbxuser 20 | *.mode1v3 21 | !default.mode1v3 22 | *.mode2v3 23 | !default.mode2v3 24 | *.perspectivev3 25 | !default.perspectivev3 26 | xcuserdata 27 | 28 | ## Other 29 | *.xccheckout 30 | *.moved-aside 31 | *.xcuserstate 32 | *.xcscmblueprint 33 | 34 | ## Obj-C/Swift specific 35 | *.hmap 36 | *.ipa 37 | 38 | # AppCode 39 | .idea/ 40 | 41 | # Carthage 42 | Carthage/Build 43 | Carthage/Checkouts 44 | Carthage/Cartfile.resolved 45 | 46 | # Inspector files 47 | Inspector/node_modules 48 | Inspector/dist 49 | 50 | # Resource bundle recreated on each build 51 | Resources/WebDriverAgent.bundle 52 | 53 | # Modules map recreated on each build 54 | Modules/module.modulemap 55 | 56 | # test run 57 | *.trace 58 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode9.2 3 | sudo: false 4 | 5 | cache: 6 | directories: 7 | - Carthage 8 | - Inspector/node_modules 9 | 10 | script: ./Scripts/build.sh 11 | 12 | branches: 13 | only: 14 | - master 15 | 16 | env: 17 | # Builds 18 | - ACTION=build TARGET=runner SDK=sim 19 | - ACTION=build TARGET=runner SDK=device 20 | 21 | # Analyze 22 | - ACTION=analyze TARGET=lib SDK=sim 23 | - ACTION=analyze TARGET=runner SDK=sim 24 | 25 | # Unit tests 26 | - ACTION=unit_test DEST=iphone TARGET=lib SDK=sim 27 | - ACTION=unit_test DEST=ipad TARGET=lib SDK=sim 28 | 29 | # Integration tests iPhone 30 | - ACTION=int_test_1 DEST=iphone TARGET=lib SDK=sim 31 | - ACTION=int_test_2 DEST=iphone TARGET=lib SDK=sim 32 | - ACTION=int_test_3 DEST=iphone TARGET=lib SDK=sim 33 | 34 | # Integration tests iPad 35 | - ACTION=int_test_1 DEST=ipad TARGET=lib SDK=sim 36 | - ACTION=int_test_2 DEST=ipad TARGET=lib SDK=sim 37 | - ACTION=int_test_3 DEST=ipad TARGET=lib SDK=sim 38 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to WebDriverAgent 2 | We want to make contributing to this project as easy and transparent as 3 | possible. 4 | 5 | ## Pull Requests 6 | We actively welcome your pull requests. 7 | 8 | 1. Fork the repo and create your branch from `master`. 9 | 2. If you've added code that should be tested, add tests 10 | 3. If you've changed APIs, update the documentation. 11 | 4. Ensure the test suite passes. 12 | 5. Make sure your code lints. 13 | 6. If you haven't already, complete the Contributor License Agreement ("CLA"). 14 | 15 | ## Contributor License Agreement ("CLA") 16 | In order to accept your pull request, we need you to submit a CLA. You only need 17 | to do this once to work on any of Facebook's open source projects. 18 | 19 | Complete your CLA here: 20 | 21 | ## Issues 22 | We use GitHub issues to track public bugs. Please ensure your description is 23 | clear and has sufficient instructions to be able to reproduce the issue. 24 | 25 | Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe 26 | disclosure of security bugs. In those cases, please go through the process 27 | outlined on that page and do not file a public issue. 28 | 29 | ## Coding Style 30 | * 2 spaces for indentation rather than tabs 31 | * 80 character line length 32 | 33 | ## License 34 | By contributing to WebDriverAgent, you agree that your contributions will be licensed 35 | under its [BSD license](LICENSE). 36 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | # Used for HTTP routing 2 | github "marekcirkos/RoutingHTTPServer" 3 | github "socketio/socket.io-client-swift" ~> 13.1.0 4 | github "joeldev/JLRoutes" 5 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "daltoniam/Starscream" "3.0.3" 2 | github "daltoniam/common-crypto-spm" "1.1.0" 3 | github "daltoniam/zlib-spm" "1.1.0" 4 | github "joeldev/JLRoutes" "2.1" 5 | github "marekcirkos/RoutingHTTPServer" "v1.0.1" 6 | github "socketio/socket.io-client-swift" "v13.1.1" 7 | -------------------------------------------------------------------------------- /Configurations/ProjectSettings.xcconfig: -------------------------------------------------------------------------------- 1 | 2 | GCC_TREAT_WARNINGS_AS_ERRORS = YES 3 | GCC_WARN_PEDANTIC = YES 4 | GCC_WARN_SHADOW = YES 5 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES 6 | GCC_WARN_MISSING_PARENTHESES = YES 7 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES 8 | GCC_WARN_SIGN_COMPARE = YES 9 | GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES 10 | GCC_WARN_UNUSED_PARAMETER = YES 11 | GCC_WARN_UNUSED_VALUE = YES 12 | GCC_WARN_UNUSED_VARIABLE = YES 13 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES 14 | 15 | CLANG_ANALYZER_NONNULL = YES 16 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 17 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 18 | CLANG_WARN_ENUM_CONVERSION = YES 19 | CLANG_WARN_INT_CONVERSION = YES 20 | CLANG_WARN_ASSIGN_ENUM = YES 21 | CLANG_WARN_BOOL_CONVERSION = YES 22 | CLANG_WARN_CONSTANT_CONVERSION = YES 23 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES 24 | 25 | RUN_CLANG_STATIC_ANALYZER = YES 26 | 27 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) 28 | 29 | WARNING_CFLAGS = $(inherited) -Weverything -Wno-objc-missing-property-synthesis -Wno-unused-macros -Wno-disabled-macro-expansion -Wno-gnu-statement-expression -Wno-language-extension-token -Wno-overriding-method-mismatch -Wno-missing-variable-declarations -Rno-module-build -Wno-auto-import -Wno-objc-interface-ivars -Wno-documentation-unknown-command -Wno-reserved-id-macro -Wno-unused-parameter -Wno-gnu-conditional-omitted-operand -Wno-explicit-ownership-type -Wno-date-time -Wno-cast-align -Wno-cstring-format-directive -Wno-double-promotion -Wno-partial-availability 30 | -------------------------------------------------------------------------------- /Inspector/.eslintignore: -------------------------------------------------------------------------------- 1 | **/node_modules/**/.*js 2 | -------------------------------------------------------------------------------- /Inspector/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | .*node_modules/fbjs/.* 3 | 4 | [include] 5 | 6 | [libs] 7 | 8 | [options] 9 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 10 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe 11 | esproposal.class_static_fields=enable 12 | 13 | [version] 14 | ^0.73.0 15 | -------------------------------------------------------------------------------- /Inspector/assets/IPhone_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishPatwari/WebDriverAgent/7c0130b21fec08b3304a58df68a5612b20b0575b/Inspector/assets/IPhone_5.png -------------------------------------------------------------------------------- /Inspector/css/app.css: -------------------------------------------------------------------------------- 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 | html, body, #app { 11 | font-family: sans-serif; 12 | width: 100%; 13 | height: 100%; 14 | margin: 0px; 15 | padding: 0px; 16 | } 17 | 18 | .section { 19 | position: absolute; 20 | width: 33%; 21 | height: 100%; 22 | padding: 0px; 23 | border: 1px solid #D5DCDE; 24 | border-right: 0; 25 | } 26 | 27 | .section.first { 28 | } 29 | 30 | .section.second { 31 | margin-left: 33%; 32 | } 33 | 34 | .section.third { 35 | margin-left: 66%; 36 | } 37 | 38 | .section-caption { 39 | display: block; 40 | text-align: center; 41 | padding: 20px; 42 | font-size: 200%; 43 | font-weight: bold; 44 | border-bottom: 1px solid #D5DCDE; 45 | } 46 | 47 | .section-content-container { 48 | padding: 10px; 49 | padding-top: 25px; 50 | } 51 | 52 | .section-content { 53 | } 54 | -------------------------------------------------------------------------------- /Inspector/css/device.css: -------------------------------------------------------------------------------- 1 | .no-device { 2 | text-align: center; 3 | width: 100%; 4 | height: 100%; 5 | font-weight: bold; 6 | } 7 | .device-list-container { 8 | padding: 10px; 9 | } 10 | .device-list { 11 | list-style-type : none; 12 | } 13 | .device-list li { 14 | float: left; 15 | background: white; 16 | border-radius: 8px; 17 | border: 1px solid #e9e9e9; 18 | clear: none; 19 | margin: 6px; 20 | padding: 4px; 21 | text-align: center; 22 | cursor: pointer; 23 | } 24 | 25 | .device-list li blocked { 26 | opacity: 0.6; 27 | cursor: not-allowed; 28 | } 29 | .device-img { 30 | width: auto; 31 | height: 90px; 32 | max-width: 95%; 33 | margin-top: 8px; 34 | margin-bottom: 10px; 35 | } 36 | .blocked > .device-img { 37 | opacity: 0.3; 38 | } 39 | .device-desc { 40 | color:#3FA9F5; 41 | font-size:16px; 42 | text-overflow: ellipsis; 43 | overflow: hidden; 44 | } 45 | .blocked > .device-desc { 46 | color: #3FA9BD; 47 | } -------------------------------------------------------------------------------- /Inspector/css/inspector.css: -------------------------------------------------------------------------------- 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 | .inspector-field { 11 | margin-bottom: 5px; 12 | } 13 | 14 | .inspector-field-caption { 15 | font-weight: bold; 16 | } 17 | 18 | .inspector-field-value { 19 | font-family: monospace; 20 | } 21 | -------------------------------------------------------------------------------- /Inspector/css/screen.css: -------------------------------------------------------------------------------- 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 | .screen-screenshot-container { 11 | border: 1px solid #D5DCDE; 12 | margin: 0 auto; 13 | padding: 0px; 14 | } 15 | 16 | .screen-screenshot { 17 | position: relative; 18 | } 19 | 20 | .screen-highlighted-node { 21 | position: relative; 22 | background: #FBB2C2; 23 | opacity: 0.8; 24 | } 25 | -------------------------------------------------------------------------------- /Inspector/css/tree.css: -------------------------------------------------------------------------------- 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 | .section.second .section-content-container { 11 | padding-top: 0px; 12 | } 13 | 14 | .tree-container { 15 | overflow-y: auto; 16 | max-height: 600px; 17 | } 18 | 19 | .tree-header { 20 | height: 25px; 21 | } 22 | 23 | .tree-node { 24 | font-family: monospace; 25 | cursor: pointer; 26 | } 27 | 28 | .tree-node.selected { 29 | background-color: #D690A0; 30 | } 31 | -------------------------------------------------------------------------------- /Inspector/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | WebDriverAgent Inspector 6 | 7 | 8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Inspector/js/tree_context.js: -------------------------------------------------------------------------------- 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 | class TreeContext { 11 | constructor() { 12 | this.baseKey = Math.random(); 13 | this.numberOfNodes = 0; 14 | } 15 | 16 | buildUniqueNodeKey() { 17 | this.numberOfNodes++; 18 | return this.baseKey + '|' + this.numberOfNodes; 19 | } 20 | } 21 | 22 | module.exports = TreeContext; 23 | -------------------------------------------------------------------------------- /Inspector/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-driver-inspector", 3 | "version": "1.0.0", 4 | "description": "React based web inspector to inspect current device state", 5 | "main": "index.html", 6 | "author": "Facebook, Inc.", 7 | "license": "ISC", 8 | "dependencies": { 9 | "babel-core": "^5.8.23", 10 | "babel-loader": "^5.3.2", 11 | "classnames": "^2.1.3", 12 | "css-loader": "^0.16.0", 13 | "express": "^4.16.2", 14 | "prop-types": "^15.6.0", 15 | "react": "^16.2.0", 16 | "react-dom": "^16.2.0", 17 | "react-treeview": "^0.4.0", 18 | "simple-ajax": "^2.6.0", 19 | "socket.io": "^2.0.4", 20 | "style-loader": "^0.12.3", 21 | "throttle-debounce": "^1.0.1", 22 | "webpack": "^1.12.0" 23 | }, 24 | "devDependencies": { 25 | "arraybuffer-to-string": "^1.0.1", 26 | "babel-eslint": "^7.1.1", 27 | "copy-webpack-plugin": "^4.3.1", 28 | "eslint": "^3.13.1", 29 | "eslint-plugin-babel": "^4.0.1", 30 | "eslint-plugin-flowtype": "^2.30.0", 31 | "eslint-plugin-react": "^6.9.0", 32 | "html-webpack-plugin": "^2.30.1", 33 | "ip": "^1.1.5", 34 | "npm-watch": "^0.3.0", 35 | "flow-bin": "^0.73.0", 36 | "webpack-dev-server": "^1.10.1" 37 | }, 38 | "watch": { 39 | "build": { 40 | "patterns": [ 41 | "js", 42 | "css" 43 | ], 44 | "extensions": "js,html,css", 45 | "quiet": false 46 | } 47 | }, 48 | "scripts": { 49 | "start": "webpack-dev-server --hot --progress --colors", 50 | "build": "webpack --progress --colors", 51 | "watch": "npm-watch build" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD License 2 | 3 | For WebDriverAgent software 4 | 5 | Copyright (c) 2015-present, Facebook, Inc. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without modification, 8 | are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, this 11 | list of conditions and the following disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | 17 | * Neither the name Facebook nor the names of its contributors may be used to 18 | endorse or promote products derived from this software without specific 19 | prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 25 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 28 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '9.0' 3 | 4 | target 'IntegrationApp' do 5 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 6 | # use_frameworks! 7 | 8 | # Pods for IntegrationApp 9 | 10 | end 11 | 12 | target 'WebDriverAgentLib' do 13 | # use_frameworks! 14 | pod 'SDVersion', '4.3.2' 15 | end 16 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SDVersion (4.3.2) 3 | 4 | DEPENDENCIES: 5 | - SDVersion (= 4.3.2) 6 | 7 | SPEC CHECKSUMS: 8 | SDVersion: 18f32c835c1543611fcfae3c6accd9a04b90597e 9 | 10 | PODFILE CHECKSUM: ef1cf96dc65b22bf57b08d4d51bb4f409ea9a3b2 11 | 12 | COCOAPODS: 1.3.1 13 | -------------------------------------------------------------------------------- /Pods/Headers/Private/SDVersion/SDVersion.h: -------------------------------------------------------------------------------- 1 | ../../../SDVersion/SDVersion/SDVersion.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDVersion/SDiOSVersion.h: -------------------------------------------------------------------------------- 1 | ../../../SDVersion/SDVersion/SDiOSVersion/SDiOSVersion.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDVersion/SDVersion.h: -------------------------------------------------------------------------------- 1 | ../../../SDVersion/SDVersion/SDVersion.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDVersion/SDiOSVersion.h: -------------------------------------------------------------------------------- 1 | ../../../SDVersion/SDVersion/SDiOSVersion/SDiOSVersion.h -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SDVersion (4.3.2) 3 | 4 | DEPENDENCIES: 5 | - SDVersion (= 4.3.2) 6 | 7 | SPEC CHECKSUMS: 8 | SDVersion: 18f32c835c1543611fcfae3c6accd9a04b90597e 9 | 10 | PODFILE CHECKSUM: ef1cf96dc65b22bf57b08d4d51bb4f409ea9a3b2 11 | 12 | COCOAPODS: 1.3.1 13 | -------------------------------------------------------------------------------- /Pods/SDVersion/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Sebastian Dobrincu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | 24 | -------------------------------------------------------------------------------- /Pods/SDVersion/SDVersion/SDVersion.h: -------------------------------------------------------------------------------- 1 | // 2 | // SDVersion.h 3 | // SDVersion 4 | // 5 | // Copyright (c) 2016 Sebastian Dobrincu. All rights reserved. 6 | // 7 | 8 | #ifndef SDVersion_h 9 | #define SDVersion_h 10 | 11 | #if TARGET_OS_IOS 12 | #import "SDiOSVersion.h" 13 | #define SDVersion SDiOSVersion 14 | #elif TARGET_OS_WATCH 15 | #import "SDwatchOSVersion.h" 16 | #define SDVersion SDwatchOSVersion 17 | #elif TARGET_OS_TV 18 | #import "SDtvOSVersion.h" 19 | #define SDVersion SDtvOSVersion 20 | #elif TARGET_OS_MAC 21 | #import "SDMacVersion.h" 22 | #define SDVersion SDMacVersion 23 | #endif 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-IntegrationApp/Pods-IntegrationApp-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-IntegrationApp/Pods-IntegrationApp-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-IntegrationApp/Pods-IntegrationApp-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_IntegrationApp : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_IntegrationApp 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-IntegrationApp/Pods-IntegrationApp.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SDVersion" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/SDVersion" 4 | OTHER_LDFLAGS = $(inherited) -ObjC 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-IntegrationApp/Pods-IntegrationApp.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SDVersion" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/SDVersion" 4 | OTHER_LDFLAGS = $(inherited) -ObjC 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WebDriverAgentLib/Pods-WebDriverAgentLib-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## SDVersion 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2016 Sebastian Dobrincu 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | 29 | 30 | Generated by CocoaPods - https://cocoapods.org 31 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WebDriverAgentLib/Pods-WebDriverAgentLib-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_WebDriverAgentLib : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_WebDriverAgentLib 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WebDriverAgentLib/Pods-WebDriverAgentLib.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SDVersion" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SDVersion" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/SDVersion" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"SDVersion" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WebDriverAgentLib/Pods-WebDriverAgentLib.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SDVersion" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SDVersion" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/SDVersion" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"SDVersion" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SDVersion/SDVersion-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SDVersion : NSObject 3 | @end 4 | @implementation PodsDummy_SDVersion 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SDVersion/SDVersion-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SDVersion/SDVersion.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SDVersion 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDVersion" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SDVersion" 4 | PODS_BUILD_DIR = $BUILD_DIR 5 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SDVersion 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/CDStructures.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #pragma mark Blocks 8 | 9 | typedef void (^CDUnknownBlockType)(void); // return type and parameters are unknown 10 | 11 | typedef struct { 12 | unsigned int _field1; 13 | unsigned int _field2; 14 | unsigned int _field3; 15 | unsigned int _field4; 16 | unsigned int _field5; 17 | unsigned int _field6; 18 | unsigned int _field7; 19 | } CDStruct_a561fd19; 20 | 21 | typedef struct { 22 | unsigned short _field1; 23 | unsigned short _field2; 24 | unsigned short _field3[1]; 25 | } CDStruct_27a325c0; 26 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/NSString-XCTAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface NSString (XCTAdditions) 10 | - (id)xct_quotedSwiftStringRepresentation; 11 | @end 12 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/NSValue-XCTestAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface NSValue (XCTestAdditions) 10 | - (id)xct_contentDescription; 11 | @end 12 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/UIGestureRecognizer-RecordingAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface UIGestureRecognizer (RecordingAdditions) 10 | - (id)_automationName; 11 | @end 12 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/UILongPressGestureRecognizer-RecordingAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface UILongPressGestureRecognizer (RecordingAdditions) 10 | - (id)_automationName; 11 | @end 12 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/UIPanGestureRecognizer-RecordingAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface UIPanGestureRecognizer (RecordingAdditions) 10 | - (id)_automationName; 11 | @end 12 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/UIPinchGestureRecognizer-RecordingAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface UIPinchGestureRecognizer (RecordingAdditions) 10 | - (id)_automationName; 11 | @end 12 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/UISwipeGestureRecognizer-RecordingAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface UISwipeGestureRecognizer (RecordingAdditions) 10 | - (id)_automationName; 11 | @end 12 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/UITapGestureRecognizer-RecordingAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface UITapGestureRecognizer (RecordingAdditions) 10 | - (id)_automationName; 11 | @end 12 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCAccessibilityElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSString; 8 | 9 | @interface XCAccessibilityElement : NSObject 10 | { 11 | NSString *_context; 12 | id _payload; 13 | int _processIdentifier; 14 | struct __AXUIElement *_axElement; 15 | unsigned long long _elementType; 16 | } 17 | @property(readonly) id payload; // @synthesize payload=_payload; 18 | @property(readonly) int processIdentifier; // @synthesize processIdentifier=_processIdentifier; 19 | @property(readonly) const struct __AXUIElement *AXUIElement; // @synthesize AXUIElement=_axElement; 20 | @property(readonly, getter=isNative) BOOL native; 21 | 22 | + (id)elementWithAXUIElement:(struct __AXUIElement *)arg1; 23 | + (id)elementWithProcessIdentifier:(int)arg1; 24 | + (id)deviceElement; 25 | + (id)mockElementWithProcessIdentifier:(int)arg1 payload:(id)arg2; 26 | + (id)mockElementWithProcessIdentifier:(int)arg1; 27 | 28 | - (id)initWithMockProcessIdentifier:(int)arg1 payload:(id)arg2; 29 | - (id)initWithAXUIElement:(struct __AXUIElement *)arg1; 30 | - (id)init; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCActivityRecord.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSArray, NSData, NSDate, NSString, NSUUID, XCElementSnapshot, XCSynthesizedEventRecord; 8 | 9 | @interface XCActivityRecord : NSObject 10 | { 11 | NSString *_title; 12 | NSUUID *_uuid; 13 | NSDate *_start; 14 | NSDate *_finish; 15 | BOOL _hasSubactivities; 16 | NSData *_screenImageData; 17 | XCElementSnapshot *_snapshot; 18 | NSArray *_elementsOfInterest; 19 | XCSynthesizedEventRecord *_synthesizedEvent; 20 | NSData *_diagnosticReportData; 21 | NSData *_memoryGraphData; 22 | } 23 | 24 | @property(copy) NSData *memoryGraphData; // @synthesize memoryGraphData=_memoryGraphData; 25 | @property(copy) NSData *diagnosticReportData; // @synthesize diagnosticReportData=_diagnosticReportData; 26 | @property(retain) XCSynthesizedEventRecord *synthesizedEvent; // @synthesize synthesizedEvent=_synthesizedEvent; 27 | @property(copy) NSArray *elementsOfInterest; // @synthesize elementsOfInterest=_elementsOfInterest; 28 | @property(retain) XCElementSnapshot *snapshot; // @synthesize snapshot=_snapshot; 29 | @property(copy) NSData *screenImageData; // @synthesize screenImageData=_screenImageData; 30 | @property BOOL hasSubactivities; // @synthesize hasSubactivities=_hasSubactivities; 31 | @property(copy) NSDate *start; // @synthesize start=_start; 32 | @property(copy) NSDate *finish; // @synthesize finish=_finish; 33 | @property(copy) NSUUID *uuid; // @synthesize uuid=_uuid; 34 | @property(copy) NSString *title; // @synthesize title=_title; 35 | @property(readonly) double duration; 36 | 37 | - (id)init; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCApplicationMonitor_iOS.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface XCApplicationMonitor_iOS : XCApplicationMonitor 10 | { 11 | } 12 | 13 | - (void)_terminateApplicationProcess:(id)arg1; 14 | - (id)monitoredApplicationWithProcessIdentifier:(int)arg1; 15 | - (void)_beginMonitoringApplication:(id)arg1; 16 | - (id)init; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCApplicationQuery.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class XCElementSnapshot, XCUIApplication; 10 | 11 | @interface XCApplicationQuery : XCUIElementQuery 12 | { 13 | XCUIApplication *_application; 14 | XCElementSnapshot *_lastSnapshot; 15 | } 16 | 17 | @property(retain) XCElementSnapshot *lastSnapshot; // @synthesize lastSnapshot=_lastSnapshot; 18 | - (id)matchingSnapshotsWithError:(id *)arg1; 19 | - (id)application; 20 | - (id)initWithApplication:(id)arg1; 21 | 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCDebugLogDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSString; 8 | 9 | @protocol XCDebugLogDelegate 10 | - (void)logDebugMessage:(NSString *)arg1; 11 | @end 12 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCDeviceEvent.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @interface XCDeviceEvent : NSObject 8 | { 9 | unsigned int _eventPage; 10 | unsigned int _usage; 11 | double _duration; 12 | unsigned long long _type; 13 | double _rotation; 14 | } 15 | @property unsigned long long type; // @synthesize type=_type; 16 | @property double rotation; // @synthesize rotation=_rotation; 17 | @property double duration; // @synthesize duration=_duration; 18 | @property unsigned int usage; // @synthesize usage=_usage; 19 | @property unsigned int eventPage; // @synthesize eventPage=_eventPage; 20 | @property(readonly) BOOL isButtonHoldEvent; 21 | 22 | + (id)deviceEventForDigitalCrownRotation:(double)arg1 velocity:(double)arg2; 23 | + (id)deviceEventWithPage:(unsigned int)arg1 usage:(unsigned int)arg2 duration:(double)arg3; 24 | 25 | - (void)dispatch; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCKeyMappingPath.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSSet, NSString; 8 | 9 | @interface XCKeyMappingPath : NSObject 10 | { 11 | unsigned long long _keyState; 12 | XCKeyMappingPath *_next; 13 | NSSet *_inputs; 14 | NSString *_output; 15 | unsigned long long _length; 16 | NSString *_producedString; 17 | } 18 | @property(readonly, copy) NSString *producedString; // @synthesize producedString=_producedString; 19 | @property(readonly) unsigned long long length; // @synthesize length=_length; 20 | @property(readonly, copy) NSString *output; // @synthesize output=_output; 21 | @property(readonly, copy) NSSet *inputs; // @synthesize inputs=_inputs; 22 | @property(readonly, copy) XCKeyMappingPath *next; // @synthesize next=_next; 23 | @property(readonly) unsigned long long keyState; // @synthesize keyState=_keyState; 24 | @property(readonly, getter=isEmpty) BOOL empty; 25 | @property(readonly, getter=isComplete) BOOL complete; 26 | 27 | + (id)pathWithKeyState:(unsigned long long)arg1 next:(id)arg2 inputs:(id)arg3 output:(id)arg4; 28 | + (id)emptyPath; 29 | 30 | - (id)inputSequenceWithRequiredFlags:(unsigned long long)arg1 excludedFlags:(unsigned long long)arg2; 31 | - (id)inputWithRequiredFlags:(unsigned long long)arg1 excludedFlags:(unsigned long long)arg2; 32 | 33 | - (id)initWithKeyState:(unsigned long long)arg1 next:(id)arg2 inputs:(id)arg3 output:(id)arg4; 34 | - (id)init; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCKeyboardLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSArray, NSData, NSString, XCKeyboardKeyMap; 8 | 9 | @interface XCKeyboardLayout : NSObject 10 | { 11 | struct __GSKeyboard *_source; 12 | NSString *_identifier; 13 | NSData *_data; 14 | NSArray *_keyMaps; 15 | XCKeyboardKeyMap *_primaryKeyMap; 16 | } 17 | @property(readonly) XCKeyboardKeyMap *primaryKeyMap; // @synthesize primaryKeyMap=_primaryKeyMap; 18 | @property(readonly, copy) NSString *identifier; // @synthesize identifier=_identifier; 19 | 20 | + (id)unicodeHexKeyboardLayout; 21 | + (id)currentKeyboardLayout; 22 | + (void)enumerateKeyboardLayoutsUsingBlock:(CDUnknownBlockType)arg1; 23 | + (id)keyboardLayoutWithInputSource:(struct __GSKeyboard *)arg1; 24 | + (id)keyboardLayoutWithIdentifier:(id)arg1; 25 | 26 | - (BOOL)deactivate:(id)arg1 error:(id *)arg2; 27 | - (id)activateWithError:(id *)arg1; 28 | - (id)_setActiveLayoutState:(id)arg1 error:(id *)arg2; 29 | - (void)enumerateKeyMapsUsingBlock:(CDUnknownBlockType)arg1; 30 | - (id)keyMapForKeyboardType:(unsigned long long)arg1; 31 | 32 | - (id)initWithInputSource:(struct __GSKeyboard *)arg1; 33 | - (id)init; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCPointerEvent.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @interface XCPointerEvent : NSObject 8 | { 9 | unsigned long long _eventType; 10 | unsigned long long _buttonType; 11 | double _pressure; 12 | double _offset; 13 | struct CGPoint _coordinate; 14 | } 15 | @property double offset; // @synthesize offset=_offset; 16 | @property double pressure; // @synthesize pressure=_pressure; 17 | @property struct CGPoint coordinate; // @synthesize coordinate=_coordinate; 18 | @property unsigned long long buttonType; // @synthesize buttonType=_buttonType; 19 | @property unsigned long long eventType; // @synthesize eventType=_eventType; 20 | 21 | + (CDUnknownBlockType)offsetComparator; 22 | + (id)pointerEventWithType:(unsigned long long)arg1 buttonType:(unsigned long long)arg2 coordinate:(struct CGPoint)arg3 pressure:(double)arg4 offset:(double)arg5; 23 | + (id)pointerEventWithType:(unsigned long long)arg1 buttonType:(unsigned long long)arg2 coordinate:(struct CGPoint)arg3 offset:(double)arg4; 24 | 25 | - (id)init; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCPointerEventPath.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSArray, NSMutableArray; 8 | 9 | @interface XCPointerEventPath : NSObject 10 | { 11 | NSMutableArray *_pointerEvents; 12 | BOOL _immutable; 13 | unsigned long long _pathType; 14 | unsigned long long _index; 15 | } 16 | @property BOOL immutable; // @synthesize immutable=_immutable; 17 | @property unsigned long long index; // @synthesize index=_index; 18 | @property(readonly) unsigned long long pathType; // @synthesize pathType=_pathType; 19 | @property(readonly) NSArray *pointerEvents; 20 | 21 | - (id)firstEventAfterOffset:(double)arg1; 22 | - (id)lastEventBeforeOffset:(double)arg1; 23 | - (void)_addPointerEvent:(id)arg1; 24 | - (void)releaseButton:(unsigned long long)arg1 atOffset:(double)arg2; 25 | - (void)pressButton:(unsigned long long)arg1 atOffset:(double)arg2; 26 | - (void)liftUpAtOffset:(double)arg1; 27 | - (void)moveToPoint:(struct CGPoint)arg1 atOffset:(double)arg2; 28 | - (void)pressDownWithPressure:(double)arg1 atOffset:(double)arg2; 29 | - (void)pressDownAtOffset:(double)arg1; 30 | - (id)initForMouseAtPoint:(struct CGPoint)arg1 offset:(double)arg2; 31 | - (id)initForTouchAtPoint:(CGPoint)arg1 offset:(double)arg2; 32 | - (id)init; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCSourceCodeTreeNodeEnumerator.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSMutableArray; 8 | 9 | @interface XCSourceCodeTreeNodeEnumerator : NSObject 10 | { 11 | NSMutableArray *_remainingNodes; 12 | } 13 | 14 | - (id)nextObject; 15 | - (id)initWithNode:(id)arg1; 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCSymbolicationRecord.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSString; 8 | 9 | @interface XCSymbolicationRecord : NSObject 10 | { 11 | unsigned long long _lineNumber; 12 | NSString *_filePath; 13 | NSString *_symbolName; 14 | NSString *_symbolOwner; 15 | } 16 | @property(copy) NSString *symbolOwner; // @synthesize symbolOwner=_symbolOwner; 17 | @property(copy) NSString *symbolName; // @synthesize symbolName=_symbolName; 18 | @property(copy) NSString *filePath; // @synthesize filePath=_filePath; 19 | @property unsigned long long lineNumber; // @synthesize lineNumber=_lineNumber; 20 | 21 | + (id)symbolicationRecordFromRemoteServiceForAddress:(unsigned long long)arg1; 22 | + (id)symbolicationRecordForTask:(unsigned int)arg1 address:(unsigned long long)arg2; 23 | + (id)symbolicationRecordForAddress:(unsigned long long)arg1; 24 | + (void)_setCurrentProcessIsRemoteService; 25 | + (id)_symbolicationRecordForSymbolicator:(struct _CSTypeRef)arg1 address:(unsigned long long)arg2; 26 | + (id)failureRecord; 27 | + (BOOL)softLinkCoreSymbolication; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCSymbolicatorHolder.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @interface XCSymbolicatorHolder : NSObject 8 | { 9 | struct _CSTypeRef _symbolicator; 10 | } 11 | 12 | @property struct _CSTypeRef symbolicator; // @synthesize symbolicator=_symbolicator; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCSynthesizedEventRecord.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSArray, NSMutableArray, NSString, XCPointerEventPath; 8 | 9 | @interface XCSynthesizedEventRecord : NSObject 10 | { 11 | NSMutableArray *_eventPaths; 12 | NSString *_name; 13 | UIInterfaceOrientation _interfaceOrientation; 14 | } 15 | @property(readonly) UIInterfaceOrientation interfaceOrientation; // @synthesize interfaceOrientation=_interfaceOrientation; 16 | @property(readonly, copy) NSString *name; // @synthesize name=_name; 17 | @property(readonly) double maximumOffset; 18 | @property(readonly) NSArray *eventPaths; 19 | 20 | - (void)addPointerEventPath:(XCPointerEventPath *)arg1; 21 | - (id)initWithName:(NSString *)arg1 interfaceOrientation:(UIInterfaceOrientation)arg2; 22 | - (id)init; 23 | - (BOOL)synthesizeWithError:(NSError **)arg1; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTAXClient-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSData; 10 | 11 | @protocol XCTAXClient 12 | - (void)handleAccessibilityNotification:(int)arg1 withPayload:(NSData *)arg2; 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTAsyncActivity-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSError; 10 | 11 | @protocol XCTAsyncActivity 12 | @property(readonly) BOOL timedOut; 13 | @property(readonly) NSError *error; 14 | - (void)finishWithError:(NSError *)arg1; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTAsyncActivity.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | #import "XCTAsyncActivity.h" 10 | 11 | @class NSError, NSString; 12 | 13 | @interface XCTAsyncActivity : XCTestExpectation 14 | { 15 | NSError *_error; 16 | BOOL _timedOut; 17 | } 18 | @property BOOL timedOut; // @synthesize timedOut=_timedOut; 19 | @property(retain) NSError *error; // @synthesize error=_error; 20 | 21 | - (void)finishWithError:(id)arg1; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTAutomationTarget-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @protocol XCTAutomationTarget 10 | - (void)requestHostAppExecutableNameWithReply:(void (^)(NSString *))arg1; 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTDarwinNotificationExpectation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSString, _XCTDarwinNotificationExpectationImplementation; 10 | 11 | @interface XCTDarwinNotificationExpectation : XCTestExpectation 12 | { 13 | id _internal; 14 | } 15 | @property(retain) _XCTDarwinNotificationExpectationImplementation *internal; // @synthesize internal=_internal; 16 | @property(copy) CDUnknownBlockType handler; 17 | @property(readonly, copy) NSString *notificationName; 18 | 19 | - (void)cleanup; 20 | - (void)fulfill; 21 | - (id)initWithNotificationName:(id)arg1; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTKVOExpectation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSString, _XCKVOExpectationImplementation; 10 | 11 | @interface XCTKVOExpectation : XCTestExpectation 12 | { 13 | id _internal; 14 | } 15 | @property(retain) _XCKVOExpectationImplementation *internal; // @synthesize internal=_internal; 16 | @property(copy) CDUnknownBlockType handler; 17 | @property(readonly) unsigned long long options; 18 | @property(readonly) id expectedValue; 19 | @property(readonly) id observedObject; 20 | @property(readonly, copy) NSString *keyPath; 21 | 22 | - (void)cleanup; 23 | - (void)fulfill; 24 | - (id)initWithKeyPath:(id)arg1 object:(id)arg2; 25 | - (id)initWithKeyPath:(id)arg1 object:(id)arg2 expectedValue:(id)arg3; 26 | - (id)initWithKeyPath:(id)arg1 object:(id)arg2 expectedValue:(id)arg3 options:(unsigned long long)arg4; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTMetric.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSArray, NSDictionary, NSString; 10 | 11 | @interface XCTMetric : NSObject 12 | { 13 | NSString *_identifier; 14 | NSString *_name; 15 | NSString *_units; 16 | NSDictionary *_baseline; 17 | NSDictionary *_defaultBaseline; 18 | NSArray *_measurements; 19 | } 20 | @property(copy) NSArray *measurements; // @synthesize measurements=_measurements; 21 | @property(copy) NSDictionary *defaultBaseline; // @synthesize defaultBaseline=_defaultBaseline; 22 | @property(copy) NSDictionary *baseline; // @synthesize baseline=_baseline; 23 | @property(copy) NSString *units; // @synthesize units=_units; 24 | @property(copy) NSString *name; // @synthesize name=_name; 25 | @property(copy) NSString *identifier; // @synthesize identifier=_identifier; 26 | 27 | - (id)init; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTNSNotificationExpectation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSNotificationCenter, NSString, _XCTNSNotificationExpectationImplementation; 10 | 11 | @interface XCTNSNotificationExpectation : XCTestExpectation 12 | { 13 | id _internal; 14 | } 15 | @property(retain) _XCTNSNotificationExpectationImplementation *internal; // @synthesize internal=_internal; 16 | @property(copy) CDUnknownBlockType handler; 17 | @property(readonly) NSNotificationCenter *notificationCenter; 18 | @property(readonly, copy) NSString *notificationName; 19 | @property(readonly) id observedObject; 20 | 21 | - (void)cleanup; 22 | - (void)fulfill; 23 | - (id)initWithName:(id)arg1; 24 | - (id)initWithName:(id)arg1 object:(id)arg2; 25 | - (id)initWithName:(id)arg1 object:(id)arg2 notificationCenter:(id)arg3; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTNSPredicateExpectation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSPredicate, _XCTNSPredicateExpectationImplementation; 10 | 11 | @interface XCTNSPredicateExpectation : XCTestExpectation 12 | { 13 | id _internal; 14 | } 15 | @property(retain) _XCTNSPredicateExpectationImplementation *internal; // @synthesize internal=_internal; 16 | @property(copy) CDUnknownBlockType handler; 17 | @property(readonly, copy) NSPredicate *predicate; 18 | @property(readonly) id object; 19 | 20 | - (void)cleanup; 21 | - (void)fulfill; 22 | - (id)initWithPredicate:(id)arg1 object:(id)arg2; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTNSPredicateExpectationObject-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class XCTNSPredicateExpectation; 10 | 11 | @protocol XCTNSPredicateExpectationObject 12 | 13 | @optional 14 | - (BOOL)evaluatePredicateForExpectation:(XCTNSPredicateExpectation *)arg1 debugMessage:(id *)arg2; 15 | @end 16 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTRunnerAutomationSession.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | #import "XCTRunnerAutomationSession.h" 10 | 11 | @class NSString, NSXPCConnection; 12 | 13 | @interface XCTRunnerAutomationSession : NSObject 14 | { 15 | NSXPCConnection *_connection; 16 | } 17 | @property NSXPCConnection *connection; // @synthesize connection=_connection; 18 | 19 | - (id)initWithEndpoint:(id)arg1; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTTestRunSession.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class XCTestConfiguration; 10 | 11 | @interface XCTTestRunSession : NSObject 12 | { 13 | XCTestConfiguration *_testConfiguration; 14 | id _delegate; 15 | } 16 | @property id delegate; // @synthesize delegate=_delegate; 17 | @property(retain) XCTestConfiguration *testConfiguration; // @synthesize testConfiguration=_testConfiguration; 18 | 19 | - (BOOL)runTestsAndReturnError:(id *)arg1; 20 | - (BOOL)_preTestingInitialization; 21 | - (void)resumeAppSleep:(id)arg1; 22 | - (id)suspendAppSleep; 23 | - (id)initWithTestConfiguration:(id)arg1 delegate:(id)arg2; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTTestRunSessionDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSError, XCTTestRunSession; 10 | 11 | @protocol XCTTestRunSessionDelegate 12 | - (void)testRunSessionDidFinishExecutingTestPlan:(XCTTestRunSession *)arg1 reply:(void (^)(void))arg2; 13 | - (void)testRunSession:(XCTTestRunSession *)arg1 initializationForUITestingDidFailWithError:(NSError *)arg2; 14 | - (void)testRunSessionDidBeginInitializingForUITesting:(XCTTestRunSession *)arg1; 15 | - (void)testRunSessionDidBeginExecutingTestPlan:(XCTTestRunSession *)arg1; 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTUIApplicationMonitor-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSNumber, NSString; 10 | 11 | @protocol XCTUIApplicationMonitor 12 | - (void)applicationWithBundleID:(NSString *)arg1 didUpdatePID:(int)arg2 state:(unsigned long long)arg3; 13 | - (void)processWithToken:(NSNumber *)arg1 exitedWithStatus:(int)arg2; 14 | - (void)stopTrackingProcessWithToken:(NSNumber *)arg1; 15 | - (void)crashInProcessWithBundleID:(NSString *)arg1 path:(NSString *)arg2 pid:(int)arg3 symbol:(NSString *)arg4; 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTWaiterDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSArray, XCTWaiter, XCTestExpectation; 10 | 11 | @protocol XCTWaiterDelegate 12 | - (void)waiter:(XCTWaiter *)arg1 didFulfillInvertedExpectation:(XCTestExpectation *)arg2; 13 | - (void)waiter:(XCTWaiter *)arg1 fulfillmentDidViolateOrderingConstraintsForExpectation:(XCTestExpectation *)arg2 requiredExpectation:(XCTestExpectation *)arg3; 14 | - (void)waiter:(XCTWaiter *)arg1 didTimeoutWithUnfulfilledExpectations:(NSArray *)arg2; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTWaiterDelegatePrivate-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class XCTWaiter; 8 | 9 | @protocol XCTWaiterDelegatePrivate 10 | - (void)nestedWaiter:(XCTWaiter *)arg1 wasInterruptedByTimedOutWaiter:(XCTWaiter *)arg2; 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTWaiterManagement-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @protocol XCTWaiterManagement 10 | @property(readonly, getter=isInProgress) BOOL inProgress; 11 | - (void)interruptForWaiter:(id )arg1; 12 | @end 13 | 14 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTWaiterManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSMutableArray, NSObject, NSThread; 10 | 11 | @interface XCTWaiterManager : NSObject 12 | { 13 | NSMutableArray *_waiterStack; 14 | NSThread *_thread; 15 | NSObject *_queue; 16 | } 17 | @property(readonly) NSObject *queue; // @synthesize queue=_queue; 18 | @property NSThread *thread; // @synthesize thread=_thread; 19 | @property(retain) NSMutableArray *waiterStack; // @synthesize waiterStack=_waiterStack; 20 | 21 | + (id)threadLocalManager; 22 | 23 | - (void)waiterDidFinishWaiting:(id)arg1; 24 | - (void)waiterTimedOutWhileWaiting:(id)arg1; 25 | - (void)waiterWillBeginWaiting:(id)arg1; 26 | - (id)init; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTest.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSString, XCTestRun; 8 | 9 | @interface XCTest : NSObject 10 | { 11 | id _internal; 12 | } 13 | @property(readonly) NSString *nameForLegacyLogging; 14 | @property(readonly) NSString *languageAgnosticTestMethodName; 15 | @property(readonly) NSString *languageAgnosticTestClassName; 16 | @property(readonly) XCTestRun *testRun; 17 | @property(readonly) Class testRunClass; 18 | @property(readonly) Class _requiredTestRunBaseClass; 19 | @property(readonly, copy) NSString *name; 20 | @property(readonly) unsigned long long testCaseCount; 21 | @property(readonly) NSString *_methodNameForReporting; 22 | @property(readonly) NSString *_classNameForReporting; 23 | 24 | + (id)languageAgnosticTestClassNameForTestClass:(Class)arg1; 25 | 26 | - (void)tearDown; 27 | - (void)setUp; 28 | - (void)runTest; 29 | - (id)run; 30 | - (void)performTest:(id)arg1; 31 | - (id)init; 32 | - (void)removeTestsWithNames:(id)arg1; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestCaseRun.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface XCTestCaseRun : XCTestRun 10 | { 11 | } 12 | 13 | - (void)_recordValues:(id)arg1 forPerformanceMetricID:(id)arg2 name:(id)arg3 unitsOfMeasurement:(id)arg4 baselineName:(id)arg5 baselineAverage:(id)arg6 maxPercentRegression:(id)arg7 maxPercentRelativeStandardDeviation:(id)arg8 maxRegression:(id)arg9 maxStandardDeviation:(id)arg10 file:(id)arg11 line:(unsigned long long)arg12; 14 | - (void)recordFailureWithDescription:(id)arg1 inFile:(id)arg2 atLine:(unsigned long long)arg3 expected:(BOOL)arg4; 15 | - (void)recordFailureInTest:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(unsigned long long)arg4 expected:(BOOL)arg5; 16 | - (void)stop; 17 | - (void)start; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestCaseSuite.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface XCTestCaseSuite : XCTestSuite 10 | { 11 | Class _testCaseClass; 12 | } 13 | 14 | + (id)emptyTestSuiteForTestCaseClass:(Class)arg1; 15 | - (void)tearDown; 16 | - (void)setUp; 17 | - (id)initWithTestCaseClass:(Class)arg1; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSArray, XCTestContextScope; 8 | 9 | @interface XCTestContext : NSObject 10 | { 11 | BOOL _didHandleUIInterruption; 12 | XCTestContextScope *_currentScope; 13 | } 14 | @property BOOL didHandleUIInterruption; // @synthesize didHandleUIInterruption=_didHandleUIInterruption; 15 | @property(retain, nonatomic) XCTestContextScope *currentScope; // @synthesize currentScope=_currentScope; 16 | @property(readonly, copy) NSArray *handlers; 17 | 18 | + (CDUnknownBlockType)defaultAsynchronousUIElementHandler; 19 | 20 | - (BOOL)handleAsynchronousUIElement:(id)arg1; 21 | - (void)removeUIInterruptionMonitor:(id)arg1; 22 | - (id)addUIInterruptionMonitorWithDescription:(id)arg1 handler:(CDUnknownBlockType)arg2; 23 | - (void)performInScope:(CDUnknownBlockType)arg1; 24 | - (id)init; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestContextScope.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSMutableArray; 8 | 9 | @interface XCTestContextScope : NSObject 10 | { 11 | XCTestContextScope *_parentScope; 12 | NSMutableArray *_handlers; 13 | } 14 | @property(copy) NSMutableArray *handlers; // @synthesize handlers=_handlers; 15 | @property(readonly) XCTestContextScope *parentScope; // @synthesize parentScope=_parentScope; 16 | 17 | - (id)initWithParentScope:(id)arg1; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestDriverInterface-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSNumber; 8 | 9 | @protocol XCTestDriverInterface 10 | - (id)_IDE_processWithToken:(NSNumber *)arg1 exitedWithStatus:(NSNumber *)arg2; 11 | - (id)_IDE_stopTrackingProcessWithToken:(NSNumber *)arg1; 12 | - (id)_IDE_processWithBundleID:(NSString *)arg1 path:(NSString *)arg2 pid:(NSNumber *)arg3 crashedUnderSymbol:(NSString *)arg4; 13 | - (id)_IDE_startExecutingTestPlanWithProtocolVersion:(NSNumber *)arg1; 14 | @end 15 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestExpectation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | 8 | 9 | @class _XCTestExpectationImplementation; 10 | 11 | @interface XCTestExpectation : NSObject 12 | { 13 | id _internalImplementation; 14 | } 15 | @property BOOL hasBeenWaitedOn; 16 | @property id delegate; 17 | @property(readonly, copy) NSArray *fulfillCallStackReturnAddresses; 18 | @property(readonly) BOOL fulfilled; 19 | @property BOOL hasInverseBehavior; 20 | @property(getter=isInverted) BOOL inverted; 21 | @property(nonatomic) BOOL assertForOverFulfill; 22 | @property(nonatomic) unsigned long long expectedFulfillmentCount; 23 | @property(nonatomic) unsigned long long fulfillmentCount; 24 | @property(readonly) unsigned long long fulfillmentToken; 25 | @property(readonly) _XCTestExpectationImplementation *internalImplementation; // @synthesize internalImplementation=_internalImplementation; 26 | @property(copy) NSString *expectationDescription; 27 | @property(readonly, nonatomic) NSObject *delegateQueue; 28 | @property(readonly, nonatomic) NSObject *queue; 29 | 30 | + (id)expectationWithDescription:(id)arg1; 31 | 32 | - (void)cleanup; 33 | - (void)_queue_fulfillWithCallStackReturnAddresses:(id)arg1; 34 | - (void)fulfill; 35 | 36 | - (id)initWithDescription:(id)arg1; 37 | - (id)init; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestExpectationDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class XCTestExpectation; 10 | 11 | @protocol XCTestExpectationDelegate 12 | - (void)didFulfillExpectation:(XCTestExpectation *)arg1; 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestExpectationWaiter.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface XCTestExpectationWaiter : XCTWaiter 10 | { 11 | } 12 | 13 | - (long long)wait:(double)arg1 forExpectations:(id)arg2 enforceOrder:(BOOL)arg3; 14 | - (long long)wait:(double)arg1 forExpectations:(id)arg2; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestLog.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | #import "XCTestObservation.h" 10 | 11 | @class NSFileHandle, NSString; 12 | 13 | @interface XCTestLog : XCTestObserver 14 | { 15 | } 16 | @property(readonly) NSFileHandle *logFileHandle; 17 | 18 | + (id)_messageForTest:(id)arg1 didMeasureValues:(id)arg2 forPerformanceMetricID:(id)arg3 name:(id)arg4 unitsOfMeasurement:(id)arg5 baselineName:(id)arg6 baselineAverage:(id)arg7 maxPercentRegression:(id)arg8 maxPercentRelativeStandardDeviation:(id)arg9 maxRegression:(id)arg10 maxStandardDeviation:(id)arg11 file:(id)arg12 line:(unsigned long long)arg13; 19 | 20 | - (void)testCaseDidFail:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(unsigned long long)arg4; 21 | - (void)_testCase:(id)arg1 didMeasureValues:(id)arg2 forPerformanceMetricID:(id)arg3 name:(id)arg4 unitsOfMeasurement:(id)arg5 baselineName:(id)arg6 baselineAverage:(id)arg7 maxPercentRegression:(id)arg8 maxPercentRelativeStandardDeviation:(id)arg9 maxRegression:(id)arg10 maxStandardDeviation:(id)arg11 file:(id)arg12 line:(unsigned long long)arg13; 22 | - (void)testCaseDidStop:(id)arg1; 23 | - (void)testCaseDidStart:(id)arg1; 24 | - (void)testSuiteDidFail:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(unsigned long long)arg4; 25 | - (void)testSuiteDidStop:(id)arg1; 26 | - (void)testSuiteDidStart:(id)arg1; 27 | - (void)_testDidFail:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(unsigned long long)arg4; 28 | - (void)testLogWithFormat:(id)arg1 arguments:(char *)arg2; 29 | - (void)testLogWithFormat:(id)arg1; 30 | - (id)dateFormatter; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestManager_TestsInterface-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSData, NSString; 8 | 9 | @protocol XCTestManager_TestsInterface 10 | - (void)_XCT_receivedAccessibilityNotification:(int)arg1 withPayload:(NSData *)arg2; 11 | - (void)_XCT_applicationWithBundleID:(NSString *)arg1 didUpdatePID:(int)arg2 andState:(unsigned long long)arg3; 12 | @end 13 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestMisuseObserver.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | #import "XCTestObservation.h" 10 | 11 | @class NSMutableArray, NSString, XCTestCase, XCTestSuite; 12 | 13 | @interface XCTestMisuseObserver : NSObject 14 | { 15 | CDUnknownBlockType _warningLogHandler; 16 | NSMutableArray *_testSuiteStack; 17 | XCTestCase *_currentTestCase; 18 | } 19 | @property(retain) XCTestCase *currentTestCase; // @synthesize currentTestCase=_currentTestCase; 20 | @property(readonly) NSMutableArray *testSuiteStack; // @synthesize testSuiteStack=_testSuiteStack; 21 | @property(readonly, copy) CDUnknownBlockType warningLogHandler; // @synthesize warningLogHandler=_warningLogHandler; 22 | @property(readonly) XCTestSuite *currentTestSuite; 23 | 24 | - (void)testCaseDidFinish:(id)arg1; 25 | - (void)testCase:(id)arg1 didFailWithDescription:(id)arg2 inFile:(id)arg3 atLine:(unsigned long long)arg4; 26 | - (void)testCaseWillStart:(id)arg1; 27 | - (void)testSuiteDidFinish:(id)arg1; 28 | - (void)testSuiteWillStart:(id)arg1; 29 | - (BOOL)testSuiteStackContainsTestSuite:(id)arg1; 30 | - (void)removeTestSuiteFromStack:(id)arg1; 31 | - (void)popCurrentTestSuite; 32 | - (void)pushTestSuite:(id)arg1; 33 | - (void)emitWarningLog:(id)arg1; 34 | 35 | - (id)initWithWarningLogHandler:(CDUnknownBlockType)arg1; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestObservation-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSBundle, NSString, XCTestCase, XCTestSuite; 8 | 9 | @protocol XCTestObservation 10 | 11 | @optional 12 | - (void)testCaseDidFinish:(XCTestCase *)arg1; 13 | - (void)testCase:(XCTestCase *)arg1 didFailWithDescription:(NSString *)arg2 inFile:(NSString *)arg3 atLine:(unsigned long long)arg4; 14 | - (void)testCaseWillStart:(XCTestCase *)arg1; 15 | - (void)testSuiteDidFinish:(XCTestSuite *)arg1; 16 | - (void)testSuite:(XCTestSuite *)arg1 didFailWithDescription:(NSString *)arg2 inFile:(NSString *)arg3 atLine:(unsigned long long)arg4; 17 | - (void)testSuiteWillStart:(XCTestSuite *)arg1; 18 | - (void)testBundleDidFinish:(NSBundle *)arg1; 19 | - (void)testBundleWillStart:(NSBundle *)arg1; 20 | @end 21 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestObservationCenter.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSMutableSet; 8 | 9 | @interface XCTestObservationCenter : NSObject 10 | { 11 | id _internalImplementation; 12 | } 13 | @property BOOL suspended; 14 | @property(readonly) NSMutableSet *observers; 15 | 16 | + (id)sharedTestObservationCenter; 17 | 18 | - (void)_testCase:(id)arg1 didFinishActivity:(id)arg2; 19 | - (void)_testCase:(id)arg1 willStartActivity:(id)arg2; 20 | - (void)_testCaseDidFail:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(unsigned long long)arg4; 21 | - (void)_testCase:(id)arg1 didMeasureValues:(id)arg2 forPerformanceMetricID:(id)arg3 name:(id)arg4 unitsOfMeasurement:(id)arg5 baselineName:(id)arg6 baselineAverage:(id)arg7 maxPercentRegression:(id)arg8 maxPercentRelativeStandardDeviation:(id)arg9 maxRegression:(id)arg10 maxStandardDeviation:(id)arg11 file:(id)arg12 line:(unsigned long long)arg13; 22 | - (void)_testCaseDidStop:(id)arg1; 23 | - (void)_testCaseDidStart:(id)arg1; 24 | - (void)_testSuiteDidFail:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(unsigned long long)arg4; 25 | - (void)_testSuiteDidStop:(id)arg1; 26 | - (void)_testSuiteDidStart:(id)arg1; 27 | - (void)_suspendObservationForBlock:(CDUnknownBlockType)arg1; 28 | - (void)_suspendObservation; 29 | - (void)_resumeObservation; 30 | - (void)_observeTestExecutionForBlock:(CDUnknownBlockType)arg1; 31 | - (void)removeTestObserver:(id)arg1; 32 | - (void)addTestObserver:(id)arg1; 33 | - (void)_addLegacyTestObserver:(id)arg1; 34 | - (id)init; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestObserver.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @interface XCTestObserver : NSObject 8 | { 9 | } 10 | 11 | - (void)testCaseDidFail:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(unsigned long long)arg4; 12 | - (void)testCaseDidStop:(id)arg1; 13 | - (void)testCaseDidStart:(id)arg1; 14 | - (void)testSuiteDidFail:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(unsigned long long)arg4; 15 | - (void)testSuiteDidStop:(id)arg1; 16 | - (void)testSuiteDidStart:(id)arg1; 17 | - (void)stopObserving; 18 | - (void)startObserving; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestProbe.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @interface XCTestProbe : NSObject 8 | { 9 | } 10 | 11 | + (BOOL)isTesting; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestRun.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSDate, XCTest, _XCInternalTestRun; 10 | 11 | @interface XCTestRun () 12 | { 13 | id _internalTestRun; 14 | } 15 | @property(readonly) _XCInternalTestRun *implementation; // @synthesize implementation=_internalTestRun; 16 | @property(readonly) BOOL hasSucceeded; 17 | @property unsigned long long unexpectedExceptionCountBeforeCrash; 18 | @property unsigned long long failureCountBeforeCrash; 19 | @property unsigned long long executionCountBeforeCrash; 20 | @property(readonly) unsigned long long testCaseCount; 21 | @property(readonly) unsigned long long unexpectedExceptionCount; 22 | @property(readonly) unsigned long long failureCount; 23 | @property(readonly) unsigned long long totalFailureCount; 24 | @property(readonly) unsigned long long executionCount; 25 | @property(readonly, copy) NSDate *stopDate; 26 | @property(readonly, copy) NSDate *startDate; 27 | @property(readonly) double testDuration; 28 | @property(readonly) double totalDuration; 29 | @property(readonly) XCTest *test; 30 | 31 | + (id)testRunWithTest:(id)arg1; 32 | 33 | - (void)recordFailureWithDescription:(id)arg1 inFile:(id)arg2 atLine:(unsigned long long)arg3 expected:(BOOL)arg4; 34 | - (void)stop; 35 | - (void)start; 36 | - (id)init; 37 | - (id)initWithTest:(id)arg1; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestSuite.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSArray, NSMutableArray, NSString; 10 | 11 | @interface XCTestSuite : XCTest 12 | { 13 | id _internalImplementation; 14 | } 15 | @property(readonly, copy) NSArray *tests; 16 | @property(copy) NSString *name; 17 | 18 | + (id)testSuiteForTestConfiguration:(id)arg1; 19 | + (id)defaultTestSuite; 20 | + (id)allTests; 21 | + (id)testSuiteForTestCaseClass:(Class)arg1; 22 | + (id)testSuiteForTestCaseWithName:(id)arg1; 23 | + (id)testSuiteForBundlePath:(id)arg1; 24 | + (id)suiteForBundleCache; 25 | + (void)invalidateCache; 26 | + (id)_suiteForBundleCache; 27 | + (id)emptyTestSuiteNamedFromPath:(id)arg1; 28 | + (id)testSuiteWithName:(id)arg1; 29 | + (id)testCaseNamesForScopeNames:(id)arg1; 30 | 31 | - (id)_initWithTestConfiguration:(id)arg1; 32 | - (void)_sortTestsUsingComparator:(CDUnknownBlockType)arg1; 33 | - (void)performTest:(id)arg1; 34 | - (void)_performProtectedSectionForTest:(id)arg1 testSection:(CDUnknownBlockType)arg2; 35 | - (void)_recordUnexpectedFailureForTestRun:(id)arg1 description:(id)arg2 exception:(id)arg3; 36 | - (void)recordFailureWithDescription:(id)arg1 inFile:(id)arg2 atLine:(unsigned long long)arg3 expected:(BOOL)arg4; 37 | - (Class)testRunClass; 38 | - (Class)_requiredTestRunBaseClass; 39 | - (unsigned long long)testCaseCount; 40 | - (void)setTests:(id)arg1; 41 | - (void)addTest:(id)arg1; 42 | - (id)_testSuiteWithIdentifier:(id)arg1; 43 | - (id)description; 44 | - (id)initWithName:(id)arg1; 45 | - (id)init; 46 | - (void)removeTestsWithNames:(id)arg1; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestSuiteRun.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSArray, NSMutableArray; 10 | 11 | @interface XCTestSuiteRun : XCTestRun 12 | { 13 | NSMutableArray *_testRuns; 14 | } 15 | @property(readonly, copy) NSArray *testRuns; 16 | 17 | - (void)recordFailureWithDescription:(id)arg1 inFile:(id)arg2 atLine:(unsigned long long)arg3 expected:(BOOL)arg4; 18 | - (double)testDuration; 19 | - (unsigned long long)unexpectedExceptionCount; 20 | - (unsigned long long)failureCount; 21 | - (unsigned long long)executionCount; 22 | - (void)addTestRun:(id)arg1; 23 | - (void)stop; 24 | - (void)start; 25 | 26 | - (id)initWithTest:(id)arg1; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCTestWaiter.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface XCTestWaiter : XCTWaiter 10 | { 11 | } 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCUIApplicationImpl.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSString, XCAccessibilityElement, XCUIApplicationProcess; 10 | 11 | @interface XCUIApplicationImpl : NSObject 12 | { 13 | NSString *_path; 14 | NSString *_bundleID; 15 | XCUIApplicationProcess *_currentProcess; 16 | } 17 | 18 | @property(retain, nonatomic) XCUIApplicationProcess *currentProcess; // @synthesize currentProcess=_currentProcess; 19 | @property(readonly, copy) NSString *bundleID; // @synthesize bundleID=_bundleID; 20 | @property(readonly, copy) NSString *path; // @synthesize path=_path; 21 | @property(nonatomic) unsigned long long state; 22 | @property(nonatomic) int processID; 23 | @property(readonly) XCAccessibilityElement *accessibilityElement; 24 | 25 | - (instancetype)initWithPath:(id)arg1 bundleID:(id)arg2; 26 | 27 | - (void)launchWithArguments:(id)arg1 environment:(id)arg2 usingXcode:(BOOL)arg3; 28 | - (void)handleCrashUnderSymbol:(id)arg1; 29 | - (void)terminate; 30 | 31 | - (void)waitForViewControllerViewDidDisappearWithTimeout:(double)arg1; 32 | 33 | - (void)_waitForRunningActive; 34 | - (void)_launchUsingPlatformWithArguments:(id)arg1 environment:(id)arg2; 35 | - (void)_launchUsingXcodeWithArguments:(id)arg1 environment:(id)arg2; 36 | - (void)_waitForLaunchProgress; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCUICoordinate.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | #import 9 | 10 | @class XCUIElement; 11 | 12 | #if !TARGET_OS_TV 13 | @interface XCUICoordinate () 14 | { 15 | XCUIElement *_element; 16 | XCUICoordinate *_coordinate; 17 | CGVector _normalizedOffset; 18 | CGVector _pointsOffset; 19 | } 20 | 21 | @property(readonly) CGVector pointsOffset; // @synthesize pointsOffset=_pointsOffset; 22 | @property(readonly) CGVector normalizedOffset; // @synthesize normalizedOffset=_normalizedOffset; 23 | @property(readonly) XCUICoordinate *coordinate; // @synthesize coordinate=_coordinate; 24 | @property(readonly) XCUIElement *element; // @synthesize element=_element; 25 | 26 | - (id)initWithCoordinate:(id)arg1 pointsOffset:(CGVector)arg2; 27 | - (id)initWithElement:(id)arg1 normalizedOffset:(CGVector)arg2; 28 | - (id)init; 29 | 30 | - (void)pressForDuration:(double)arg1 thenDragToCoordinate:(id)arg2; 31 | - (void)pressForDuration:(double)arg1; 32 | - (void)doubleTap; 33 | - (void)tap; 34 | 35 | @end 36 | #endif 37 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCUIDevice.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface XCUIDevice () 10 | 11 | - (void)pressLockButton; 12 | - (void)holdHomeButtonForDuration:(double)arg1; 13 | - (void)_silentPressButton:(long long)arg1; 14 | - (void)_dispatchEventWithPage:(unsigned int)arg1 usage:(unsigned int)arg2 duration:(double)arg3; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCUIElementAsynchronousHandlerWrapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSString, NSUUID; 8 | 9 | @interface XCUIElementAsynchronousHandlerWrapper : NSObject 10 | { 11 | CDUnknownBlockType _handler; 12 | NSString *_handlerDescription; 13 | NSUUID *_identifier; 14 | } 15 | @property(copy) NSUUID *identifier; // @synthesize identifier=_identifier; 16 | @property(copy) NSString *handlerDescription; // @synthesize handlerDescription=_handlerDescription; 17 | @property(copy) CDUnknownBlockType handler; // @synthesize handler=_handler; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCUIElementHitPointCoordinate.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | #import 9 | 10 | #if !TARGET_OS_IPHONE 11 | 12 | @interface XCUIElementHitPointCoordinate : XCUICoordinate 13 | { 14 | } 15 | 16 | - (id)description; 17 | - (struct CGPoint)screenPoint; 18 | - (id)initWithCoordinate:(id)arg1 pointsOffset:(struct CGVector)arg2; 19 | - (id)initWithElement:(id)arg1 normalizedOffset:(struct CGVector)arg2; 20 | - (id)initWithElement:(id)arg1; 21 | 22 | @end 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCUIRecorderNodeFinderMatch.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSMutableArray, NSSet, XCSourceCodeTreeNode, XCUIRecorderNodeFinder; 8 | 9 | @interface XCUIRecorderNodeFinderMatch : NSObject 10 | { 11 | NSSet *_matchingSnapshots; 12 | XCSourceCodeTreeNode *_node; 13 | XCUIRecorderNodeFinder *_ancestorFinder; 14 | NSMutableArray *_descendantFinders; 15 | } 16 | @property(retain) NSMutableArray *descendantFinders; // @synthesize descendantFinders=_descendantFinders; 17 | @property(retain) XCUIRecorderNodeFinder *ancestorFinder; // @synthesize ancestorFinder=_ancestorFinder; 18 | @property(retain) XCSourceCodeTreeNode *node; // @synthesize node=_node; 19 | @property(copy) NSSet *matchingSnapshots; // @synthesize matchingSnapshots=_matchingSnapshots; 20 | 21 | - (void)invalidate; 22 | - (id)nodeIncludingDescendants; 23 | - (id)initWithNode:(id)arg1 matchingSnapshots:(id)arg2 ancestorFinder:(id)arg3; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCUIRecorderTimingMessage.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSString; 8 | 9 | @interface XCUIRecorderTimingMessage : NSObject 10 | { 11 | double _start; 12 | NSString *_message; 13 | } 14 | @property(copy) NSString *message; // @synthesize message=_message; 15 | @property double start; // @synthesize start=_start; 16 | 17 | + (id)descriptionForTimingMessages:(id)arg1; 18 | + (id)messageWithString:(id)arg1; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/XCUIScreen.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Nov 29 2017 14:55:25). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | @interface XCUIScreen() 8 | { 9 | _Bool _isMainScreen; 10 | int _displayID; 11 | } 12 | @property(readonly) _Bool isMainScreen; // @synthesize isMainScreen=_isMainScreen; 13 | @property(readonly) int displayID; // @synthesize displayID=_displayID; 14 | 15 | - (id)_clippedScreenshotData:(id)arg1 quality:(long long)arg2 rect:(struct CGRect)arg3 scale:(double)arg4; 16 | - (id)_screenshotDataForQuality:(long long)arg1 rect:(struct CGRect)arg2 error:(id *)arg3; 17 | - (id)screenshotDataForQuality:(long long)arg1 rect:(struct CGRect)arg2 error:(id *)arg3; 18 | - (id)screenshotDataForQuality:(long long)arg1 rect:(struct CGRect)arg2; 19 | - (id)_modernScreenshotDataForQuality:(long long)arg1 rect:(struct CGRect)arg2 error:(id *)arg3; 20 | - (id)screenshot; 21 | - (id)_imageFromData:(id)arg1; 22 | - (double)scale; 23 | - (id)initWithDisplayID:(int)arg1 isMainScreen:(_Bool)arg2; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/_XCKVOExpectationImplementation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSObject, NSString, XCTKVOExpectation; 10 | 11 | @interface _XCKVOExpectationImplementation : NSObject 12 | { 13 | XCTKVOExpectation *_expectation; 14 | id _observedObject; 15 | NSString *_keyPath; 16 | id _expectedValue; 17 | unsigned long long _options; 18 | CDUnknownBlockType _handler; 19 | NSObject *_queue; 20 | BOOL _hasCleanedUp; 21 | } 22 | @property(readonly) unsigned long long options; // @synthesize options=_options; 23 | @property(readonly) id expectedValue; // @synthesize expectedValue=_expectedValue; 24 | @property(readonly, copy) NSString *keyPath; // @synthesize keyPath=_keyPath; 25 | @property(readonly) id observedObject; // @synthesize observedObject=_observedObject; 26 | @property(copy) CDUnknownBlockType handler; 27 | 28 | - (void)cleanup; 29 | - (void)observeValueForKeyPath:(id)arg1 ofObject:(id)arg2 change:(id)arg3 context:(void *)arg4; 30 | - (id)initWithKeyPath:(id)arg1 object:(id)arg2 expectedValue:(id)arg3 expectation:(id)arg4 options:(unsigned long long)arg5; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/_XCTDarwinNotificationExpectationImplementation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSObject, NSString, XCTDarwinNotificationExpectation; 10 | 11 | @interface _XCTDarwinNotificationExpectationImplementation : NSObject 12 | { 13 | XCTDarwinNotificationExpectation *_expectation; 14 | NSString *_notificationName; 15 | int _notifyToken; 16 | CDUnknownBlockType _handler; 17 | NSObject *_queue; 18 | BOOL _hasCleanedUp; 19 | } 20 | @property(readonly, copy) NSString *notificationName; // @synthesize notificationName=_notificationName; 21 | @property(copy) CDUnknownBlockType handler; 22 | 23 | - (void)cleanup; 24 | - (void)_handleNotification; 25 | - (id)initWithNotificationName:(id)arg1 expectation:(id)arg2; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/_XCTNSNotificationExpectationImplementation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSNotificationCenter, NSObject, NSString, XCTNSNotificationExpectation; 10 | 11 | @interface _XCTNSNotificationExpectationImplementation : NSObject 12 | { 13 | XCTNSNotificationExpectation *_expectation; 14 | id _observedObject; 15 | NSString *_notificationName; 16 | NSNotificationCenter *_notificationCenter; 17 | CDUnknownBlockType _handler; 18 | NSObject *_queue; 19 | BOOL _hasCleanedUp; 20 | } 21 | @property(readonly) NSNotificationCenter *notificationCenter; // @synthesize notificationCenter=_notificationCenter; 22 | @property(readonly, copy) NSString *notificationName; // @synthesize notificationName=_notificationName; 23 | @property(readonly) id observedObject; // @synthesize observedObject=_observedObject; 24 | @property(copy) CDUnknownBlockType handler; 25 | 26 | - (void)cleanup; 27 | - (void)_observeExpectedNotification:(id)arg1; 28 | - (id)initWithName:(id)arg1 object:(id)arg2 notificationCenter:(id)arg3 expectation:(id)arg4; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/_XCTNSPredicateExpectationImplementation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSObject, NSPredicate, NSString, NSTimer, XCTNSPredicateExpectation; 10 | 11 | @interface _XCTNSPredicateExpectationImplementation : NSObject 12 | { 13 | XCTNSPredicateExpectation *_expectation; 14 | id _object; 15 | NSPredicate *_predicate; 16 | CDUnknownBlockType _handler; 17 | NSTimer *_timer; 18 | NSObject *_queue; 19 | BOOL _hasCleanedUp; 20 | } 21 | @property(readonly, copy) NSPredicate *predicate; // @synthesize predicate=_predicate; 22 | @property(readonly) id object; // @synthesize object=_object; 23 | @property(copy) CDUnknownBlockType handler; 24 | 25 | - (void)cleanup; 26 | - (void)_considerFulfilling; 27 | - (id)initWithPredicate:(id)arg1 object:(id)arg2 expectation:(id)arg3; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/_XCTestCaseInterruptionException.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @interface _XCTestCaseInterruptionException : NSException 8 | { 9 | } 10 | 11 | + (void)interruptTest; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/_XCTestImplementation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class XCTestRun; 8 | 9 | @interface _XCTestImplementation : NSObject 10 | { 11 | XCTestRun *_testRun; 12 | } 13 | @property(retain) XCTestRun *testRun; // @synthesize testRun=_testRun; 14 | @end 15 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/_XCTestObservationCenterImplementation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSMutableSet; 8 | 9 | @interface _XCTestObservationCenterImplementation : NSObject 10 | { 11 | NSMutableArray *_observers; 12 | BOOL _suspended; 13 | } 14 | 15 | @property BOOL suspended; // @synthesize suspended=_suspended; 16 | @property(retain) NSMutableArray *observers; // @synthesize observers=_observers; 17 | - (id)init; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /PrivateHeaders/XCTest/_XCTestSuiteImplementation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSMutableArray, NSString, XCTestConfiguration; 10 | 11 | @interface _XCTestSuiteImplementation : XCTest 12 | { 13 | NSString *_name; 14 | NSMutableArray *_tests; 15 | XCTestConfiguration *_testConfiguration; 16 | } 17 | @property(retain) XCTestConfiguration *testConfiguration; // @synthesize testConfiguration=_testConfiguration; 18 | @property(retain) NSMutableArray *tests; // @synthesize tests=_tests; 19 | @property(copy) NSString *name; // @synthesize name=_name; 20 | 21 | - (id)initWithName:(id)arg1; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Scripts/build-socket.sh: -------------------------------------------------------------------------------- 1 | CURRENT_DIR=$(pwd) 2 | INSPECTOR_DIR="$CURRENT_DIR/Inspector" 3 | cd "$INSPECTOR_DIR" 4 | echo "Building Inspector for socket..." 5 | npm run build 6 | echo "Done" -------------------------------------------------------------------------------- /Scripts/start-server.sh: -------------------------------------------------------------------------------- 1 | CURRENT_DIR=$(pwd) 2 | INSPECTOR_DIR="$CURRENT_DIR/Inspector" 3 | cd "$INSPECTOR_DIR" 4 | echo "Starting Server" 5 | node server 6 | -------------------------------------------------------------------------------- /WebDriverAgent.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WebDriverAgent.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /WebDriverAgent.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/NSExpression+FBFormat.h: -------------------------------------------------------------------------------- 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 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface NSExpression (FBFormat) 15 | 16 | /** 17 | Method used to normalize/verify NSExpression expressions before passing them to WDA. 18 | Only expressions of NSKeyPathExpressionType are going to be verified. 19 | Allowed property names are only these declared in FBElement protocol (property names are received in runtime) 20 | and their shortcuts (without 'wd' prefix). All other property names are considered as unknown. 21 | 22 | @param input expression object received from user input 23 | @return formatted expression 24 | @throw FBUnknownPredicateKeyException in case the given property name is not declared in FBElement protocol 25 | */ 26 | + (instancetype)fb_wdExpressionWithExpression:(NSExpression *)input; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/NSExpression+FBFormat.m: -------------------------------------------------------------------------------- 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 "NSExpression+FBFormat.h" 11 | #import "FBElementUtils.h" 12 | 13 | @implementation NSExpression (FBFormat) 14 | 15 | + (instancetype)fb_wdExpressionWithExpression:(NSExpression *)input 16 | { 17 | if ([input expressionType] != NSKeyPathExpressionType) { 18 | return input; 19 | } 20 | NSString *propName = [input keyPath]; 21 | NSUInteger dotPos = [propName rangeOfString:@"."].location; 22 | if (NSNotFound != dotPos) { 23 | NSString *actualPropName = [propName substringToIndex:dotPos]; 24 | NSString *suffix = [propName substringFromIndex:(dotPos + 1)]; 25 | return [NSExpression expressionForKeyPath:[NSString stringWithFormat:@"%@.%@", [FBElementUtils wdAttributeNameForAttributeName:actualPropName], suffix]]; 26 | } 27 | return [NSExpression expressionForKeyPath:[FBElementUtils wdAttributeNameForAttributeName:propName]]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/NSString+FBVisualLength.h: -------------------------------------------------------------------------------- 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 11 | 12 | @interface NSString (FBVisualLength) 13 | 14 | /** 15 | Helper method that returns length of string with trimmed whitespaces 16 | */ 17 | - (NSUInteger)fb_visualLength; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/NSString+FBVisualLength.m: -------------------------------------------------------------------------------- 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 "NSString+FBVisualLength.h" 11 | 12 | @implementation NSString (FBVisualLength) 13 | 14 | - (NSUInteger)fb_visualLength 15 | { 16 | return [self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]].length; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/NSString+FBXMLSafeString.h: -------------------------------------------------------------------------------- 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 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface NSString (FBXMLSafeString) 15 | 16 | /** 17 | Method used to normalize a string before passing it to XML document 18 | 19 | @param replacement The string to be used as a replacement for invalid XML characters 20 | @return The string where all characters, which are not members of 21 | XML Character Range definition (http://www.w3.org/TR/2008/REC-xml-20081126/#charsets), 22 | are replaced 23 | */ 24 | - (NSString *)fb_xmlSafeStringWithReplacement:(NSString *)replacement; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/NSString+FBXMLSafeString.m: -------------------------------------------------------------------------------- 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 "NSString+FBXMLSafeString.h" 11 | 12 | @implementation NSString (FBXMLSafeString) 13 | 14 | - (NSString *)fb_xmlSafeStringWithReplacement:(NSString *)replacement 15 | { 16 | static NSMutableCharacterSet *invalidSet; 17 | static dispatch_once_t onceToken; 18 | dispatch_once(&onceToken, ^{ 19 | // Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] 20 | invalidSet = [NSMutableCharacterSet characterSetWithRange:NSMakeRange(0x9, 1)]; 21 | [invalidSet addCharactersInRange:NSMakeRange(0xA, 1)]; 22 | [invalidSet addCharactersInRange:NSMakeRange(0xD, 1)]; 23 | [invalidSet addCharactersInRange:NSMakeRange(0x20, 0xD7FF - 0x20 + 1)]; 24 | [invalidSet addCharactersInRange:NSMakeRange(0xE000, 0xFFFD - 0xE000 + 1)]; 25 | [invalidSet addCharactersInRange:NSMakeRange(0x10000, 0x10FFFF - 0x10000 + 1)]; 26 | [invalidSet invert]; 27 | }); 28 | return [[self componentsSeparatedByCharactersInSet:invalidSet] componentsJoinedByString:replacement]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCElementSnapshot+FBHitPoint.h: -------------------------------------------------------------------------------- 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 11 | 12 | @interface XCElementSnapshot (FBHitPoint) 13 | 14 | /** 15 | Wrapper for Apple's hitpoint, thats resolves few known issues 16 | 17 | @return Element's hitpoint if exists {-1, -1} otherwise 18 | */ 19 | - (CGPoint)fb_hitPoint; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCElementSnapshot+FBHitPoint.m: -------------------------------------------------------------------------------- 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 "XCElementSnapshot+FBHitPoint.h" 11 | #import "FBLogger.h" 12 | 13 | @implementation XCElementSnapshot (FBHitPoint) 14 | 15 | - (CGPoint)fb_hitPoint 16 | { 17 | @try { 18 | return [self hitPoint]; 19 | } @catch (NSException *e) { 20 | [FBLogger logFmt:@"Failed to fetch hit point for %@ - %@", self.debugDescription, e.reason]; 21 | return CGPointMake(-1, -1); // Same what XCTest does 22 | } 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.h: -------------------------------------------------------------------------------- 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 11 | 12 | @class XCElementSnapshot; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface XCUIApplication (FBHelpers) 17 | 18 | /** 19 | Deactivates application for given time 20 | 21 | @param duration amount of time application should deactivated 22 | @param error If there is an error, upon return contains an NSError object that describes the problem. 23 | @return YES if the operation succeeds, otherwise NO. 24 | */ 25 | - (BOOL)fb_deactivateWithDuration:(NSTimeInterval)duration error:(NSError **)error; 26 | 27 | /** 28 | Return application elements tree in form of nested dictionaries 29 | */ 30 | - (NSDictionary *)fb_tree; 31 | 32 | /** 33 | Return application elements accessibility tree in form of nested dictionaries 34 | */ 35 | - (NSDictionary *)fb_accessibilityTree; 36 | 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCUICoordinate+FBFix.h: -------------------------------------------------------------------------------- 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 11 | 12 | @interface XCUICoordinate (FBFix) 13 | 14 | - (CGPoint)fb_screenPoint; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCUICoordinate+FBFix.m: -------------------------------------------------------------------------------- 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 "XCUICoordinate+FBFix.h" 11 | 12 | #import "XCUICoordinate.h" 13 | #import "XCUIElement+FBUtilities.h" 14 | #import "XCElementSnapshot+FBHitPoint.h" 15 | 16 | @implementation XCUICoordinate (FBFix) 17 | 18 | - (CGPoint)fb_screenPoint 19 | { 20 | CGPoint referencePoint = CGPointMake(0, 0); 21 | if (self.element) { 22 | CGRect frame = self.element.frame; 23 | referencePoint = CGPointMake( 24 | CGRectGetMinX(frame) + CGRectGetWidth(frame) * self.normalizedOffset.dx, 25 | CGRectGetMinY(frame) + CGRectGetHeight(frame) * self.normalizedOffset.dy); 26 | } 27 | else if (self.coordinate) { 28 | referencePoint = self.coordinate.fb_screenPoint; 29 | } 30 | CGPoint screenPoint = CGPointMake( 31 | referencePoint.x + self.pointsOffset.dx, 32 | referencePoint.y + self.pointsOffset.dy); 33 | CGRect rect = self.referencedElement.frame; 34 | return CGPointMake( 35 | MIN(CGRectGetMaxX(rect), screenPoint.x), 36 | MIN(CGRectGetMaxY(rect), screenPoint.y)); 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCUIDevice+FBHealthCheck.h: -------------------------------------------------------------------------------- 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 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | 15 | @interface XCUIDevice (FBHealthCheck) 16 | 17 | /** 18 | Checks health of XCTest by: 19 | 1) Querying application for some elements, 20 | 2) Triggering some device events. 21 | 22 | !!! Health check might modify simulator state so it should only be called in-between testing sessions 23 | 24 | @param application application used to issue queries 25 | @return YES if the operation succeeds, otherwise NO. 26 | */ 27 | - (BOOL)fb_healthCheckWithApplication:(nullable XCUIApplication *)application; 28 | 29 | @end 30 | 31 | NS_ASSUME_NONNULL_END 32 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCUIDevice+FBHealthCheck.m: -------------------------------------------------------------------------------- 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 "XCUIDevice+FBHealthCheck.h" 11 | 12 | #import "XCUIDevice+FBRotation.h" 13 | #import "XCUIApplication+FBHelpers.h" 14 | 15 | @implementation XCUIDevice (FBHealthCheck) 16 | 17 | - (BOOL)fb_healthCheckWithApplication:(nullable XCUIApplication *)application 18 | { 19 | if (![self fb_elementQueryCheckWithApplication:application]) { 20 | return NO; 21 | } 22 | if (![self fb_deviceInteractionCheck]) { 23 | return NO; 24 | } 25 | return YES; 26 | } 27 | 28 | - (BOOL)fb_elementQueryCheckWithApplication:(nullable XCUIApplication *)application 29 | { 30 | if (!application) { 31 | return NO; 32 | } 33 | if (!application.label) { 34 | return NO; 35 | } 36 | if ([application descendantsMatchingType:XCUIElementTypeAny].count == 0 ) { 37 | return NO; 38 | } 39 | return YES; 40 | } 41 | 42 | - (BOOL)fb_deviceInteractionCheck 43 | { 44 | [self pressButton:XCUIDeviceButtonHome]; 45 | return YES; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCUIDevice+FBRotation.h: -------------------------------------------------------------------------------- 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 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface XCUIDevice (FBRotation) 16 | 17 | /** 18 | Sets requested device interface orientation. 19 | 20 | @param orientation The interface orientation. 21 | @return YES if the operation succeeds, otherwise NO. 22 | */ 23 | - (BOOL)fb_setDeviceInterfaceOrientation:(UIDeviceOrientation)orientation; 24 | 25 | /** 26 | Sets the devices orientation to the rotation passed. 27 | 28 | @param rotationObj The rotation defining the devices orientation. 29 | @return YES if the operation succeeds, otherwise NO. 30 | */ 31 | - (BOOL)fb_setDeviceRotation:(NSDictionary *)rotationObj; 32 | 33 | /*! The UIDeviceOrientation to rotation mappings */ 34 | @property (strong, nonatomic, readonly) NSDictionary *fb_rotationMapping; 35 | 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCUIElement+FBAccessibility.h: -------------------------------------------------------------------------------- 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 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface XCUIElement (FBAccessibility) 16 | 17 | /*! Whether or not the element is accessible */ 18 | @property (atomic, readonly) BOOL fb_isAccessibilityElement; 19 | 20 | @end 21 | 22 | 23 | @interface XCElementSnapshot (FBAccessibility) 24 | 25 | /*! Whether or not the element in snapshot is accessible */ 26 | @property (atomic, readonly) BOOL fb_isAccessibilityElement; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCUIElement+FBAccessibility.m: -------------------------------------------------------------------------------- 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 "XCUIElement+FBAccessibility.h" 11 | 12 | #import "XCElementSnapshot+FBHelpers.h" 13 | #import "XCTestPrivateSymbols.h" 14 | #import "XCUIElement+FBUtilities.h" 15 | 16 | @implementation XCUIElement (FBAccessibility) 17 | 18 | - (BOOL)fb_isAccessibilityElement 19 | { 20 | return self.fb_lastSnapshot.fb_isAccessibilityElement; 21 | } 22 | 23 | @end 24 | 25 | @implementation XCElementSnapshot (FBAccessibility) 26 | 27 | - (BOOL)fb_isAccessibilityElement 28 | { 29 | return [(NSNumber *)[self fb_attributeValue:FB_XCAXAIsElementAttribute] boolValue]; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCUIElement+FBIsVisible.h: -------------------------------------------------------------------------------- 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 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface XCUIElement (FBIsVisible) 16 | 17 | /*! Whether or not the element is visible */ 18 | @property (atomic, readonly) BOOL fb_isVisible; 19 | 20 | @end 21 | 22 | 23 | @interface XCElementSnapshot (FBIsVisible) 24 | 25 | /*! Whether or not the element is visible */ 26 | @property (atomic, readonly) BOOL fb_isVisible; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCUIElement+FBPickerWheel.m: -------------------------------------------------------------------------------- 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 "XCUIElement+FBPickerWheel.h" 11 | 12 | #import "FBRunLoopSpinner.h" 13 | #import "XCUICoordinate.h" 14 | 15 | @implementation XCUIElement (FBPickerWheel) 16 | 17 | static const NSTimeInterval VALUE_CHANGE_TIMEOUT = 2; 18 | 19 | - (BOOL)fb_scrollWithOffset:(CGFloat)relativeHeightOffset error:(NSError **)error 20 | { 21 | NSString *previousValue = self.value; 22 | XCUICoordinate *startCoord = [self coordinateWithNormalizedOffset:CGVectorMake(0.5, 0.5)]; 23 | XCUICoordinate *endCoord = [startCoord coordinateWithOffset:CGVectorMake(0.0, relativeHeightOffset * self.frame.size.height)]; 24 | [endCoord tap]; 25 | return [[[[FBRunLoopSpinner new] 26 | timeout:VALUE_CHANGE_TIMEOUT] 27 | timeoutErrorMessage:[NSString stringWithFormat:@"Picker wheel value has not been changed after %@ seconds timeout", @(VALUE_CHANGE_TIMEOUT)]] 28 | spinUntilTrue:^BOOL{ 29 | [self resolve]; 30 | return ![self.value isEqualToString:previousValue]; 31 | } 32 | error:error]; 33 | } 34 | 35 | - (BOOL)fb_selectNextOptionWithOffset:(CGFloat)offset error:(NSError **)error 36 | { 37 | return [self fb_scrollWithOffset:offset error:error]; 38 | } 39 | 40 | - (BOOL)fb_selectPreviousOptionWithOffset:(CGFloat)offset error:(NSError **)error 41 | { 42 | return [self fb_scrollWithOffset:-offset error:error]; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCUIElement+FBTap.h: -------------------------------------------------------------------------------- 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 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface XCUIElement (FBTap) 15 | 16 | /** 17 | Waits for element to become stable (not move) and performs sync tap on element 18 | 19 | @param error If there is an error, upon return contains an NSError object that describes the problem. 20 | @return YES if the operation succeeds, otherwise NO. 21 | */ 22 | - (BOOL)fb_tapWithError:(NSError **)error; 23 | 24 | /** 25 | Waits for element to become stable (not move) and performs sync tap on element 26 | 27 | @param relativeCoordinate hit point coordinate relative to the current element position 28 | @param error If there is an error, upon return contains an NSError object that describes the problem. 29 | @return YES if the operation succeeds, otherwise NO. 30 | */ 31 | - (BOOL)fb_tapCoordinate:(CGPoint)relativeCoordinate error:(NSError **)error; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCUIElement+FBUID.h: -------------------------------------------------------------------------------- 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 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface XCUIElement (FBUID) 16 | 17 | /*! Represents unique internal element identifier, which is the same for an element and its snapshot */ 18 | @property (nonatomic, readonly) NSUInteger fb_uid; 19 | 20 | @end 21 | 22 | 23 | @interface XCElementSnapshot (FBUID) 24 | 25 | /*! Represents unique internal element identifier, which is the same for an element and its snapshot */ 26 | @property (nonatomic, readonly) NSUInteger fb_uid; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCUIElement+FBUID.m: -------------------------------------------------------------------------------- 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 "XCUIElement+FBUID.h" 11 | 12 | #import "XCAccessibilityElement.h" 13 | #import "XCUIElement+FBUtilities.h" 14 | 15 | @implementation XCUIElement (FBUID) 16 | 17 | - (NSUInteger)fb_uid 18 | { 19 | return self.fb_lastSnapshot.fb_uid; 20 | } 21 | 22 | @end 23 | 24 | static BOOL FBShouldUsePayloadForUIDExtraction = YES; 25 | static dispatch_once_t oncePayloadToken; 26 | @implementation XCElementSnapshot (FBUID) 27 | 28 | - (NSUInteger)fb_uid 29 | { 30 | dispatch_once(&oncePayloadToken, ^{ 31 | FBShouldUsePayloadForUIDExtraction = [self.accessibilityElement respondsToSelector:@selector(payload)]; 32 | }); 33 | if (FBShouldUsePayloadForUIDExtraction) { 34 | return [[self.accessibilityElement.payload objectForKey:@"uid.elementID"] intValue]; 35 | } 36 | return [[self.accessibilityElement valueForKey:@"_elementID"] intValue]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Categories/XCUIElement+FBWebDriverAttributes.h: -------------------------------------------------------------------------------- 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 11 | #import 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface XCUIElement (WebDriverAttributes) 17 | 18 | @end 19 | 20 | 21 | @interface XCElementSnapshot (WebDriverAttributes) 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Commands/FBAlertViewCommands.h: -------------------------------------------------------------------------------- 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 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface FBAlertViewCommands : NSObject 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Commands/FBCustomCommands.h: -------------------------------------------------------------------------------- 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 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface FBCustomCommands : NSObject 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Commands/FBDebugCommands.h: -------------------------------------------------------------------------------- 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 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface FBDebugCommands : NSObject 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Commands/FBElementCommands.h: -------------------------------------------------------------------------------- 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 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface FBElementCommands : NSObject 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Commands/FBFindElementCommands.h: -------------------------------------------------------------------------------- 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 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface FBFindElementCommands : NSObject 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Commands/FBInspectorCommands.h: -------------------------------------------------------------------------------- 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 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface FBInspectorCommands : NSObject 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Commands/FBInspectorCommands.m: -------------------------------------------------------------------------------- 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 "FBInspectorCommands.h" 11 | 12 | @implementation FBInspectorCommands 13 | 14 | #pragma mark - 15 | 16 | + (NSArray *)routes 17 | { 18 | return @[ 19 | [[FBRoute GET:@"/inspector"].withoutSession respondWithBlock: ^ id (FBRouteRequest *request) { 20 | return FBResponseFileWithPath([[self class] inspectorHTMLFilePath]); 21 | }], 22 | [[FBRoute GET:@"/inspector.js"].withoutSession respondWithBlock: ^ id (FBRouteRequest *request) { 23 | return FBResponseFileWithPath([[self class] inspectorJSFilePath]); 24 | }], 25 | ]; 26 | } 27 | 28 | + (NSBundle *)inspectorResourcesBundle 29 | { 30 | static dispatch_once_t onceToken; 31 | static NSBundle *inspectorResourcesBundle; 32 | dispatch_once(&onceToken, ^{ 33 | NSURL *url = [[NSBundle bundleForClass:[self class]] 34 | URLForResource:@"WebDriverAgent" withExtension:@"bundle"]; 35 | inspectorResourcesBundle = [NSBundle bundleWithURL:url]; 36 | }); 37 | return inspectorResourcesBundle; 38 | } 39 | 40 | + (NSString *)inspectorHTMLFilePath 41 | { 42 | return [[self inspectorResourcesBundle] pathForResource:@"index" ofType:@"html"]; 43 | } 44 | 45 | + (NSString *)inspectorJSFilePath 46 | { 47 | return [[self inspectorResourcesBundle] pathForResource:@"inspector" ofType:@"js"]; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Commands/FBOrientationCommands.h: -------------------------------------------------------------------------------- 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 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface FBOrientationCommands : NSObject 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Commands/FBScreenshotCommands.h: -------------------------------------------------------------------------------- 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 11 | #import "FBApplication.h" 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface FBScreenshotCommands : NSObject 17 | 18 | + (id)handleGetScreenshotWithScreenMeta:(UIInterfaceOrientation) orientation andScreenWidth:(CGFloat) screenWidth andScreenHeight:(CGFloat) screenHeight; 19 | 20 | + (id)handleGetScreenshotWithScreenMeta:(UIInterfaceOrientation) orientation andScreenWidth:(CGFloat) screenWidth andScreenHeight:(CGFloat) screenHeight andPrevScreenData:(NSString*) prevScreenData; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Commands/FBSessionCommands.h: -------------------------------------------------------------------------------- 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 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface FBSessionCommands : NSObject 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Commands/FBTouchIDCommands.h: -------------------------------------------------------------------------------- 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 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface FBTouchIDCommands : NSObject 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Commands/FBTouchIDCommands.m: -------------------------------------------------------------------------------- 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 "FBTouchIDCommands.h" 11 | 12 | #import "FBRouteRequest.h" 13 | 14 | #import "XCUIDevice+FBHelpers.h" 15 | 16 | @implementation FBTouchIDCommands 17 | 18 | + (NSArray *)routes 19 | { 20 | return @[ 21 | [[FBRoute POST:@"/wda/touch_id"] respondWithBlock: ^ id (FBRouteRequest *request) { 22 | if (![[XCUIDevice sharedDevice] fb_fingerTouchShouldMatch:[request.arguments[@"match"] boolValue]]) { 23 | return FBResponseWithStatus(FBCommandStatusUnsupported, nil); 24 | } 25 | return FBResponseWithOK(); 26 | }], 27 | ]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Commands/FBUnknownCommands.h: -------------------------------------------------------------------------------- 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 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface FBUnknownCommands : NSObject 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Commands/FBUnknownCommands.m: -------------------------------------------------------------------------------- 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 "FBUnknownCommands.h" 11 | 12 | #import "FBRouteRequest.h" 13 | 14 | @implementation FBUnknownCommands 15 | 16 | #pragma mark - 17 | 18 | + (BOOL)shouldRegisterAutomatically 19 | { 20 | return NO; 21 | } 22 | 23 | + (NSArray *)routes 24 | { 25 | return 26 | @[ 27 | [[FBRoute GET:@"/*"].withoutSession respondWithTarget:self action:@selector(unhandledHandler:)], 28 | [[FBRoute POST:@"/*"].withoutSession respondWithTarget:self action:@selector(unhandledHandler:)], 29 | [[FBRoute PUT:@"/*"].withoutSession respondWithTarget:self action:@selector(unhandledHandler:)], 30 | [[FBRoute DELETE:@"/*"].withoutSession respondWithTarget:self action:@selector(unhandledHandler:)] 31 | ]; 32 | } 33 | 34 | + (id)unhandledHandler:(FBRouteRequest *)request 35 | { 36 | return 37 | FBResponseWithStatus( 38 | FBCommandStatusUnsupported, 39 | [NSString stringWithFormat:@"Unhandled endpoint: %@ with parameters %@", request.URL, request.parameters] 40 | ); 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /WebDriverAgentLib/FBApplication.h: -------------------------------------------------------------------------------- 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 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface FBApplication : XCUIApplication 15 | 16 | /** 17 | Constructor used to get current active application 18 | */ 19 | + (nullable instancetype)fb_activeApplication; 20 | 21 | /** 22 | It allows to turn on/off waiting for application quiescence, while performing queries. Defaults to NO. 23 | */ 24 | @property (nonatomic, assign) BOOL fb_shouldWaitForQuiescence; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /WebDriverAgentLib/FBApplicationProcessProxy.h: -------------------------------------------------------------------------------- 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 11 | 12 | @class XCUIApplicationProcess; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Proxy that would forward all calls to it's applicationProcess. 18 | However it will block call to waitForQuiescence if shouldWaitForQuiescence is set to NO 19 | */ 20 | @interface FBApplicationProcessProxy : NSObject 21 | 22 | /** 23 | Convenience initializer 24 | */ 25 | + (instancetype)proxyWithApplicationProcess:(XCUIApplicationProcess *)applicationProcess; 26 | 27 | /** 28 | It allows to turn on/off waiting for application quiescence, while performing queries. Defaults to NO. 29 | */ 30 | @property (nonatomic, assign) BOOL shouldWaitForQuiescence; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /WebDriverAgentLib/FBApplicationProcessProxy.m: -------------------------------------------------------------------------------- 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 "FBApplicationProcessProxy.h" 11 | 12 | #import "XCUIApplicationProcess.h" 13 | 14 | @interface FBApplicationProcessProxy () 15 | @property (nonatomic, strong) XCUIApplicationProcess *applicationProcess; 16 | @end 17 | 18 | @implementation FBApplicationProcessProxy 19 | 20 | + (instancetype)proxyWithApplicationProcess:(XCUIApplicationProcess *)applicationProcess 21 | { 22 | NSParameterAssert(applicationProcess); 23 | FBApplicationProcessProxy *proxy = [self.class new]; 24 | proxy.applicationProcess = applicationProcess; 25 | return proxy; 26 | } 27 | 28 | - (void)waitForQuiescence 29 | { 30 | if (!self.shouldWaitForQuiescence) { 31 | return; 32 | } 33 | if ([self.applicationProcess respondsToSelector:@selector(waitForQuiescenceIncludingAnimationsIdle:)]) { 34 | [self.applicationProcess waitForQuiescenceIncludingAnimationsIdle:YES]; 35 | return; 36 | } 37 | [self.applicationProcess waitForQuiescence]; 38 | } 39 | 40 | - (void)waitForQuiescenceIncludingAnimationsIdle:(BOOL)includeAnimations 41 | { 42 | if (!self.shouldWaitForQuiescence) { 43 | return; 44 | } 45 | [self.applicationProcess waitForQuiescenceIncludingAnimationsIdle:includeAnimations]; 46 | } 47 | 48 | - (id)forwardingTargetForSelector:(SEL)aSelector 49 | { 50 | return self.applicationProcess; 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /WebDriverAgentLib/FBSpringboardApplication.h: -------------------------------------------------------------------------------- 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 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /*! Bundle identifier of Springboard app */ 15 | extern NSString *const SPRINGBOARD_BUNDLE_ID; 16 | 17 | @interface FBSpringboardApplication : FBApplication 18 | 19 | /** 20 | @return FBApplication that is attached to SpringBoard 21 | */ 22 | + (instancetype)fb_springboard; 23 | 24 | /** 25 | Taps application on SpringBoard app with given identifier 26 | 27 | @param identifier identifier of the application to tap 28 | @param error If there is an error, upon return contains an NSError object that describes the problem. 29 | @return YES if the operation succeeds, otherwise NO. 30 | */ 31 | - (BOOL)fb_tapApplicationWithIdentifier:(NSString *)identifier error:(NSError **)error; 32 | 33 | /** 34 | Waits until application board is visible with timeout 35 | 36 | @param error If there is an error, upon return contains an NSError object that describes the problem. 37 | @return YES if the operation succeeds, otherwise NO. 38 | */ 39 | - (BOOL)fb_waitUntilApplicationBoardIsVisible:(NSError **)error; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.facebook.wda.lib 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBCommandHandler.h: -------------------------------------------------------------------------------- 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 11 | 12 | #import 13 | #import 14 | #import 15 | #import 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | /** 20 | Protocol for Classes to declare intent to implement responses to commands 21 | */ 22 | @protocol FBCommandHandler 23 | 24 | /** 25 | * Should return map of FBRouteCommandHandler block with keys as supported routes 26 | * 27 | * @return map an NSArray of routes. 28 | */ 29 | + (NSArray *)routes; 30 | 31 | @optional 32 | /** 33 | * @return BOOL deciding if class should be added to route handlers automatically, default (if not implemented) is YES 34 | */ 35 | + (BOOL)shouldRegisterAutomatically; 36 | 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBElementCache.h: -------------------------------------------------------------------------------- 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 11 | 12 | @class XCUIElement; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface FBElementCache : NSObject 17 | 18 | /** 19 | Stores element in cache 20 | 21 | @param element element to store 22 | @return element's uuid 23 | */ 24 | - (NSString *)storeElement:(XCUIElement *)element; 25 | 26 | /** 27 | Returns cached element 28 | 29 | @param uuid uuid of element to fetch 30 | @return element 31 | */ 32 | - (nullable XCUIElement *)elementForUUID:(NSString *__nullable)uuid; 33 | 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBElementCache.m: -------------------------------------------------------------------------------- 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 "FBElementCache.h" 11 | 12 | #import "FBAlert.h" 13 | #import "XCUIElement.h" 14 | #import "XCUIElement+FBUtilities.h" 15 | 16 | 17 | @interface FBElementCache () 18 | @property (atomic, strong) NSMutableDictionary *elementCache; 19 | @end 20 | 21 | @implementation FBElementCache 22 | 23 | - (instancetype)init 24 | { 25 | self = [super init]; 26 | if (!self) { 27 | return nil; 28 | } 29 | _elementCache = [[NSMutableDictionary alloc] init]; 30 | return self; 31 | } 32 | 33 | - (NSString *)storeElement:(XCUIElement *)element 34 | { 35 | NSString *uuid = [[NSUUID UUID] UUIDString]; 36 | self.elementCache[uuid] = element; 37 | return uuid; 38 | } 39 | 40 | - (XCUIElement *)elementForUUID:(NSString *)uuid 41 | { 42 | if (!uuid) { 43 | return nil; 44 | } 45 | XCUIElement *element = self.elementCache[uuid]; 46 | [element resolve]; 47 | return element; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBExceptionHandler.h: -------------------------------------------------------------------------------- 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 11 | #import 12 | #import "FBRouteResponse.h" 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /*! Exception used to notify about missing session */ 17 | extern NSString *const FBSessionDoesNotExistException; 18 | 19 | /*! Exception used to notify about application deadlock */ 20 | extern NSString *const FBApplicationDeadlockDetectedException; 21 | 22 | /*! Exception used to notify about unknown attribute */ 23 | extern NSString *const FBElementAttributeUnknownException; 24 | 25 | /*! Exception used to notify about invalid argument */ 26 | extern NSString *const FBInvalidArgumentException; 27 | 28 | /** 29 | Class used to handle exceptions raised by command handlers 30 | */ 31 | @interface FBExceptionHandler : NSObject 32 | 33 | /** 34 | Handles 'exception' for 'webServer' raised while handling 'response' 35 | 36 | @param webServer server for which exception is handled 37 | @param exception exception that needs handling 38 | @param response response related to that exception 39 | @return YES, if exception was handled, otherwise NO 40 | */ 41 | - (BOOL) handleException:(NSException *)exception forResponse:(FBRouteResponse *)response; 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBResponseFilePayload.h: -------------------------------------------------------------------------------- 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 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Class that represents WebDriverAgent file respond 18 | */ 19 | @interface FBResponseFilePayload : NSObject 20 | 21 | /** 22 | Initializer for respond that returns content of file at given 'path' 23 | */ 24 | - (instancetype)initWithFilePath:(NSString *)path; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBResponseFilePayload.m: -------------------------------------------------------------------------------- 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 "FBResponseFilePayload.h" 11 | 12 | #import 13 | #import "FBRouteResponse.h" 14 | 15 | @interface FBResponseFilePayload () 16 | 17 | @property (nonatomic, copy, readonly) NSString *path; 18 | 19 | @end 20 | 21 | @implementation FBResponseFilePayload 22 | 23 | - (instancetype)initWithFilePath:(NSString *)path 24 | { 25 | NSParameterAssert(path); 26 | if (!path) { 27 | return nil; 28 | } 29 | 30 | self = [super init]; 31 | if (self) { 32 | _path = path; 33 | } 34 | return self; 35 | } 36 | 37 | - (void)dispatchWithResponse:(FBRouteResponse *)response 38 | { 39 | [response respondWithFile:self.path]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBResponseJSONPayload.h: -------------------------------------------------------------------------------- 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 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Class that represents WebDriverAgent JSON repsonse 18 | */ 19 | @interface FBResponseJSONPayload : NSObject 20 | @property (nonatomic, copy, readonly) NSDictionary *dictionary; 21 | 22 | /** 23 | Initializer for JSON respond that converts given 'dictionary' to JSON 24 | */ 25 | - (instancetype)initWithDictionary:(NSDictionary *)dictionary; 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBResponseJSONPayload.m: -------------------------------------------------------------------------------- 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 "FBResponseJSONPayload.h" 11 | 12 | #import 13 | #import "FBRouteResponse.h" 14 | 15 | @interface FBResponseJSONPayload () 16 | 17 | @property (nonatomic, copy, readwrite) NSDictionary *dictionary; 18 | 19 | @end 20 | 21 | @implementation FBResponseJSONPayload 22 | 23 | - (instancetype)initWithDictionary:(NSDictionary *)dictionary 24 | { 25 | NSParameterAssert(dictionary); 26 | if (!dictionary) { 27 | return nil; 28 | } 29 | 30 | self = [super init]; 31 | if (self) { 32 | _dictionary = dictionary; 33 | } 34 | return self; 35 | } 36 | 37 | - (void)dispatchWithResponse:(FBRouteResponse *)response 38 | { 39 | NSError *error; 40 | NSData *jsonData = [NSJSONSerialization dataWithJSONObject:self.dictionary 41 | options:NSJSONWritingPrettyPrinted 42 | error:&error]; 43 | NSCAssert(jsonData, @"Valid JSON must be responded, error of %@", error); 44 | [response setHeader:@"Content-Type" value:@"application/json;charset=UTF-8"]; 45 | [response respondWithData:jsonData]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBRouteRequest-Private.h: -------------------------------------------------------------------------------- 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 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface FBRouteRequest () 15 | @property (nonatomic, strong, readwrite) NSURL *URL; 16 | @property (nonatomic, copy, readwrite) NSDictionary *parameters; 17 | @property (nonatomic, copy, readwrite) NSDictionary *arguments; 18 | @property (nonatomic, strong, readwrite) FBSession *session; 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBRouteRequest.h: -------------------------------------------------------------------------------- 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 11 | 12 | @class FBSession; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Class that represents WebDriverAgent command request 18 | */ 19 | @interface FBRouteRequest : NSObject 20 | 21 | /*! Request's URL */ 22 | @property (nonatomic, strong, readonly) NSURL *URL; 23 | 24 | /*! Parameters sent with that request */ 25 | @property (nonatomic, copy, readonly) NSDictionary *parameters; 26 | 27 | /*! Arguments sent with that request */ 28 | @property (nonatomic, copy, readonly) NSDictionary *arguments; 29 | 30 | /*! Session associated with that request */ 31 | @property (nonatomic, strong, readonly) FBSession *session; 32 | 33 | /** 34 | Convenience constructor for request 35 | */ 36 | + (instancetype)routeRequestWithURL:(NSURL *)URL parameters:(NSDictionary *)parameters arguments:(NSDictionary *)arguments; 37 | 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBRouteRequest.m: -------------------------------------------------------------------------------- 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 "FBRouteRequest-Private.h" 11 | 12 | @implementation FBRouteRequest 13 | 14 | + (instancetype)routeRequestWithURL:(NSURL *)URL parameters:(NSDictionary *)parameters arguments:(NSDictionary *)arguments 15 | { 16 | FBRouteRequest *request = [self.class new]; 17 | request.URL = URL; 18 | request.parameters = parameters; 19 | request.arguments = arguments; 20 | return request; 21 | } 22 | 23 | - (NSString *)description 24 | { 25 | return [NSString stringWithFormat: 26 | @"Request URL %@ | Params %@ | Arguments %@", 27 | self.URL, 28 | self.parameters, 29 | self.arguments 30 | ]; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBRouteResponse.h: -------------------------------------------------------------------------------- 1 | // 2 | // FBRouteResponse.h 3 | // WebDriverAgentLib 4 | // 5 | // Created by SHUBHANKAR YASH on 08/01/18. 6 | // Copyright © 2018 Facebook. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | @interface FBRouteResponse: NSObject 14 | 15 | @property (strong, nonatomic) RouteResponse* response; 16 | @property (strong, nonatomic) SocketAckEmitter* socketAck; 17 | 18 | - (id)initWithRouteResponse:(RouteResponse *)response; 19 | - (id)initWithSocketAck:(SocketAckEmitter *)socketAck; 20 | - (void)setHeader:(NSString *)field value:(NSString *)value; 21 | - (void)respondWithString:(NSString *)string; 22 | - (void)respondWithString:(NSString *)string encoding:(NSStringEncoding)encoding; 23 | - (void)respondWithData:(NSData *)data; 24 | - (void)respondWithFile:(NSString *)path; 25 | - (void)respondWithFile:(NSString *)path async:(BOOL)async; 26 | 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBSession-Private.h: -------------------------------------------------------------------------------- 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 11 | 12 | @class FBElementCache; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface FBSession () 17 | @property (nonatomic, copy, readwrite) NSString *identifier; 18 | @property (nonatomic, strong, readwrite) FBElementCache *elementCache; 19 | 20 | /** 21 | Sets session as current session 22 | */ 23 | + (void)markSessionActive:(FBSession *)session; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBWebServer.h: -------------------------------------------------------------------------------- 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 11 | 12 | @class RouteResponse, RoutingHTTPServer, FBExceptionHandler; 13 | @protocol FBWebServerDelegate; 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | /** 18 | HTTP and USB service wrapper, handling requests and responses 19 | */ 20 | @interface FBWebServer : NSObject 21 | 22 | /** 23 | Server delegate. 24 | */ 25 | @property (weak, nonatomic) id delegate; 26 | 27 | /** 28 | Starts WebDriverAgent service by booting HTTP and USB server 29 | */ 30 | - (void)startServing; 31 | 32 | /** 33 | Stops WebDriverAgent service, shutting down HTTP and USB servers. 34 | */ 35 | - (void)stopServing; 36 | 37 | @end 38 | 39 | /** 40 | The protocol allowing the server delegate to handle messages from the server. 41 | */ 42 | @protocol FBWebServerDelegate 43 | 44 | /** 45 | The server requested WebDriverAgent service shutdown. 46 | 47 | @param webServer Server instance. 48 | */ 49 | - (void)webServerDidRequestShutdown:(FBWebServer *)webServer; 50 | 51 | @end 52 | 53 | NS_ASSUME_NONNULL_END 54 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/FBWebSocket.h: -------------------------------------------------------------------------------- 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 11 | 12 | @class RouteResponse, RoutingHTTPServer, FBExceptionHandler; 13 | @protocol FBWebSocketDelegate; 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | /** 18 | HTTP and USB service wrapper, handling requests and responses 19 | */ 20 | @interface FBWebSocket : NSObject 21 | 22 | /** 23 | Server delegate. 24 | */ 25 | @property (weak, nonatomic) id delegate; 26 | 27 | /** 28 | Starts WebDriverAgent service by booting HTTP and USB server 29 | */ 30 | - (void)startSocket; 31 | 32 | /** 33 | Stops WebDriverAgent service, shutting down HTTP and USB servers. 34 | */ 35 | - (void)stopSocket; 36 | 37 | @end 38 | 39 | /** 40 | The protocol allowing the server delegate to handle messages from the server. 41 | */ 42 | @protocol FBWebSocketDelegate 43 | 44 | /** 45 | The server requested WebDriverAgent service shutdown. 46 | 47 | @param webSocket Server instance. 48 | */ 49 | - (void)webSocketDidRequestShutdown:(FBWebSocket *)webSocket; 50 | 51 | @end 52 | 53 | NS_ASSUME_NONNULL_END 54 | 55 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Routing/WebSocketScreenCasting.h: -------------------------------------------------------------------------------- 1 | // 2 | // WebSocketScreenCasting.h 3 | // WebDriverAgentLib 4 | // 5 | // Created by SHUBHANKAR YASH on 11/01/18. 6 | // Copyright © 2018 Facebook. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | #import "FBApplication.h" 13 | #import "FBResponseJSONPayload.h" 14 | #import "FBScreenshotCommands.h" 15 | 16 | @interface WebSocketScreenCasting : NSObject 17 | 18 | -(void) setSocketConnected: (BOOL) isSocketConnected; 19 | -(void) startScreeing: (SocketIOClient*) clientSocket; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBConfiguration.h: -------------------------------------------------------------------------------- 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 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /** 15 | Accessors for Global Constants. 16 | */ 17 | @interface FBConfiguration : NSObject 18 | 19 | /*! If set to YES will ask TestManagerDaemon for element visibility */ 20 | + (void)setShouldUseTestManagerForVisibilityDetection:(BOOL)value; 21 | + (BOOL)shouldUseTestManagerForVisibilityDetection; 22 | 23 | /*! If set to YES will use compact & faster responses */ 24 | + (void)setShouldUseCompactResponses:(BOOL)value; 25 | + (BOOL)shouldUseCompactResponses; 26 | 27 | /*! Disables remote query evaluation making Xcode 9.x tests behave same as Xcode 8.x test */ 28 | + (void)disableRemoteQueryEvaluation; 29 | 30 | /*! Disables attribute key path analysis, which will cause XCTest on Xcode 9.x to ignore some elements */ 31 | + (void)disableAttributeKeyPathAnalysis; 32 | 33 | /* The maximum typing frequency for all typing activities */ 34 | + (void)setMaxTypingFrequency:(NSUInteger)value; 35 | + (NSUInteger)maxTypingFrequency; 36 | 37 | /** 38 | The range of ports that the HTTP Server should attempt to bind on launch 39 | */ 40 | + (NSRange)bindingPortRange; 41 | 42 | /** 43 | YES if verbose logging is enabled. NO otherwise. 44 | */ 45 | + (BOOL)verboseLoggingEnabled; 46 | 47 | @end 48 | 49 | NS_ASSUME_NONNULL_END 50 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBDebugLogDelegateDecorator.h: -------------------------------------------------------------------------------- 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 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | /** 16 | XCTestLogger decorator that will print all debug information to console 17 | */ 18 | @interface FBDebugLogDelegateDecorator : NSObject 19 | 20 | /** 21 | Decorates XCTestLogger by also printing debug message to console 22 | */ 23 | + (void)decorateXCTestLogger; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBElementTypeTransformer.h: -------------------------------------------------------------------------------- 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 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | /** 16 | Class used to translate between XCUIElementType and string name 17 | */ 18 | @interface FBElementTypeTransformer : NSObject 19 | 20 | /** 21 | Converts string to XCUIElementType 22 | 23 | @param typeName converted string to XCUIElementType 24 | @return Proper XCUIElementType or XCUIElementTypeAny if typeName is nil or unrecognised 25 | */ 26 | + (XCUIElementType)elementTypeWithTypeName:(NSString *__nullable)typeName; 27 | 28 | /** 29 | Converts XCUIElementType to string 30 | 31 | @param type converted XCUIElementType to string 32 | @return XCUIElementType as NSString 33 | */ 34 | + (NSString *)stringWithElementType:(XCUIElementType)type; 35 | 36 | /** 37 | Converts XCUIElementType to short string by striping `XCUIElementType` from it 38 | 39 | @param type converted XCUIElementType to string 40 | @return XCUIElementType as NSString with stripped `XCUIElementType` 41 | */ 42 | + (NSString *)shortStringWithElementType:(XCUIElementType)type; 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBErrorBuilder.h: -------------------------------------------------------------------------------- 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 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /** 15 | Builder used create error raised by WebDriverAgent 16 | */ 17 | @interface FBErrorBuilder : NSObject 18 | 19 | /** 20 | Default constructor 21 | */ 22 | + (instancetype)builder; 23 | 24 | /** 25 | Configures description set as NSLocalizedDescriptionKey 26 | 27 | @param description set as NSLocalizedDescriptionKey 28 | @return builder instance 29 | */ 30 | - (instancetype)withDescription:(NSString *)description; 31 | 32 | /** 33 | Configures description set as NSLocalizedDescriptionKey with convenient format 34 | 35 | @param format of description set as NSLocalizedDescriptionKey 36 | @return builder instance 37 | */ 38 | - (instancetype)withDescriptionFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2); 39 | 40 | /** 41 | Configures error set as NSUnderlyingErrorKey 42 | 43 | @param innerError used to set NSUnderlyingErrorKey 44 | @return builder instance 45 | */ 46 | - (instancetype)withInnerError:(NSError *)innerError; 47 | 48 | /** 49 | Builder used create error raised by WebDriverAgent 50 | 51 | @return built error 52 | */ 53 | - (NSError *)build; 54 | 55 | /** 56 | Builder used create error raised by WebDriverAgent 57 | 58 | @param error pointer used to return built error 59 | @return fixed NO to apply to Apple's coding conventions 60 | */ 61 | - (BOOL)buildError:(NSError **)error; 62 | 63 | @end 64 | 65 | NS_ASSUME_NONNULL_END 66 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBFailureProofTestCase.h: -------------------------------------------------------------------------------- 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 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /** 15 | Test Case that will never fail or stop from running in case of failure 16 | */ 17 | @interface FBFailureProofTestCase : XCTestCase 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBLogger.h: -------------------------------------------------------------------------------- 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 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /** 15 | A Global Logger object that understands log levels 16 | */ 17 | @interface FBLogger : NSObject 18 | 19 | /** 20 | Log to stdout. 21 | */ 22 | + (void)log:(NSString *)message; 23 | + (void)logFmt:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2); 24 | 25 | /** 26 | Log to stdout, only if WDA is Verbose 27 | */ 28 | + (void)verboseLog:(NSString *)message; 29 | + (void)verboseLogFmt:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2); 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBLogger.m: -------------------------------------------------------------------------------- 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 "FBLogger.h" 11 | 12 | #import "FBConfiguration.h" 13 | 14 | @implementation FBLogger 15 | 16 | + (void)log:(NSString *)message 17 | { 18 | NSLog(@"%@", message); 19 | } 20 | 21 | + (void)logFmt:(NSString *)format, ... 22 | { 23 | va_list args; 24 | va_start(args, format); 25 | NSLogv(format, args); 26 | va_end(args); 27 | } 28 | 29 | + (void)verboseLog:(NSString *)message 30 | { 31 | if (!FBConfiguration.verboseLoggingEnabled) { 32 | return; 33 | } 34 | [self log:message]; 35 | } 36 | 37 | + (void)verboseLogFmt:(NSString *)format, ... 38 | { 39 | if (!FBConfiguration.verboseLoggingEnabled) { 40 | return; 41 | } 42 | va_list args; 43 | va_start(args, format); 44 | NSLogv(format, args); 45 | va_end(args); 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBMathUtils.h: -------------------------------------------------------------------------------- 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 11 | 12 | @class XCUIApplication; 13 | 14 | extern CGFloat FBDefaultFrameFuzzyThreshold; 15 | 16 | /*! Returns center point of given rect */ 17 | CGPoint FBRectGetCenter(CGRect rect); 18 | 19 | /*! Returns whether floatss are equal within given threshold */ 20 | BOOL FBFloatFuzzyEqualToFloat(CGFloat float1, CGFloat float2, CGFloat threshold); 21 | 22 | /*! Returns whether points are equal within given threshold */ 23 | BOOL FBPointFuzzyEqualToPoint(CGPoint point1, CGPoint point2, CGFloat threshold); 24 | 25 | /*! Returns whether size are equal within given threshold */ 26 | BOOL FBSizeFuzzyEqualToSize(CGSize size1, CGSize size2, CGFloat threshold); 27 | 28 | /*! Returns whether rect are equal within given threshold */ 29 | BOOL FBRectFuzzyEqualToRect(CGRect rect1, CGRect rect2, CGFloat threshold); 30 | 31 | /*! Inverts point if necessary to match location on screen */ 32 | CGPoint FBInvertPointForApplication(CGPoint point, CGSize screenSize, UIInterfaceOrientation orientation); 33 | 34 | /*! Inverts size if necessary to match current screen orientation */ 35 | CGSize FBAdjustDimensionsForApplication(CGSize actualSize, UIInterfaceOrientation orientation); 36 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBPredicate.h: -------------------------------------------------------------------------------- 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 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /** 15 | HACK!!! 16 | This is hacky predicate that will force XCTest to evaluate whole XCElementSnapshot. 17 | Of course we should aim not to use this, but it buys us some time. 18 | */ 19 | @interface FBPredicate : NSPredicate 20 | 21 | + (NSPredicate *)predicateWithFormat:(NSString *)predicateFormat, ...; 22 | 23 | /*! Predicate string attached to original predicate to force resolve it in XCTest */ 24 | + (NSString *)forceResolvePredicateString; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBPredicate.m: -------------------------------------------------------------------------------- 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 "FBPredicate.h" 11 | 12 | @implementation FBPredicate 13 | 14 | + (NSPredicate *)predicateWithFormat:(NSString *)predicateFormat, ... 15 | { 16 | va_list args; 17 | va_start(args, predicateFormat); 18 | NSPredicate *predicate = [NSPredicate predicateWithFormat:predicateFormat arguments:args]; 19 | NSPredicate *hackPredicate = [NSPredicate predicateWithFormat:self.forceResolvePredicateString]; 20 | return [NSCompoundPredicate andPredicateWithSubpredicates:@[predicate, hackPredicate]]; 21 | } 22 | 23 | + (NSString *)forceResolvePredicateString 24 | { 25 | return @"1 == 1 or identifier == 0 or frame == 0 or value == 0 or title == 0 or label == 0 or elementType == 0 or enabled == 0 or placeholderValue == 0"; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBXCTestCaseImplementationFailureHoldingProxy.h: -------------------------------------------------------------------------------- 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 11 | 12 | @class _XCTestCaseImplementation; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Class that can be used to proxy existing _XCTestCaseImplementation and 18 | prevent currently running test from being terminated on any XCTest failure 19 | */ 20 | @interface FBXCTestCaseImplementationFailureHoldingProxy : NSProxy 21 | 22 | /** 23 | Constructor for given existing _XCTestCaseImplementation instance 24 | */ 25 | + (instancetype)proxyWithXCTestCaseImplementation:(_XCTestCaseImplementation *)internalImplementation; 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBXCTestCaseImplementationFailureHoldingProxy.m: -------------------------------------------------------------------------------- 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 "FBXCTestCaseImplementationFailureHoldingProxy.h" 11 | 12 | #import 13 | 14 | @interface FBXCTestCaseImplementationFailureHoldingProxy () 15 | @property (nonatomic, strong) _XCTestCaseImplementation *internalImplementation; 16 | @end 17 | 18 | @implementation FBXCTestCaseImplementationFailureHoldingProxy 19 | 20 | + (instancetype)proxyWithXCTestCaseImplementation:(_XCTestCaseImplementation *)internalImplementation 21 | { 22 | FBXCTestCaseImplementationFailureHoldingProxy *proxy = [super alloc]; 23 | proxy.internalImplementation = internalImplementation; 24 | return proxy; 25 | } 26 | 27 | - (id)forwardingTargetForSelector:(SEL)aSelector 28 | { 29 | return self.internalImplementation; 30 | } 31 | 32 | // This will prevent test from quiting on app crash or any other test failure 33 | - (BOOL)shouldHaltWhenReceivesControl 34 | { 35 | return NO; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBXCTestDaemonsProxy.h: -------------------------------------------------------------------------------- 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 11 | 12 | @protocol XCTestManager_ManagerInterface; 13 | 14 | /** 15 | Temporary class used to abstract interactions with TestManager daemon between Xcode 8.2.1 and Xcode 8.3-beta 16 | */ 17 | @interface FBXCTestDaemonsProxy : NSObject 18 | 19 | + (id)testRunnerProxy; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBXCTestDaemonsProxy.m: -------------------------------------------------------------------------------- 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 "FBXCTestDaemonsProxy.h" 11 | #import "XCTestDriver.h" 12 | #import "XCTRunnerDaemonSession.h" 13 | #import 14 | 15 | @implementation FBXCTestDaemonsProxy 16 | 17 | + (id)testRunnerProxy 18 | { 19 | static id proxy = nil; 20 | static dispatch_once_t onceToken; 21 | dispatch_once(&onceToken, ^{ 22 | if ([[XCTestDriver sharedTestDriver] respondsToSelector:@selector(managerProxy)]) { 23 | proxy = [XCTestDriver sharedTestDriver].managerProxy; 24 | return; 25 | } 26 | Class runnerClass = objc_lookUpClass("XCTRunnerDaemonSession"); 27 | proxy = ((XCTRunnerDaemonSession *)[runnerClass sharedSession]).daemonProxy; 28 | }); 29 | NSAssert(proxy != NULL, @"Could not determin testRunnerProxy", proxy); 30 | return proxy; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBXPathCreator.h: -------------------------------------------------------------------------------- 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 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | /** 16 | Helper class used to create xpath string 17 | */ 18 | @interface FBXPathCreator : NSObject 19 | 20 | /** 21 | Creates xpath string for elements containing elements of type elementType 22 | 23 | @param elementType requested XCUIElementType of sub-elements 24 | @return A string representing the xpath element 25 | */ 26 | + (NSString *)xpathWithSubelementsOfType:(XCUIElementType)elementType; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/FBXPathCreator.m: -------------------------------------------------------------------------------- 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 "FBXPathCreator.h" 11 | 12 | #import "FBElementTypeTransformer.h" 13 | 14 | @implementation FBXPathCreator 15 | 16 | + (NSString *)xpathWithSubelementsOfType:(XCUIElementType)elementType 17 | { 18 | return [NSString stringWithFormat:@"//%@", [FBElementTypeTransformer stringWithElementType:elementType]]; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/NSPredicate+FBFormat.h: -------------------------------------------------------------------------------- 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 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface NSPredicate (FBFormat) 15 | 16 | /** 17 | Method used to normalize/verify NSPredicate expressions before passing them to WDA. 18 | Only expressions of NSKeyPathExpressionType are going to be verified. 19 | Allowed property names are only these declared in FBElement protocol (property names are received in runtime) 20 | and their shortcuts (without 'wd' prefix). All other property names are considered as unknown. 21 | 22 | @param input predicate object received from user input 23 | @return formatted predicate 24 | @throw FBUnknownPredicateKeyException in case the given property name is not declared in FBElement protocol 25 | */ 26 | + (NSPredicate *)fb_formatSearchPredicate:(NSPredicate *)input; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /WebDriverAgentLib/Utilities/XCTestPrivateSymbols.h: -------------------------------------------------------------------------------- 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 11 | 12 | @protocol XCDebugLogDelegate; 13 | 14 | /*! Accessibility identifier for is visible attribute */ 15 | extern NSNumber *FB_XCAXAIsVisibleAttribute; 16 | 17 | /*! Accessibility identifier for is accessible attribute */ 18 | extern NSNumber *FB_XCAXAIsElementAttribute; 19 | 20 | /*! Getter for XCTest logger */ 21 | extern id (*XCDebugLogger)(void); 22 | 23 | /*! Setter for XCTest logger */ 24 | extern void (*XCSetDebugLogger)(id ); 25 | 26 | /** 27 | Method used to retrieve pointer for given symbol 'name' from given 'binary' 28 | 29 | @param name name of the symbol 30 | @return pointer to symbol 31 | */ 32 | void *FBRetrieveXCTestSymbol(const char *name); 33 | 34 | /*! Static constructor that will retrieve XCTest private symbols */ 35 | __attribute__((constructor)) void FBLoadXCTestSymbols(void); 36 | -------------------------------------------------------------------------------- /WebDriverAgentRunner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.facebook.wda.runner 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /WebDriverAgentRunner/UITestingUITests.m: -------------------------------------------------------------------------------- 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 11 | 12 | #import 13 | #import 14 | #import 15 | #import 16 | #import 17 | #import "FBWebSocket.h" 18 | 19 | @interface UITestingUITests : FBFailureProofTestCase 20 | @end 21 | 22 | @implementation UITestingUITests 23 | 24 | + (void)setUp 25 | { 26 | [FBDebugLogDelegateDecorator decorateXCTestLogger]; 27 | [FBConfiguration disableRemoteQueryEvaluation]; 28 | [super setUp]; 29 | } 30 | 31 | /** 32 | Never ending test used to start WebDriverAgent 33 | */ 34 | 35 | - (void)testServerRunner 36 | { 37 | FBWebServer *webServer = [[FBWebServer alloc] init]; 38 | webServer.delegate = self; 39 | [webServer startServing]; 40 | } 41 | 42 | - (void)testSocketRunner 43 | { 44 | FBWebSocket *webScoket = [[FBWebSocket alloc] init]; 45 | webScoket.delegate = self; 46 | [webScoket startSocket]; 47 | } 48 | 49 | #pragma mark - FBWebServerDelegate 50 | 51 | - (void)webServerDidRequestShutdown:(FBWebServer *)webServer 52 | { 53 | [webServer stopServing]; 54 | } 55 | 56 | - (void)webSocketDidRequestShutdown:(nonnull FBWebSocket *)webSocket { 57 | [webSocket stopSocket]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationApp/Classes/AppDelegate.h: -------------------------------------------------------------------------------- 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 11 | 12 | @interface AppDelegate : UIResponder 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationApp/Classes/AppDelegate.m: -------------------------------------------------------------------------------- 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 "AppDelegate.h" 11 | 12 | @interface AppDelegate () 13 | @end 14 | 15 | @implementation AppDelegate 16 | @end 17 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationApp/Classes/FBAlertViewController.h: -------------------------------------------------------------------------------- 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 11 | 12 | @interface FBAlertViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationApp/Classes/FBNavigationController.h: -------------------------------------------------------------------------------- 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 | #import 10 | 11 | @interface FBNavigationController : UINavigationController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationApp/Classes/FBNavigationController.m: -------------------------------------------------------------------------------- 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 "FBNavigationController.h" 11 | 12 | @implementation FBNavigationController 13 | 14 | - (UIInterfaceOrientationMask)supportedInterfaceOrientations 15 | { 16 | return UIInterfaceOrientationMaskAll; 17 | } 18 | 19 | - (BOOL)shouldAutorotate 20 | { 21 | return YES; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationApp/Classes/FBScrollViewController.h: -------------------------------------------------------------------------------- 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 11 | 12 | @interface FBScrollViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationApp/Classes/FBScrollViewController.m: -------------------------------------------------------------------------------- 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 "FBScrollViewController.h" 11 | 12 | #import "FBTableDataSource.h" 13 | 14 | static const CGFloat FBSubviewHeight = 40.0; 15 | 16 | @interface FBScrollViewController () 17 | @property (nonatomic, weak) IBOutlet UIScrollView *scrollView; 18 | @property (nonatomic, strong) IBOutlet FBTableDataSource *dataSource; 19 | @end 20 | 21 | @implementation FBScrollViewController 22 | 23 | - (void)viewDidLoad { 24 | [super viewDidLoad]; 25 | [self setupLabelViews]; 26 | self.scrollView.contentSize = CGSizeMake(CGRectGetWidth(self.view.frame), self.dataSource.count * FBSubviewHeight); 27 | } 28 | 29 | - (void)setupLabelViews 30 | { 31 | NSUInteger count = self.dataSource.count; 32 | for (NSInteger i = 0 ; i < count ; i++) { 33 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, i * FBSubviewHeight, CGRectGetWidth(self.view.frame), FBSubviewHeight)]; 34 | label.text = [self.dataSource textForElementAtIndex:i]; 35 | label.textAlignment = NSTextAlignmentCenter; 36 | [self.scrollView addSubview:label]; 37 | } 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationApp/Classes/FBTableDataSource.h: -------------------------------------------------------------------------------- 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 11 | 12 | @interface FBTableDataSource : NSObject 13 | 14 | - (NSUInteger)count; 15 | - (NSString *)textForElementAtIndex:(NSInteger)index; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationApp/Classes/FBTableDataSource.m: -------------------------------------------------------------------------------- 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 "FBTableDataSource.h" 11 | 12 | @implementation FBTableDataSource 13 | 14 | - (NSUInteger)count 15 | { 16 | return 100; 17 | } 18 | 19 | - (NSString *)textForElementAtIndex:(NSInteger)index 20 | { 21 | return [NSString stringWithFormat:@"%ld", (long)index]; 22 | } 23 | 24 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 25 | { 26 | return self.count; 27 | } 28 | 29 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 30 | { 31 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath]; 32 | cell.textLabel.text = [self textForElementAtIndex:indexPath.row]; 33 | return cell; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationApp/Classes/ViewController.h: -------------------------------------------------------------------------------- 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 11 | 12 | @interface ViewController : UIViewController 13 | @end 14 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationApp/Classes/ViewController.m: -------------------------------------------------------------------------------- 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 "ViewController.h" 11 | 12 | @interface ViewController () 13 | @property (weak, nonatomic) IBOutlet UILabel *orentationLabel; 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (IBAction)deadlockApp:(id)sender 19 | { 20 | dispatch_sync(dispatch_get_main_queue(), ^{ 21 | // This will never execute 22 | }); 23 | } 24 | 25 | - (IBAction)didTapButton:(UIButton *)button 26 | { 27 | button.selected = !button.selected; 28 | } 29 | 30 | - (void)viewDidLayoutSubviews 31 | { 32 | [super viewDidLayoutSubviews]; 33 | [self updateOrentationLabel]; 34 | } 35 | 36 | - (void)updateOrentationLabel 37 | { 38 | NSString *orientation = nil; 39 | switch (self.interfaceOrientation) { 40 | case UIInterfaceOrientationPortrait: 41 | orientation = @"Portrait"; 42 | break; 43 | case UIInterfaceOrientationPortraitUpsideDown: 44 | orientation = @"PortraitUpsideDown"; 45 | break; 46 | case UIInterfaceOrientationLandscapeLeft: 47 | orientation = @"LandscapeLeft"; 48 | break; 49 | case UIInterfaceOrientationLandscapeRight: 50 | orientation = @"LandscapeRight"; 51 | break; 52 | case UIInterfaceOrientationUnknown: 53 | orientation = @"Unknown"; 54 | break; 55 | } 56 | self.orentationLabel.text = orientation; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationApp/main.m: -------------------------------------------------------------------------------- 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 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, @"AppDelegate"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationTests/FBElementScreenshotTests.m: -------------------------------------------------------------------------------- 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 11 | 12 | #import "FBIntegrationTestCase.h" 13 | #import "XCUIDevice+FBRotation.h" 14 | #import "XCUIElement+FBUtilities.h" 15 | 16 | @interface FBElementScreenshotTests : FBIntegrationTestCase 17 | @end 18 | 19 | @implementation FBElementScreenshotTests 20 | 21 | - (void)setUp 22 | { 23 | [super setUp]; 24 | static dispatch_once_t onceToken; 25 | dispatch_once(&onceToken, ^{ 26 | [self launchApplication]; 27 | [self goToAlertsPage]; 28 | }); 29 | } 30 | 31 | - (void)testElementScreenshot 32 | { 33 | [[XCUIDevice sharedDevice] fb_setDeviceInterfaceOrientation:UIDeviceOrientationLandscapeLeft]; 34 | XCUIElement *button = self.testedApplication.buttons[FBShowAlertButtonName]; 35 | NSError *error = nil; 36 | NSData *screenshotData = [button fb_screenshotWithError:&error]; 37 | if (nil == screenshotData && [error.description containsString:@"available since Xcode9"]) { 38 | return; 39 | } 40 | XCTAssertNotNil(screenshotData); 41 | XCTAssertNil(error); 42 | UIImage *image = [UIImage imageWithData:screenshotData]; 43 | XCTAssertNotNil(image); 44 | XCTAssertTrue(image.size.width > image.size.height); 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationTests/FBFailureProofTestCaseTests.m: -------------------------------------------------------------------------------- 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 11 | 12 | #import "FBFailureProofTestCase.h" 13 | #import "FBExceptionHandler.h" 14 | 15 | @interface FBFailureProofTestCaseTests : FBFailureProofTestCase 16 | @end 17 | 18 | @implementation FBFailureProofTestCaseTests 19 | 20 | - (void)setUp 21 | { 22 | [super setUp]; 23 | [[XCUIApplication new] launch]; 24 | } 25 | 26 | - (void)testPreventElementSearchFailure 27 | { 28 | [[XCUIApplication new].buttons[@"kaboom"] tap]; 29 | } 30 | 31 | - (void)testInactiveAppSearch 32 | { 33 | [[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonHome]; 34 | [[XCUIApplication new].buttons[@"kaboom"] tap]; 35 | } 36 | 37 | - (void)testPreventAssertFailure 38 | { 39 | XCTAssertNotNil(nil); 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationTests/FBIntegrationTestCase.h: -------------------------------------------------------------------------------- 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 11 | 12 | #import "FBSpringboardApplication.h" 13 | 14 | extern NSString *const FBShowAlertButtonName; 15 | extern NSString *const FBShowSheetAlertButtonName; 16 | 17 | /** 18 | XCTestCase helper class used for integration tests 19 | */ 20 | @interface FBIntegrationTestCase : XCTestCase 21 | @property (nonatomic, strong, readonly) XCUIApplication *testedApplication; 22 | @property (nonatomic, strong, readonly) FBSpringboardApplication *springboard; 23 | 24 | /** 25 | Launches application and resets side effects of testing like orientation etc. 26 | */ 27 | - (void)launchApplication; 28 | 29 | /** 30 | Navigates integration app to attributes page 31 | */ 32 | - (void)goToAttributesPage; 33 | 34 | /** 35 | Navigates integration app to alerts page 36 | */ 37 | - (void)goToAlertsPage; 38 | 39 | /** 40 | Navigates to SpringBoard first page 41 | */ 42 | - (void)goToSpringBoardFirstPage; 43 | 44 | /** 45 | Navigates to SpringBoard path with Extras folder 46 | */ 47 | - (void)goToSpringBoardExtras; 48 | 49 | /** 50 | Navigates to SpringBoard's dashboard 51 | */ 52 | - (void)goToSpringBoardDashboard; 53 | 54 | /** 55 | Navigates integration app to scrolling page 56 | @param showCells whether should navigate to view with cell or plain scrollview 57 | */ 58 | - (void)goToScrollPageWithCells:(BOOL)showCells; 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationTests/FBKeyboardTests.m: -------------------------------------------------------------------------------- 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 11 | 12 | #import "FBIntegrationTestCase.h" 13 | #import "FBKeyboard.h" 14 | #import "FBRunLoopSpinner.h" 15 | 16 | @interface FBKeyboardTests : FBIntegrationTestCase 17 | @end 18 | 19 | @implementation FBKeyboardTests 20 | 21 | - (void)setUp 22 | { 23 | [super setUp]; 24 | [self launchApplication]; 25 | [self goToAttributesPage]; 26 | } 27 | 28 | - (void)testTextTyping 29 | { 30 | NSString *text = @"Happy typing"; 31 | XCUIElement *textField = self.testedApplication.textFields[@"aIdentifier"]; 32 | [textField tap]; 33 | NSError *error; 34 | XCTAssertTrue([FBKeyboard typeText:text error:&error]); 35 | XCTAssertNil(error); 36 | XCTAssertEqualObjects(textField.value, text); 37 | } 38 | 39 | - (void)testTypingWithoutKeyboardPresent 40 | { 41 | NSError *error; 42 | XCTAssertFalse([FBKeyboard typeText:@"This should fail" error:&error]); 43 | XCTAssertNotNil(error); 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationTests/FBTestMacros.h: -------------------------------------------------------------------------------- 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 11 | 12 | /** 13 | Macro used to wait till certain condition is true. 14 | If condition will not become true within default timeout (1m) it will fail running test 15 | */ 16 | #define FBAssertWaitTillBecomesTrue(condition) \ 17 | ({ \ 18 | NSError *__error; \ 19 | XCTAssertTrue([[[FBRunLoopSpinner new] \ 20 | interval:1.0] \ 21 | spinUntilTrue:^BOOL{ \ 22 | return (condition); \ 23 | }]); \ 24 | XCTAssertNil(__error); \ 25 | }) 26 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.facebook.wda.integrationTests 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationTests/XCElementSnapshotHitPointTests.m: -------------------------------------------------------------------------------- 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 "FBIntegrationTestCase.h" 11 | #import "FBMathUtils.h" 12 | #import "XCElementSnapshot+FBHitpoint.h" 13 | #import "XCUIElement.h" 14 | #import "XCUIElement+FBUtilities.h" 15 | 16 | @interface XCElementSnapshotHitPoint : FBIntegrationTestCase 17 | @end 18 | 19 | @implementation XCElementSnapshotHitPoint 20 | 21 | - (void)testAccessibilityActivationPoint 22 | { 23 | [self launchApplication]; 24 | [self goToAttributesPage]; 25 | XCUIElement *element = self.testedApplication.buttons[@"not_accessible"]; 26 | XCTAssertTrue(FBPointFuzzyEqualToPoint(element.fb_lastSnapshot.fb_hitPoint, CGPointMake(200, 220), 0.1)); 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationTests/XCUIDeviceHealthCheckTests.m: -------------------------------------------------------------------------------- 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 11 | 12 | #import "FBIntegrationTestCase.h" 13 | #import "XCUIDevice+FBHealthCheck.h" 14 | #import "XCUIElement.h" 15 | 16 | @interface XCUIDeviceHealthCheckTests : FBIntegrationTestCase 17 | @end 18 | 19 | @implementation XCUIDeviceHealthCheckTests 20 | 21 | - (void)testHealthCheck 22 | { 23 | [self launchApplication]; 24 | XCTAssertTrue(self.testedApplication.exists); 25 | XCTAssertTrue([[XCUIDevice sharedDevice] fb_healthCheckWithApplication:self.testedApplication]); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /WebDriverAgentTests/IntegrationTests/XCUIDeviceHelperTests.m: -------------------------------------------------------------------------------- 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 11 | 12 | #import "FBIntegrationTestCase.h" 13 | #import "FBApplication.h" 14 | #import "XCUIDevice+FBHelpers.h" 15 | 16 | @interface XCUIDeviceHelperTests : FBIntegrationTestCase 17 | @end 18 | 19 | @implementation XCUIDeviceHelperTests 20 | 21 | - (void)setUp 22 | { 23 | [super setUp]; 24 | static dispatch_once_t onceToken; 25 | dispatch_once(&onceToken, ^{ 26 | [self launchApplication]; 27 | }); 28 | } 29 | 30 | - (void)testScreenshot 31 | { 32 | NSError *error = nil; 33 | NSData *screenshotData = [[XCUIDevice sharedDevice] fb_screenshotWithError:&error]; 34 | XCTAssertNotNil([UIImage imageWithData:screenshotData]); 35 | XCTAssertNil(error); 36 | } 37 | 38 | - (void)testWifiAddress 39 | { 40 | NSString *adderss = [XCUIDevice sharedDevice].fb_wifiIPAddress; 41 | if (!adderss) { 42 | return; 43 | } 44 | NSRange range = [adderss rangeOfString:@"^([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})" options:NSRegularExpressionSearch]; 45 | XCTAssertTrue(range.location != NSNotFound); 46 | } 47 | 48 | - (void)testGoToHomeScreen 49 | { 50 | NSError *error; 51 | XCTAssertTrue([[XCUIDevice sharedDevice] fb_goToHomescreenWithError:&error]); 52 | XCTAssertNil(error); 53 | XCTAssertTrue([FBApplication fb_activeApplication].icons[@"Safari"].exists); 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /WebDriverAgentTests/UnitTests/Doubles/FBApplicationDouble.h: -------------------------------------------------------------------------------- 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 11 | 12 | @interface FBApplicationDouble : NSObject 13 | @property (nonatomic, assign, readonly) BOOL didTerminate; 14 | @property (nonatomic, strong) NSString* bundleID; 15 | @end 16 | -------------------------------------------------------------------------------- /WebDriverAgentTests/UnitTests/Doubles/FBApplicationDouble.m: -------------------------------------------------------------------------------- 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 "FBApplicationDouble.h" 11 | 12 | @interface FBApplicationDouble () 13 | @property (nonatomic, assign, readwrite) BOOL didTerminate; 14 | @end 15 | 16 | @implementation FBApplicationDouble 17 | 18 | - (instancetype)init 19 | { 20 | self = [super init]; 21 | if (self) { 22 | _bundleID = @"some.bundle.identifier"; 23 | } 24 | return self; 25 | } 26 | 27 | - (void)terminate 28 | { 29 | self.didTerminate = YES; 30 | } 31 | 32 | - (NSUInteger)processID 33 | { 34 | return 0; 35 | } 36 | 37 | - (NSString *)bundleID 38 | { 39 | return @"com.facebook.awesome"; 40 | } 41 | 42 | - (void)resolve 43 | { 44 | 45 | } 46 | 47 | - (id)query 48 | { 49 | return nil; 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /WebDriverAgentTests/UnitTests/Doubles/XCUIElementDouble.m: -------------------------------------------------------------------------------- 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 "XCUIElementDouble.h" 11 | 12 | @interface XCUIElementDouble () 13 | @property (nonatomic, assign, readwrite) BOOL didResolve; 14 | @end 15 | 16 | @implementation XCUIElementDouble 17 | 18 | - (id)init 19 | { 20 | self = [super init]; 21 | if (self) { 22 | self.wdFrame = CGRectMake(0, 0, 0, 0); 23 | self.wdName = @"testName"; 24 | self.wdLabel = @"testLabel"; 25 | self.wdValue = @"magicValue"; 26 | self.wdVisible = YES; 27 | self.wdAccessible = YES; 28 | self.wdEnabled = YES; 29 | self.children = @[]; 30 | self.wdRect = @{@"x": @0, 31 | @"y": @0, 32 | @"width": @0, 33 | @"height": @0, 34 | }; 35 | self.wdAccessibilityContainer = NO; 36 | self.elementType = XCUIElementTypeOther; 37 | self.wdType = @"XCUIElementTypeOther"; 38 | self.wdUID = 0; 39 | } 40 | return self; 41 | } 42 | 43 | - (id)fb_valueForWDAttributeName:(NSString *)name 44 | { 45 | return @"test"; 46 | } 47 | 48 | - (void)resolve 49 | { 50 | self.didResolve = YES; 51 | } 52 | 53 | - (id)lastSnapshot 54 | { 55 | return self; 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /WebDriverAgentTests/UnitTests/FBConfigurationTests.m: -------------------------------------------------------------------------------- 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 11 | 12 | #import "FBConfiguration.h" 13 | 14 | @interface FBConfigurationTests : XCTestCase 15 | 16 | @end 17 | 18 | @implementation FBConfigurationTests 19 | 20 | - (void)setUp 21 | { 22 | [super setUp]; 23 | unsetenv("USE_PORT"); 24 | unsetenv("VERBOSE_LOGGING"); 25 | } 26 | 27 | - (void)testBindingPortDefault 28 | { 29 | XCTAssertTrue(NSEqualRanges([FBConfiguration bindingPortRange], NSMakeRange(8100, 100))); 30 | } 31 | 32 | - (void)testBindingPortEnvironmentOverwrite 33 | { 34 | setenv("USE_PORT", "1000", 1); 35 | XCTAssertTrue(NSEqualRanges([FBConfiguration bindingPortRange], NSMakeRange(1000, 1))); 36 | } 37 | 38 | - (void)testVerboseLoggingDefault 39 | { 40 | XCTAssertFalse([FBConfiguration verboseLoggingEnabled]); 41 | } 42 | 43 | - (void)testVerboseLoggingEnvironmentOverwrite 44 | { 45 | setenv("VERBOSE_LOGGING", "YES", 1); 46 | XCTAssertTrue([FBConfiguration verboseLoggingEnabled]); 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /WebDriverAgentTests/UnitTests/FBElementUtilitiesTests.m: -------------------------------------------------------------------------------- 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 | 11 | #import 12 | 13 | #import "FBElement.h" 14 | #import "XCUIElementDouble.h" 15 | #import "FBElementUtils.h" 16 | 17 | @interface FBElementUtilitiesTests : XCTestCase 18 | @end 19 | 20 | @implementation FBElementUtilitiesTests 21 | 22 | - (void)testTypesFiltering { 23 | NSMutableArray *elements = [NSMutableArray new]; 24 | XCUIElementDouble *el1 = [XCUIElementDouble new]; 25 | [elements addObject:el1]; 26 | XCUIElementDouble *el2 = [XCUIElementDouble new]; 27 | el2.elementType = XCUIElementTypeAlert; 28 | el2.wdType = @"XCUIElementTypeAlert"; 29 | [elements addObject:el2]; 30 | XCUIElementDouble *el3 = [XCUIElementDouble new]; 31 | [elements addObject:el3]; 32 | 33 | NSSet *result = [FBElementUtils uniqueElementTypesWithElements:elements]; 34 | XCTAssertEqual([result count], 2); 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /WebDriverAgentTests/UnitTests/FBRuntimeUtilsTests.m: -------------------------------------------------------------------------------- 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 11 | 12 | #import "FBRuntimeUtils.h" 13 | #import "XCTestPrivateSymbols.h" 14 | 15 | @protocol FBMagicProtocol 16 | @end 17 | 18 | const NSString *FBRuntimeUtilsTestsConstString = @"FBRuntimeUtilsTestsConstString"; 19 | 20 | @interface FBRuntimeUtilsTests : XCTestCase 21 | @end 22 | 23 | @implementation FBRuntimeUtilsTests 24 | 25 | - (void)testClassesThatConformsToProtocol 26 | { 27 | XCTAssertEqualObjects(@[self.class], FBClassesThatConformsToProtocol(@protocol(FBMagicProtocol))); 28 | } 29 | 30 | - (void)testRetrievingFrameworkSymbols 31 | { 32 | NSString *binaryPath = [NSBundle bundleForClass:self.class].executablePath; 33 | NSString *symbolPointer = *(NSString*__autoreleasing*)FBRetrieveSymbolFromBinary(binaryPath.UTF8String, "FBRuntimeUtilsTestsConstString"); 34 | XCTAssertNotNil(symbolPointer); 35 | XCTAssertEqualObjects(symbolPointer, FBRuntimeUtilsTestsConstString); 36 | } 37 | 38 | - (void)testXCTestSymbols 39 | { 40 | XCTAssertTrue(XCDebugLogger != NULL); 41 | XCTAssertTrue(XCSetDebugLogger != NULL); 42 | XCTAssertNotNil(FB_XCAXAIsVisibleAttribute); 43 | XCTAssertNotNil(FB_XCAXAIsElementAttribute); 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /WebDriverAgentTests/UnitTests/FBXMLSafeStringTests.m: -------------------------------------------------------------------------------- 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 11 | 12 | #import "NSString+FBXMLSafeString.h" 13 | 14 | @interface FBXMLSafeStringTests : XCTestCase 15 | @end 16 | 17 | @implementation FBXMLSafeStringTests 18 | 19 | - (void)testSafeXmlStringTransformationWithEmptyReplacement { 20 | NSString *withInvalidChar = [NSString stringWithFormat:@"bla%@", @"\uFFFF"]; 21 | NSString *withoutInvalidChar = @"bla"; 22 | XCTAssertNotEqualObjects(withInvalidChar, withoutInvalidChar); 23 | XCTAssertEqualObjects([withInvalidChar fb_xmlSafeStringWithReplacement:@""], withoutInvalidChar); 24 | } 25 | 26 | - (void)testSafeXmlStringTransformationWithNonEmptyReplacement { 27 | NSString *withInvalidChar = [NSString stringWithFormat:@"bla%@", @"\uFFFF"]; 28 | XCTAssertEqualObjects([withInvalidChar fb_xmlSafeStringWithReplacement:@"1"], @"bla1"); 29 | } 30 | 31 | - (void)testSafeXmlStringTransformationWithSmileys { 32 | NSString *validString = @"Yo👿"; 33 | XCTAssertEqualObjects([validString fb_xmlSafeStringWithReplacement:@""], validString); 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /WebDriverAgentTests/UnitTests/FBXPathCreatorTests.m: -------------------------------------------------------------------------------- 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 11 | 12 | #import "FBXPathCreator.h" 13 | 14 | @interface FBXPathCreatorTests : XCTestCase 15 | @end 16 | 17 | @implementation FBXPathCreatorTests 18 | 19 | - (void)testXPathForSubelementsOfType 20 | { 21 | XCTAssertEqualObjects(@"//XCUIElementTypeCell", [FBXPathCreator xpathWithSubelementsOfType:XCUIElementTypeCell]); 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /WebDriverAgentTests/UnitTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.facebook.wda.unitTests 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /npm-debug.log: -------------------------------------------------------------------------------- 1 | 0 info it worked if it ends with ok 2 | 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ] 3 | 2 info using npm@3.10.9 4 | 3 info using node@v7.2.0 5 | 4 verbose stack Error: ENOENT: no such file or directory, open '/Users/manish.patwari/Workspace/ios-devicelab/WebDriverAgent/package.json' 6 | 5 verbose cwd /Users/manish.patwari/Workspace/ios-devicelab/WebDriverAgent 7 | 6 error Darwin 16.7.0 8 | 7 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build" 9 | 8 error node v7.2.0 10 | 9 error npm v3.10.9 11 | 10 error path /Users/manish.patwari/Workspace/ios-devicelab/WebDriverAgent/package.json 12 | 11 error code ENOENT 13 | 12 error errno -2 14 | 13 error syscall open 15 | 14 error enoent ENOENT: no such file or directory, open '/Users/manish.patwari/Workspace/ios-devicelab/WebDriverAgent/package.json' 16 | 15 error enoent ENOENT: no such file or directory, open '/Users/manish.patwari/Workspace/ios-devicelab/WebDriverAgent/package.json' 17 | 15 error enoent This is most likely not a problem with npm itself 18 | 15 error enoent and is related to npm not being able to find a file. 19 | 16 verbose exit [ -2, true ] 20 | --------------------------------------------------------------------------------