├── Selenium ├── Selenium │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── docgen.sh │ ├── Selenium-Prefix.pch │ ├── SELocation.h │ ├── SESession.h │ ├── SETouchActionCommand.h │ ├── Selenium.h │ ├── SEStatus.h │ ├── SEUtility.h │ ├── SELocation.m │ ├── SETouchActionCommand.m │ ├── SESession.m │ ├── SEStatus.m │ ├── SEBy.h │ ├── Selenium-Info.plist │ ├── SEError.h │ ├── SECapabilities.h │ ├── SETouchAction.h │ ├── NSData+Base64.h │ ├── SEEnums.h │ ├── SEBy.m │ ├── SEEnums.m │ ├── SEWebElement.h │ ├── SEUtility.m │ ├── SETouchAction.m │ ├── SEError.m │ ├── SEWebElement.m │ ├── SECapabilities.m │ ├── NSData+Base64.m │ ├── SERemoteWebDriver.h │ ├── SEJsonWireClient.h │ └── SERemoteWebDriver.m ├── SeleniumTests │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── SeleniumTests.h │ ├── SeleniumTests-Info.plist │ └── SeleniumTests.m ├── SeleniumForiOSTests │ ├── Info.plist │ └── SeleniumForiOSTests.m ├── SeleniumForiOS │ ├── Info.plist │ └── SeleniumForiOS.h └── Selenium.xcodeproj │ └── project.pbxproj ├── .gitignore ├── LICENSE ├── Selenium.podspec.json └── README.md /Selenium/Selenium/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Selenium/SeleniumTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Selenium/Selenium/docgen.sh: -------------------------------------------------------------------------------- 1 | appledoc SERemoteWebDriver.h --project-name selenium --project-company "Appium" --company-id com.appium --output ~/Desktop/help . 2 | -------------------------------------------------------------------------------- /Selenium/Selenium/Selenium-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Selenium' target in the 'Selenium' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Selenium/SeleniumTests/SeleniumTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // SeleniumTests.h 3 | // SeleniumTests 4 | // 5 | // Created by Dan Cuellar on 3/14/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SeleniumTests : XCTestCase 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | *.xcworkspace 13 | !default.xcworkspace 14 | xcuserdata 15 | profile 16 | *.moved-aside 17 | DerivedData 18 | .idea/ 19 | publish/ 20 | -------------------------------------------------------------------------------- /Selenium/Selenium/SELocation.h: -------------------------------------------------------------------------------- 1 | // 2 | // SELocation.h 3 | // Selenium 4 | // 5 | // Created by Khyati Dave on 3/25/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SELocation : NSObject 12 | 13 | 14 | @property float latitude; 15 | @property float longitude; 16 | @property float altitude; 17 | 18 | 19 | -(id) initWithDictionary:(NSDictionary*)dict; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Selenium/Selenium/SESession.h: -------------------------------------------------------------------------------- 1 | // 2 | // SESession.h 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/14/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SECapabilities.h" 11 | 12 | @interface SESession : NSObject 13 | 14 | @property SECapabilities *capabilities; 15 | @property NSString *sessionId; 16 | 17 | -(id) initWithDictionary:(NSDictionary*)dict; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Selenium/Selenium/SETouchActionCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Mark Corbyn on 08/01/15. 3 | // Copyright (c) 2015 Mark Corbyn. All rights reserved. 4 | // 5 | 6 | #import 7 | 8 | 9 | @interface SETouchActionCommand : NSObject 10 | 11 | @property (nonatomic, copy) NSString *name; 12 | @property (nonatomic, strong) NSMutableDictionary *options; 13 | 14 | -(instancetype) initWithName:(NSString *)name; 15 | 16 | -(void) addParameterWithKey:(NSString *)keyName value:(id)value; 17 | 18 | @end -------------------------------------------------------------------------------- /Selenium/Selenium/Selenium.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import 4 | #import 5 | #import 6 | #import 7 | #import 8 | #import 9 | #import 10 | #import 11 | #import 12 | #import 13 | #import 14 | #import -------------------------------------------------------------------------------- /Selenium/Selenium/SEStatus.h: -------------------------------------------------------------------------------- 1 | // 2 | // SEStatus.h 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/13/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SEStatus : NSObject 12 | 13 | @property NSString *buildVersion; 14 | @property NSString *buildRevision; 15 | @property NSString *buildTime; 16 | @property NSString *osArchitecture; 17 | @property NSString *osName; 18 | @property NSString *osVersion; 19 | 20 | -(id) initWithDictionary:(NSDictionary*)dict; 21 | 22 | @end -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2012-2013 Appium Committers 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /Selenium/Selenium/SEUtility.h: -------------------------------------------------------------------------------- 1 | // 2 | // SEUtility.h 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/18/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SEUtility : NSObject 12 | 13 | +(NSDictionary*) performGetRequestToUrl:(NSString*)urlString error:(NSError**)error; 14 | +(NSDictionary*) performPostRequestToUrl:(NSString*)urlString postParams:(NSDictionary*)postParams error:(NSError**)error; 15 | +(NSDictionary*) performDeleteRequestToUrl:(NSString*)urlString error:(NSError**)error; 16 | +(NSHTTPCookie*) cookieWithJson:(NSDictionary*)json; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Selenium.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Selenium", 3 | "version": "1.3.3", 4 | "license": "apache", 5 | "summary": "Selenium / Appium bindings for Objective-C", 6 | "homepage": "http://appium.io", 7 | "authors": { 8 | "Appium Contributors": "@appiumdevs" 9 | }, 10 | "platforms": { 11 | "osx": "10.8" 12 | }, 13 | "source": { 14 | "git": "https://github.com/appium/selenium-objective-c.git", 15 | "tag": "v1.3.3" 16 | }, 17 | "description": "This project contains the Selenium / Appium bindings for the Objective C programming language", 18 | "source_files": [ 19 | "Selenium/Selenium/*.{h,m,c,mm}" 20 | ], 21 | "requires_arc": true 22 | } 23 | -------------------------------------------------------------------------------- /Selenium/Selenium/SELocation.m: -------------------------------------------------------------------------------- 1 | // 2 | // SELocation.m 3 | // Selenium 4 | // 5 | // Created by Khyati Dave on 3/25/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import "SELocation.h" 10 | 11 | @implementation SELocation 12 | 13 | -(id) initWithDictionary:(NSDictionary *)dict 14 | { 15 | self = [super init]; 16 | if (self) { 17 | NSDictionary *value = [dict objectForKey:@"value"]; 18 | 19 | [self setLatitude:[[value objectForKey:@"latitude"] floatValue]]; 20 | [self setLongitude:[[value objectForKey:@"longitude"] floatValue]]; 21 | [self setAltitude:[[value objectForKey:@"altitude"] floatValue]]; 22 | } 23 | return self; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Selenium/SeleniumTests/SeleniumTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.appium.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Selenium/Selenium/SETouchActionCommand.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Mark Corbyn on 08/01/15. 3 | // Copyright (c) 2015 Mark Corbyn. All rights reserved. 4 | // 5 | 6 | #import "SETouchActionCommand.h" 7 | 8 | @interface SETouchActionCommand () 9 | 10 | @end 11 | 12 | @implementation SETouchActionCommand { 13 | } 14 | 15 | - (instancetype) init 16 | { 17 | self = [super init]; 18 | if (self) { 19 | self.options = [NSMutableDictionary dictionary]; 20 | } 21 | return self; 22 | } 23 | 24 | -(instancetype) initWithName:(NSString *)name 25 | { 26 | self = [self init]; 27 | if (!self) return nil; 28 | 29 | self.name = name; 30 | 31 | return self; 32 | } 33 | 34 | -(void) addParameterWithKey:(NSString *)keyName value:(id)value 35 | { 36 | self.options[keyName] = value; 37 | } 38 | 39 | 40 | @end -------------------------------------------------------------------------------- /Selenium/Selenium/SESession.m: -------------------------------------------------------------------------------- 1 | // 2 | // SESession.m 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/14/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import "SESession.h" 10 | 11 | @implementation SESession 12 | 13 | -(id) initWithDictionary:(NSDictionary*)dict 14 | { 15 | self = [super init]; 16 | if (self) { 17 | if ([dict objectForKey:@"sessionId"] != nil) 18 | { 19 | [self setCapabilities:[[SECapabilities alloc] initWithDictionary:[dict objectForKey:@"value"]]]; 20 | [self setSessionId:[dict objectForKey:@"sessionId"]]; 21 | } 22 | else 23 | { 24 | [self setCapabilities:[[SECapabilities alloc] initWithDictionary:[dict objectForKey:@"capabilities"]]]; 25 | [self setSessionId:[dict objectForKey:@"id"]]; 26 | } 27 | } 28 | return self; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Selenium/SeleniumForiOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | io.appium.$(PRODUCT_NAME:rfc1034identifier) 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 | -------------------------------------------------------------------------------- /Selenium/Selenium/SEStatus.m: -------------------------------------------------------------------------------- 1 | // 2 | // SEStatus.m 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/13/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import "SEStatus.h" 10 | 11 | @implementation SEStatus 12 | 13 | -(id) initWithDictionary:(NSDictionary*)dict 14 | { 15 | self = [super init]; 16 | if (self) { 17 | NSDictionary *value = [dict objectForKey:@"value"]; 18 | 19 | NSDictionary *build = [value objectForKey:@"build"]; 20 | [self setBuildVersion:[build objectForKey:@"version"]]; 21 | [self setBuildRevision:[build objectForKey:@"revision"]]; 22 | [self setBuildTime:[build objectForKey:@"time"]]; 23 | 24 | NSDictionary *os = [value objectForKey:@"os"]; 25 | [self setOsArchitecture:[os objectForKey:@"arch"]]; 26 | [self setOsName:[os objectForKey:@"name"]]; 27 | [self setOsVersion:[os objectForKey:@"version"]]; 28 | } 29 | return self; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Selenium/SeleniumForiOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | io.appium.$(PRODUCT_NAME:rfc1034identifier) 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 | -------------------------------------------------------------------------------- /Selenium/SeleniumForiOS/SeleniumForiOS.h: -------------------------------------------------------------------------------- 1 | // 2 | // SeleniumForiOS.h 3 | // SeleniumForiOS 4 | // 5 | // Created by Dan Cuellar on 28/10/2014. 6 | // Copyright (c) 2014 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for SeleniumForiOS. 12 | FOUNDATION_EXPORT double SeleniumForiOSVersionNumber; 13 | 14 | //! Project version string for SeleniumForiOS. 15 | FOUNDATION_EXPORT const unsigned char SeleniumForiOSVersionString[]; 16 | 17 | #import 18 | 19 | #import 20 | #import 21 | #import 22 | #import 23 | #import 24 | #import 25 | #import 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import -------------------------------------------------------------------------------- /Selenium/Selenium/SEBy.h: -------------------------------------------------------------------------------- 1 | // 2 | // SEBy.h 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/18/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SEBy : NSObject 12 | 13 | @property NSString *locationStrategy; 14 | @property NSString *value; 15 | 16 | -(id) initWithLocationStrategy:(NSString*)locationStrategy value:(NSString*)value; 17 | 18 | +(SEBy*) className:(NSString*)className; 19 | +(SEBy*) cssSelector:(NSString*)cssSelector; 20 | +(SEBy*) idString:(NSString*)idString; 21 | +(SEBy*) name:(NSString*)name; 22 | +(SEBy*) linkText:(NSString*)linkText; 23 | +(SEBy*) partialLinkText:(NSString*)partialLinkText; 24 | +(SEBy*) tagName:(NSString*)tagName; 25 | +(SEBy*) xPath:(NSString*)xPath; 26 | 27 | +(SEBy*) accessibilityId:(NSString*)accessibilityId; 28 | +(SEBy*) androidUIAutomator:(NSString*)uiAutomatorExpression; 29 | +(SEBy*) iOSUIAutomation:(NSString*)uiAutomationExpression; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Selenium.framework 2 | 3 | Selenium WebDriver Bindings for Objective-C 4 | 5 | To embed in your project take a look at [Appium.app](https://github.com/appium/appium-dot-app) or follow the instructions 6 | [here](http://old.wiki.remobjects.com/wiki/How_to_link_Custom_Frameworks_from_your_Xcode_Projects). 7 | 8 | ## Getting It 9 | 10 | * download it from [cocoapods](https://www.cocoapods.org) by adding Selenium to your .podfile 11 | * download it as a [ZIP](https://github.com/appium/selenium-objective-c/releases/download/v1.0.1/Selenium.framework.zip). 12 | * build it yourself 13 | 14 | ## Building It 15 | 16 | 1. Clone this repository at [https://github.com/appium/selenium-objective-c](https://github.com/appium/selenium-objective-c) 17 | 2. Open the `Selenium.xcodeproj` from the `Selenium` directory. 18 | 3. Ensure that the `Selenium` framework is chosen as the target (not `libSelenium`). 19 | 4. Go to Product > Build For > Running. 20 | 5. Retrive the `Selenium.framework` from the `publish` directory. 21 | -------------------------------------------------------------------------------- /Selenium/SeleniumForiOSTests/SeleniumForiOSTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // SeleniumForiOSTests.m 3 | // SeleniumForiOSTests 4 | // 5 | // Created by Dan Cuellar on 28/10/2014. 6 | // Copyright (c) 2014 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface SeleniumForiOSTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation SeleniumForiOSTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Selenium/Selenium/Selenium-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.appium.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.3.3 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | NSHumanReadableCopyright 26 | Copyright © 2013 Appium. All rights reserved. 27 | NSPrincipalClass 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Selenium/Selenium/SEError.h: -------------------------------------------------------------------------------- 1 | // 2 | // SEError.h 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/16/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SEError : NSError 12 | 13 | +(SEError*) errorWithCode:(NSInteger)code; 14 | +(SEError*) errorWithResponseDict:(NSDictionary*)dict; 15 | 16 | +(SEError*) success; 17 | +(SEError*) noSuchDriver; 18 | +(SEError*) noSuchElement; 19 | +(SEError*) noSuchFrame; 20 | +(SEError*) unknownCommand; 21 | +(SEError*) staleElementReference; 22 | +(SEError*) elementNotVisible; 23 | +(SEError*) invalidElementState; 24 | +(SEError*) unknownError; 25 | +(SEError*) elementIsNotSelectable; 26 | +(SEError*) javaScriptError; 27 | +(SEError*) xpathLookupError; 28 | +(SEError*) timeout; 29 | +(SEError*) noSuchWindow; 30 | +(SEError*) invalidCookieDomain; 31 | +(SEError*) unableToSetCookie; 32 | +(SEError*) unexpectedAlertOpen; 33 | +(SEError*) noAlertOpenError; 34 | +(SEError*) scriptTimeout; 35 | +(SEError*) invalidElementCoordinates; 36 | +(SEError*) imeNotAvailable; 37 | +(SEError*) imeEngineActivationFailed; 38 | +(SEError*) invalidSelector; 39 | +(SEError*) sessionNotCreatedException; 40 | +(SEError*) moveTargetOutOfBounds; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Selenium/Selenium/SECapabilities.h: -------------------------------------------------------------------------------- 1 | // 2 | // SECapabilities.h 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/14/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SECapabilities : NSObject 12 | 13 | @property NSString* browserName; 14 | @property NSString* version; 15 | @property NSString* platform; 16 | @property BOOL javascriptEnabled; 17 | @property BOOL takesScreenShot; 18 | @property BOOL handlesAlerts; 19 | @property BOOL databaseEnabled; 20 | @property BOOL locationContextEnabled; 21 | @property BOOL applicationCacheEnabled; 22 | @property BOOL browserConnectionEnabled; 23 | @property BOOL cssSelectorsEnabled; 24 | @property BOOL webStorageEnabled; 25 | @property BOOL rotatable; 26 | @property BOOL acceptSslCerts; 27 | @property BOOL nativeEvents; 28 | // TODO: add proxy object 29 | 30 | @property NSString *app; 31 | @property NSString *automationName; 32 | @property NSString *deviceName; 33 | @property NSString *platformName; 34 | @property NSString *platformVersion; 35 | 36 | -(id) initWithDictionary:(NSDictionary*)dict; 37 | -(id) getCapabilityForKey:(NSString*)key; 38 | -(void) addCapabilityForKey:(NSString*)key andValue:(id)value; 39 | -(NSDictionary*) dictionary; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Selenium/Selenium/SETouchAction.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Mark Corbyn on 08/01/15. 3 | // Copyright (c) 2015 Mark Corbyn. All rights reserved. 4 | // 5 | 6 | #import 7 | 8 | @class SEWebElement; 9 | 10 | @interface SETouchAction : NSObject 11 | 12 | @property (nonatomic, strong) NSMutableArray *commands; 13 | 14 | #pragma mark - Standard Press 15 | -(void) pressElement:(SEWebElement *)element; 16 | -(void) pressAtX:(NSInteger)x y:(NSInteger)y; 17 | -(void) pressElement:(SEWebElement *)element atX:(NSInteger)x y:(NSInteger)y; 18 | 19 | #pragma mark - Withdraw/Release 20 | -(void) withdrawTouch; 21 | 22 | #pragma mark - Move To 23 | -(void) moveToElement:(SEWebElement *)element; 24 | -(void) moveToX:(NSInteger)x y:(NSInteger)y; // Coordinates are relative to current touch position 25 | -(void) moveToElement:(SEWebElement *)element atX:(NSInteger)x y:(NSInteger)y; 26 | -(void) moveByX:(NSInteger)x y:(NSInteger)y; // An alias of moveToX:y 27 | 28 | #pragma mark - Tap 29 | -(void) tapElement:(SEWebElement *)element; 30 | -(void) tapAtX:(NSInteger)x y:(NSInteger)y; 31 | -(void) tapElement:(SEWebElement *)element atX:(NSInteger)x y:(NSInteger)y; 32 | 33 | #pragma mark - Wait 34 | -(void) wait; 35 | -(void) waitForTimeInterval:(NSTimeInterval)timeInterval; 36 | 37 | #pragma mark - Long Press 38 | -(void) longPressElement:(SEWebElement *)element; 39 | -(void) longPressAtX:(NSInteger)x y:(NSInteger)y; 40 | -(void) longPressElement:(SEWebElement *)element atX:(NSInteger)x y:(NSInteger)y; 41 | 42 | #pragma mark - Cancel 43 | -(void) cancel; 44 | 45 | @end -------------------------------------------------------------------------------- /Selenium/Selenium/NSData+Base64.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Base64.h 3 | // base64 4 | // 5 | // Created by Matt Gallagher on 2009/06/03. 6 | // Copyright 2009 Matt Gallagher. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. Permission is granted to anyone to 11 | // use this software for any purpose, including commercial applications, and to 12 | // alter it and redistribute it freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would be 17 | // appreciated but is not required. 18 | // 2. Altered source versions must be plainly marked as such, and must not be 19 | // misrepresented as being the original software. 20 | // 3. This notice may not be removed or altered from any source 21 | // distribution. 22 | // 23 | 24 | #import 25 | 26 | void *NewBase64Decode( 27 | const char *inputBuffer, 28 | size_t length, 29 | size_t *outputLength); 30 | 31 | char *NewBase64Encode( 32 | const void *inputBuffer, 33 | size_t length, 34 | bool separateLines, 35 | size_t *outputLength); 36 | 37 | @interface NSData (Base64) 38 | 39 | + (NSData *)dataFromBase64String:(NSString *)aString; 40 | - (NSString *)base64EncodedString; 41 | 42 | // added by Hiroshi Hashiguchi 43 | - (NSString *)base64EncodedStringWithSeparateLines:(BOOL)separateLines; 44 | 45 | @end -------------------------------------------------------------------------------- /Selenium/Selenium/SEEnums.h: -------------------------------------------------------------------------------- 1 | // 2 | // SEEnums.h 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/19/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #if TARGET_OS_IPHONE 12 | #define POINT_TYPE CGPoint 13 | #define SIZE_TYPE CGSize 14 | #define IMAGE_TYPE UIImage 15 | #define POINT_TYPE_MAKE CGPointMake 16 | #define SIZE_TYPE_MAKE CGSizeMake 17 | #import 18 | #else 19 | #define POINT_TYPE NSPoint 20 | #define SIZE_TYPE NSSize 21 | #define IMAGE_TYPE NSImage 22 | #define POINT_TYPE_MAKE NSMakePoint 23 | #define SIZE_TYPE_MAKE NSMakeSize 24 | #endif 25 | 26 | 27 | @interface SEEnums : NSObject 28 | 29 | typedef enum seleniumScreenOrientationTypes 30 | { 31 | SELENIUM_SCREEN_ORIENTATION_PORTRAIT, 32 | SELENIUM_SCREEN_ORIENTATION_LANDSCAPE, 33 | SELENIUM_SCREEN_ORIENTATION_UNKOWN 34 | } SEScreenOrientation; 35 | 36 | typedef enum seleniumTimeoutTypes 37 | { 38 | SELENIUM_TIMEOUT_IMPLICIT, 39 | SELENIUM_TIMEOUT_SCRIPT, 40 | SELENIUM_TIMEOUT_PAGELOAD 41 | } SETimeoutType; 42 | 43 | 44 | typedef enum seleniumApplicationCacheStatusTypes 45 | { 46 | SELENIUM_APPLICATION_CACHE_STATUS_UNCACHED, 47 | SELENIUM_APPLICATION_CACHE_STATUS_IDLE, 48 | SELENIUM_APPLICATION_CACHE_STATUS_CHECKING, 49 | SELENIUM_APPLICATION_CACHE_STATUS_DOWNLOADING, 50 | SELENIUM_APPLICATION_CACHE_STATUS_UPDATE_READY, 51 | SELENIUM_APPLICATION_CACHE_STATUS_OBSOLETE 52 | } SEApplicationCacheStatus; 53 | 54 | typedef enum seleniumMouseButtonTypes 55 | { 56 | SELENIUM_MOUSE_LEFT_BUTTON = 0, 57 | SELENIUM_MOUSE_MIDDLE_BUTTON = 1, 58 | SELENIUM_MOUSE_RIGHT_BUTTON = 2 59 | } SEMouseButton; 60 | 61 | 62 | typedef enum seleniumLogTypes 63 | { 64 | SELENIUM_LOG_TYPE_CLIENT, 65 | SELENIUM_LOG_TYPE_DRIVER, 66 | SELENIUM_LOG_TYPE_BROWSER, 67 | SELENIUM_LOG_TYPE_SERVER 68 | }SELogType; 69 | 70 | +(NSString*) stringForTimeoutType:(SETimeoutType)type; 71 | +(SEApplicationCacheStatus) applicationCacheStatusWithInt:(NSInteger)applicationCacheStatusInt; 72 | +(NSInteger) intForMouseButton:(SEMouseButton)button; 73 | +(NSString*) stringForLogType:(SELogType)logType; 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /Selenium/Selenium/SEBy.m: -------------------------------------------------------------------------------- 1 | // 2 | // SEBy.m 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/18/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import "SEBy.h" 10 | 11 | @implementation SEBy 12 | 13 | -(id) initWithLocationStrategy:(NSString*)locationStrategy value:(NSString*)value 14 | { 15 | self = [super init]; 16 | if (self) { 17 | [self setLocationStrategy:locationStrategy]; 18 | [self setValue:value]; 19 | } 20 | return self; 21 | } 22 | 23 | +(SEBy*) className:(NSString*)className 24 | { 25 | return [[SEBy alloc] initWithLocationStrategy:@"class name" value:className]; 26 | } 27 | 28 | +(SEBy*) cssSelector:(NSString*)cssSelector 29 | { 30 | return [[SEBy alloc] initWithLocationStrategy:@"css selector" value:cssSelector]; 31 | } 32 | 33 | +(SEBy*) idString:(NSString*)idString 34 | { 35 | return [[SEBy alloc] initWithLocationStrategy:@"id" value:idString]; 36 | } 37 | 38 | +(SEBy*) name:(NSString*)name 39 | { 40 | return [[SEBy alloc] initWithLocationStrategy:@"name" value:name]; 41 | } 42 | 43 | +(SEBy*) linkText:(NSString*)linkText 44 | { 45 | return [[SEBy alloc] initWithLocationStrategy:@"link text" value:linkText]; 46 | } 47 | 48 | +(SEBy*) partialLinkText:(NSString*)partialLinkText 49 | { 50 | return [[SEBy alloc] initWithLocationStrategy:@"partial link text" value:partialLinkText]; 51 | } 52 | 53 | +(SEBy*) tagName:(NSString*)tagName 54 | { 55 | return [[SEBy alloc] initWithLocationStrategy:@"tag name" value:tagName]; 56 | } 57 | 58 | +(SEBy*) xPath:(NSString*)xPath 59 | { 60 | return [[SEBy alloc] initWithLocationStrategy:@"xpath" value:xPath]; 61 | } 62 | 63 | +(SEBy*) accessibilityId:(NSString*)accessibilityId 64 | { 65 | return [[SEBy alloc] initWithLocationStrategy:@"accessibility id" value:accessibilityId]; 66 | } 67 | 68 | +(SEBy*) androidUIAutomator:(NSString*)uiAutomatorExpression 69 | { 70 | return [[SEBy alloc] initWithLocationStrategy:@"-android uiautomator" value:uiAutomatorExpression]; 71 | } 72 | 73 | 74 | +(SEBy*) iOSUIAutomation:(NSString*)uiAutomationExpression 75 | { 76 | return [[SEBy alloc] initWithLocationStrategy:@"-ios uiautomation" value:uiAutomationExpression]; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /Selenium/SeleniumTests/SeleniumTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // SeleniumTests.m 3 | // SeleniumTests 4 | // 5 | // Created by Dan Cuellar on 3/13/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import "SeleniumTests.h" 10 | #import "SERemoteWebDriver.h" 11 | #import "SECapabilities.h" 12 | #import "SEBy.h" 13 | #import "SEWebElement.h" 14 | 15 | SERemoteWebDriver *driver; 16 | 17 | @implementation SeleniumTests 18 | 19 | - (void) setUp 20 | { 21 | [super setUp]; 22 | SECapabilities *c = [SECapabilities new]; 23 | [c setPlatform:@"MAC"]; 24 | [c setBrowserName:@"firefox"]; 25 | [c setVersion:@"19.0.2"]; 26 | //[c addCapabilityForKey:@"app" andValue:@"/Users/khyatid/dev/workspace/appium/assets/UICatalog.app"]; 27 | //[c addCapabilityForKey:@"name" andValue:@"Selenium Objective-C Tests"]; 28 | //[c addCapabilityForKey:@"username" andValue:@"appiumci"]; 29 | //[c addCapabilityForKey:@"accessKey" andValue:@"af4fbd21-6aee-4a01-857f-c7ffba2f0a50"]; 30 | NSError *error; 31 | //driver = [[SERemoteWebDriver alloc] initWithServerAddress:@"ondemand.saucelabs.com" port:80 desiredCapabilities:c requiredCapabilities:nil error:&error]; 32 | driver = [[SERemoteWebDriver alloc] initWithServerAddress:@"0.0.0.0" port:4444 desiredCapabilities:c requiredCapabilities:nil error:&error]; 33 | 34 | } 35 | 36 | - (void) tearDown 37 | { 38 | [driver quit]; 39 | [super tearDown]; 40 | } 41 | 42 | - (void) testUrl 43 | { 44 | [driver setUrl:[[NSURL alloc] initWithString:@"http://www.zoosk.com"]]; 45 | NSString *oldUrl = [[driver url] absoluteString]; 46 | [driver setUrl:[[NSURL alloc] initWithString:@"http://appium.io/selenium-objective-c/index.html"]]; 47 | XCTAssertFalse(([[[driver url] absoluteString] isEqualToString:oldUrl]), @"Url"); 48 | } 49 | 50 | -(void) testSendKeys 51 | { 52 | [driver setUrl:[[NSURL alloc] initWithString:@"http://appium.io/selenium-objective-c/testpages/textbox.html"]]; 53 | SEWebElement *a = [driver findElementBy:[SEBy idString:@"text1"]]; 54 | NSString *textToType = @"Hello World"; 55 | [a sendKeys:textToType]; 56 | NSString *typedText = [a text]; 57 | XCTAssertTrue([typedText isEqualToString:textToType], @"SendKeys"); 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Selenium/Selenium/SEEnums.m: -------------------------------------------------------------------------------- 1 | // 2 | // SEEnums.m 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/19/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import "SEEnums.h" 10 | 11 | @implementation SEEnums 12 | 13 | +(NSString*) stringForTimeoutType:(SETimeoutType)type 14 | { 15 | switch (type) 16 | { 17 | case SELENIUM_TIMEOUT_IMPLICIT: 18 | return @"implicit"; 19 | case SELENIUM_TIMEOUT_SCRIPT: 20 | return @"script"; 21 | case SELENIUM_TIMEOUT_PAGELOAD: 22 | return @"page load"; 23 | default: 24 | return nil; 25 | } 26 | } 27 | 28 | +(SEApplicationCacheStatus) applicationCacheStatusWithInt:(NSInteger)applicationCacheStatusInt 29 | { 30 | switch (applicationCacheStatusInt) 31 | { 32 | case 0: 33 | return SELENIUM_APPLICATION_CACHE_STATUS_UNCACHED; 34 | case 1: 35 | return SELENIUM_APPLICATION_CACHE_STATUS_IDLE; 36 | case 2: 37 | return SELENIUM_APPLICATION_CACHE_STATUS_CHECKING; 38 | case 3: 39 | return SELENIUM_APPLICATION_CACHE_STATUS_DOWNLOADING; 40 | case 4: 41 | return SELENIUM_APPLICATION_CACHE_STATUS_UPDATE_READY; 42 | case 5: 43 | return SELENIUM_APPLICATION_CACHE_STATUS_OBSOLETE; 44 | default: 45 | return SELENIUM_APPLICATION_CACHE_STATUS_UNCACHED; 46 | } 47 | } 48 | 49 | +(NSInteger) intForMouseButton:(SEMouseButton)button 50 | { 51 | switch (button) 52 | { 53 | case SELENIUM_MOUSE_LEFT_BUTTON: 54 | return 0; 55 | case SELENIUM_MOUSE_MIDDLE_BUTTON: 56 | return 1; 57 | case SELENIUM_MOUSE_RIGHT_BUTTON: 58 | return 2; 59 | default: 60 | return 0; 61 | } 62 | } 63 | 64 | +(NSString*) stringForLogType:(SELogType)logType 65 | { 66 | switch (logType) 67 | { 68 | case SELENIUM_LOG_TYPE_CLIENT: 69 | return @"client"; 70 | case SELENIUM_LOG_TYPE_DRIVER: 71 | return @"driver"; 72 | case SELENIUM_LOG_TYPE_BROWSER: 73 | return @"browser"; 74 | case SELENIUM_LOG_TYPE_SERVER: 75 | return @"server"; 76 | default: 77 | return nil; 78 | } 79 | 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /Selenium/Selenium/SEWebElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // SEWebElement.h 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/18/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SEJsonWireClient.h" 11 | #import "SEBy.h" 12 | #import "SEEnums.h" 13 | 14 | @class SEJsonWireClient; 15 | @class SEBy; 16 | 17 | @interface SEWebElement : NSObject 18 | 19 | @property NSString *opaqueId; 20 | @property NSString *sessionId; 21 | @property (readonly) NSString *text; 22 | @property (readonly) BOOL isDisplayed; 23 | @property (readonly) BOOL isEnabled; 24 | @property (readonly) BOOL isSelected; 25 | @property (readonly) POINT_TYPE location; 26 | @property (readonly) POINT_TYPE locationInView; 27 | @property (readonly) SIZE_TYPE size; 28 | @property (readonly) NSDictionary *elementJson; 29 | 30 | -(id) initWithOpaqueId:(NSString*)opaqueId jsonWireClient:(SEJsonWireClient*)jsonWireClient session:(NSString*)sessionId; 31 | 32 | -(void) click; 33 | -(void) clickAndReturnError:(NSError**)error; 34 | -(void) submit; 35 | -(void) submitAndReturnError:(NSError**)error; 36 | -(NSString*) text; 37 | -(NSString*) textAndReturnError:(NSError**)error; 38 | -(void) sendKeys:(NSString*)keyString; 39 | -(void) sendKeys:(NSString*)keyString error:(NSError**)error; 40 | -(NSString*) tagName; 41 | -(NSString*) tagNameAndReturnError:(NSError**)error; 42 | -(void) clear; 43 | -(void) clearAndReturnError:(NSError**)error; 44 | -(BOOL) isSelected; 45 | -(BOOL) isSelectedAndReturnError:(NSError**)error; 46 | -(BOOL) isEnabled; 47 | -(BOOL) isEnabledAndReturnError:(NSError**)error; 48 | -(NSString*) attribute:(NSString*)attributeName; 49 | -(NSString*) attribute:(NSString*)attributeName error:(NSError**)error; 50 | -(BOOL) isEqualToElement:(SEWebElement*)element; 51 | -(BOOL) isEqualToElement:(SEWebElement*)element error:(NSError**)error; 52 | -(BOOL) isDisplayed; 53 | -(BOOL) isDisplayedAndReturnError:(NSError**)error; 54 | -(POINT_TYPE) location; 55 | -(POINT_TYPE) locationAndReturnError:(NSError**)error; 56 | -(POINT_TYPE) locationInView; 57 | -(POINT_TYPE) locationInViewAndReturnError:(NSError**)error; 58 | -(SIZE_TYPE) size; 59 | -(SIZE_TYPE) sizeAndReturnError:(NSError**)error; 60 | -(NSString*) cssProperty:(NSString*)propertyName; 61 | -(NSString*) cssProperty:(NSString*)propertyName error:(NSError**)error; 62 | 63 | -(SEWebElement*) findElementBy:(SEBy*)by; 64 | -(SEWebElement*) findElementBy:(SEBy*)by error:(NSError**)error; 65 | -(NSArray*) findElementsBy:(SEBy*)by; 66 | -(NSArray*) findElementsBy:(SEBy*)by error:(NSError**)error; 67 | 68 | -(NSDictionary*)elementJson; 69 | 70 | -(void) setValue:(NSString*)value; 71 | -(void) setValue:(NSString*)value isUnicode:(BOOL)isUnicode; 72 | -(void) setValue:(NSString*)value isUnicode:(BOOL)isUnicode error:(NSError**)error; 73 | 74 | -(void) replaceValue:(NSString*)value element:(SEWebElement*)element; 75 | -(void) replaceValue:(NSString*)value element:(SEWebElement*)element isUnicode:(BOOL)isUnicode; 76 | -(void) replaceValue:(NSString*)value isUnicode:(BOOL)isUnicode error:(NSError**)error; 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /Selenium/Selenium/SEUtility.m: -------------------------------------------------------------------------------- 1 | // 2 | // SEUtility.m 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/18/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import "SEUtility.h" 10 | #import "SEError.h" 11 | 12 | #define DEFAULT_TIMEOUT 120 13 | 14 | @implementation SEUtility 15 | 16 | +(NSDictionary*) performGetRequestToUrl:(NSString*)urlString error:(NSError**)error 17 | { 18 | NSURL *url = [NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; 19 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:DEFAULT_TIMEOUT]; 20 | 21 | NSURLResponse *response; 22 | NSData *urlData = [NSURLConnection sendSynchronousRequest:request 23 | returningResponse:&response 24 | error:error]; 25 | if ([*error code] != 0) 26 | return nil; 27 | 28 | NSDictionary *json = [NSJSONSerialization JSONObjectWithData:urlData 29 | options: NSJSONReadingMutableContainers & NSJSONReadingMutableLeaves 30 | error: error]; 31 | if ([*error code] != 0) 32 | return nil; 33 | 34 | *error = [SEError errorWithResponseDict:json]; 35 | if ([*error code] != 0) 36 | return nil; 37 | 38 | return json; 39 | } 40 | 41 | +(NSDictionary*) performPostRequestToUrl:(NSString*)urlString postParams:(NSDictionary*)postParams error:(NSError**)error 42 | { 43 | NSURL *url = [NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; 44 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:DEFAULT_TIMEOUT]; 45 | [request setHTTPMethod:@"POST"]; 46 | 47 | if (postParams == nil) 48 | postParams = [NSDictionary new]; 49 | 50 | NSString *post =[self jsonStringFromDictionary:postParams]; 51 | [request setValue:@"application/json, image/png" forHTTPHeaderField:@"Accept"]; 52 | [request setValue:@"application/json;charset=utf-8" forHTTPHeaderField:@"Content-Type"]; 53 | 54 | [request setHTTPBody:[post dataUsingEncoding:NSUTF8StringEncoding]]; 55 | 56 | NSURLResponse *response = nil; 57 | NSData *responseData = [NSURLConnection sendSynchronousRequest:request 58 | returningResponse:&response 59 | error:error]; 60 | if ([*error code] != 0) 61 | return nil; 62 | 63 | NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse*)response; 64 | if ([httpResponse statusCode] != 200 && [httpResponse statusCode] != 303) 65 | { 66 | return nil; 67 | } 68 | 69 | 70 | NSDictionary *json = [NSJSONSerialization JSONObjectWithData:responseData 71 | options: NSJSONReadingMutableContainers & NSJSONReadingMutableLeaves 72 | error: error]; 73 | if ([*error code] != 0) 74 | return nil; 75 | 76 | *error = [SEError errorWithResponseDict:json]; 77 | if ([*error code] != 0) 78 | return nil; 79 | return json; 80 | } 81 | 82 | +(NSDictionary*) performDeleteRequestToUrl:(NSString*)urlString error:(NSError**)error 83 | { 84 | NSURL *url = [NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; 85 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:DEFAULT_TIMEOUT]; 86 | [request setHTTPMethod:@"DELETE"]; 87 | 88 | NSURLResponse *response; 89 | NSData *urlData = [NSURLConnection sendSynchronousRequest:request 90 | returningResponse:&response 91 | error:error]; 92 | if ([*error code] != 0) 93 | return nil; 94 | 95 | NSDictionary *json = [NSJSONSerialization JSONObjectWithData:urlData 96 | options: NSJSONReadingMutableContainers & NSJSONReadingMutableLeaves 97 | error: error]; 98 | if ([*error code] != 0) 99 | return nil; 100 | 101 | *error = [SEError errorWithResponseDict:json]; 102 | if ([*error code] != 0) 103 | return nil; 104 | 105 | return json; 106 | } 107 | 108 | +(NSData*) jsonDataFromDictionary:(NSDictionary*)dictionary 109 | { 110 | NSError *error; 111 | NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dictionary 112 | options:0/*NSJSONWritingPrettyPrinted*/ 113 | error:&error]; 114 | return jsonData; 115 | } 116 | 117 | +(NSString*) jsonStringFromDictionary:(NSDictionary*)dictionary 118 | { 119 | NSData *jsonData = [self jsonDataFromDictionary:dictionary]; 120 | NSString* jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; 121 | return jsonString; 122 | } 123 | 124 | +(NSHTTPCookie*) cookieWithJson:(NSDictionary*)json 125 | { 126 | NSMutableDictionary *properties = [[NSMutableDictionary alloc] init]; 127 | 128 | double unixTimeStamp = [[json objectForKey:@"expiry"] doubleValue]; 129 | NSTimeInterval _interval=unixTimeStamp; 130 | NSDate *date = [NSDate dateWithTimeIntervalSince1970:_interval]; 131 | 132 | [properties setObject:[json objectForKey:@"name"] forKey:NSHTTPCookieName]; 133 | [properties setObject:[json objectForKey:@"value"] forKey:NSHTTPCookieValue]; 134 | [properties setObject:[json objectForKey:@"path"] forKey:NSHTTPCookiePath]; 135 | [properties setObject:[json objectForKey:@"domain"] forKey:NSHTTPCookieDomain]; 136 | [properties setObject:[json objectForKey:@"secure"] forKey:NSHTTPCookieSecure]; 137 | [properties setObject:date forKey:NSHTTPCookieExpires]; 138 | 139 | 140 | NSHTTPCookie *cookie = [NSHTTPCookie cookieWithProperties:properties]; 141 | return cookie; 142 | } 143 | 144 | @end 145 | -------------------------------------------------------------------------------- /Selenium/Selenium/SETouchAction.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Mark Corbyn on 08/01/15. 3 | // Copyright (c) 2015 Mark Corbyn. All rights reserved. 4 | // 5 | 6 | #import "SETouchAction.h" 7 | #import "SEWebElement.h" 8 | #import "SETouchActionCommand.h" 9 | 10 | static NSString * const SETouchPressKey = @"press"; 11 | static NSString * const SETouchWithdrawKey = @"release"; 12 | static NSString * const SETouchMoveToKey = @"moveTo"; 13 | static NSString * const SETouchTapKey = @"tap"; 14 | static NSString * const SETouchWaitKey = @"wait"; 15 | static NSString * const SETouchLongPressKey = @"longPress"; 16 | 17 | @interface SETouchAction() 18 | 19 | @end 20 | 21 | @implementation SETouchAction 22 | 23 | - (instancetype) init 24 | { 25 | self = [super init]; 26 | if (self) { 27 | self.commands = [NSMutableArray array]; 28 | } 29 | return self; 30 | } 31 | 32 | #pragma mark - Standard Press 33 | -(void) pressElement:(SEWebElement *)element 34 | { 35 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchPressKey]; 36 | [actionEvent addParameterWithKey:@"element" value:[element opaqueId]]; 37 | [self.commands addObject:actionEvent]; 38 | } 39 | 40 | -(void) pressAtX:(NSInteger)x y:(NSInteger)y 41 | { 42 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchPressKey]; 43 | [actionEvent addParameterWithKey:@"x" value:@(x)]; 44 | [actionEvent addParameterWithKey:@"y" value:@(y)]; 45 | [self.commands addObject:actionEvent]; 46 | } 47 | 48 | 49 | -(void) pressElement:(SEWebElement *)element atX:(NSInteger)x y:(NSInteger)y 50 | { 51 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchPressKey]; 52 | [actionEvent addParameterWithKey:@"element" value:[element opaqueId]]; 53 | [actionEvent addParameterWithKey:@"x" value:@(x)]; 54 | [actionEvent addParameterWithKey:@"y" value:@(y)]; 55 | [self.commands addObject:actionEvent]; 56 | } 57 | 58 | #pragma mark - Withdraw/Release 59 | -(void) withdrawTouch 60 | { 61 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchWithdrawKey]; 62 | [self.commands addObject:actionEvent]; 63 | } 64 | 65 | #pragma mark - Move To 66 | -(void) moveToElement:(SEWebElement *)element 67 | { 68 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchMoveToKey]; 69 | [actionEvent addParameterWithKey:@"element" value:[element opaqueId]]; 70 | [self.commands addObject:actionEvent]; 71 | } 72 | 73 | -(void) moveToX:(NSInteger)x y:(NSInteger)y 74 | { 75 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchMoveToKey]; 76 | [actionEvent addParameterWithKey:@"x" value:@(x)]; 77 | [actionEvent addParameterWithKey:@"y" value:@(y)]; 78 | [self.commands addObject:actionEvent]; 79 | } 80 | 81 | -(void) moveToElement:(SEWebElement *)element atX:(NSInteger)x y:(NSInteger)y 82 | { 83 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchMoveToKey]; 84 | [actionEvent addParameterWithKey:@"element" value:[element opaqueId]]; 85 | [actionEvent addParameterWithKey:@"x" value:@(x)]; 86 | [actionEvent addParameterWithKey:@"y" value:@(y)]; 87 | [self.commands addObject:actionEvent]; 88 | } 89 | 90 | // An alias of moveToX:y 91 | - (void) moveByX:(NSInteger)x y:(NSInteger)y 92 | { 93 | [self moveToX:x y:y]; 94 | } 95 | 96 | #pragma mark - Tap 97 | -(void) tapElement:(SEWebElement *)element 98 | { 99 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchTapKey]; 100 | [actionEvent addParameterWithKey:@"element" value:[element opaqueId]]; 101 | [self.commands addObject:actionEvent]; 102 | } 103 | 104 | -(void) tapAtX:(NSInteger)x y:(NSInteger)y 105 | { 106 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchTapKey]; 107 | [actionEvent addParameterWithKey:@"x" value:@(x)]; 108 | [actionEvent addParameterWithKey:@"y" value:@(y)]; 109 | [self.commands addObject:actionEvent]; 110 | } 111 | 112 | -(void) tapElement:(SEWebElement *)element atX:(NSInteger)x y:(NSInteger)y 113 | { 114 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchTapKey]; 115 | [actionEvent addParameterWithKey:@"element" value:[element opaqueId]]; 116 | [actionEvent addParameterWithKey:@"x" value:@(x)]; 117 | [actionEvent addParameterWithKey:@"y" value:@(y)]; 118 | [self.commands addObject:actionEvent]; 119 | } 120 | 121 | 122 | #pragma mark - Wait 123 | -(void) wait 124 | { 125 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchWaitKey]; 126 | [self.commands addObject:actionEvent]; 127 | } 128 | 129 | -(void) waitForTimeInterval:(NSTimeInterval)timeInterval 130 | { 131 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchWaitKey]; 132 | 133 | double milliseconds = timeInterval * 1000; 134 | [actionEvent addParameterWithKey:@"ms" value:@(milliseconds)]; 135 | 136 | [self.commands addObject:actionEvent]; 137 | } 138 | 139 | #pragma mark - Long Press 140 | -(void) longPressElement:(SEWebElement *)element 141 | { 142 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchLongPressKey]; 143 | [actionEvent addParameterWithKey:@"element" value:[element opaqueId]]; 144 | [self.commands addObject:actionEvent]; 145 | } 146 | 147 | -(void) longPressAtX:(NSInteger)x y:(NSInteger)y 148 | { 149 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchLongPressKey]; 150 | [actionEvent addParameterWithKey:@"x" value:@(x)]; 151 | [actionEvent addParameterWithKey:@"y" value:@(y)]; 152 | [self.commands addObject:actionEvent]; 153 | } 154 | 155 | 156 | -(void) longPressElement:(SEWebElement *)element atX:(NSInteger)x y:(NSInteger)y { 157 | SETouchActionCommand *actionEvent = [[SETouchActionCommand alloc] initWithName:SETouchLongPressKey]; 158 | [actionEvent addParameterWithKey:@"element" value:[element opaqueId]]; 159 | [actionEvent addParameterWithKey:@"x" value:@(x)]; 160 | [actionEvent addParameterWithKey:@"y" value:@(y)]; 161 | [self.commands addObject:actionEvent]; 162 | } 163 | 164 | #pragma mark - Cancel 165 | -(void) cancel 166 | { 167 | [self wait]; 168 | } 169 | 170 | @end -------------------------------------------------------------------------------- /Selenium/Selenium/SEError.m: -------------------------------------------------------------------------------- 1 | // 2 | // SEError.m 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/16/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import "SEError.h" 10 | 11 | @implementation SEError 12 | 13 | +(SEError*) errorWithCode:(NSInteger)code Message:(NSString*)message 14 | { 15 | NSMutableDictionary *details = [NSMutableDictionary dictionary]; 16 | [details setValue:message forKey:NSLocalizedDescriptionKey]; 17 | return (SEError*)[SEError errorWithDomain:@"com.appium.selenium" code:code userInfo:details]; 18 | } 19 | 20 | +(SEError*) errorWithCode:(NSInteger)code 21 | { 22 | switch (code) 23 | { 24 | case 0: return [self success]; 25 | case 6: return [self noSuchDriver]; 26 | case 7: return [self noSuchElement]; 27 | case 8: return [self noSuchFrame]; 28 | case 9: return [self unknownCommand]; 29 | case 10: return [self staleElementReference]; 30 | case 11: return [self elementNotVisible]; 31 | case 12: return [self invalidElementState]; 32 | case 13: return [self unknownError]; 33 | case 15: return [self elementIsNotSelectable]; 34 | case 17: return [self javaScriptError]; 35 | case 19: return [self xpathLookupError]; 36 | case 21: return [self timeout]; 37 | case 23: return [self noSuchWindow]; 38 | case 24: return [self invalidCookieDomain]; 39 | case 25: return [self unableToSetCookie]; 40 | case 26: return [self unexpectedAlertOpen]; 41 | case 27: return [self noAlertOpenError]; 42 | case 28: return [self scriptTimeout]; 43 | case 29: return [self invalidElementCoordinates]; 44 | case 30: return [self imeNotAvailable]; 45 | case 31: return [self imeEngineActivationFailed]; 46 | case 32: return [self invalidSelector]; 47 | case 33: return [self sessionNotCreatedException]; 48 | case 34: return [self moveTargetOutOfBounds]; 49 | default: return [self unknownError]; 50 | } 51 | } 52 | 53 | +(SEError*) errorWithResponseDict:(NSDictionary*)dict 54 | { 55 | return [SEError errorWithCode:[[dict objectForKey:@"status"] integerValue]]; 56 | } 57 | 58 | +(SEError*) success { return [self errorWithCode:0 Message:@"Success: The command executed successfully."]; } 59 | 60 | +(SEError*) noSuchDriver { return [self errorWithCode:6 Message:@"NoSuchDriver: A session is either terminated or not started."]; } 61 | 62 | +(SEError*) noSuchElement { return [self errorWithCode:7 Message:@"NoSuchElement: An element could not be located on the page using the given search parameters."]; } 63 | 64 | +(SEError*) noSuchFrame { return [self errorWithCode:8 Message:@"NoSuchFrame: A request to switch to a frame could not be satisfied because the frame could not be found."]; } 65 | 66 | +(SEError*) unknownCommand { return [self errorWithCode:9 Message:@"UnknownCommand: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource."]; } 67 | 68 | +(SEError*) staleElementReference { return [self errorWithCode:10 Message:@"StaleElementReference: An element command failed because the referenced element is no longer attached to the DOM."]; } 69 | 70 | +(SEError*) elementNotVisible { return [self errorWithCode:11 Message:@"ElementNotVisible: An element command could not be completed because the element is not visible on the page."]; } 71 | 72 | +(SEError*) invalidElementState { return [self errorWithCode:12 Message:@"InvalidElementState: An element command could not be completed because the element is in an invalid state (e.g. attempting to click a disabled element)."]; } 73 | 74 | +(SEError*) unknownError { return [self errorWithCode:13 Message:@"UnknownError: An unknown server-side error occurred while processing the command."]; } 75 | 76 | +(SEError*) elementIsNotSelectable { return [self errorWithCode:15 Message:@"ElementIsNotSelectable: An attempt was made to select an element that cannot be selected."]; } 77 | 78 | +(SEError*) javaScriptError { return [self errorWithCode:17 Message:@"JavaScriptError: An error occurred while executing user supplied JavaScript."]; } 79 | 80 | +(SEError*) xpathLookupError { return [self errorWithCode:19 Message:@"XPathLookupError: An error occurred while searching for an element by XPath."]; } 81 | 82 | +(SEError*) timeout { return [self errorWithCode:21 Message:@"Timeout: An operation did not complete before its timeout expired."]; } 83 | 84 | +(SEError*) noSuchWindow { return [self errorWithCode:23 Message:@"NoSuchWindow: A request to switch to a different window could not be satisfied because the window could not be found."]; } 85 | 86 | +(SEError*) invalidCookieDomain { return [self errorWithCode:24 Message:@"InvalidCookieDomain: An illegal attempt was made to set a cookie under a different domain than the current page."]; } 87 | 88 | +(SEError*) unableToSetCookie { return [self errorWithCode:25 Message:@"UnableToSetCookie: A request to set a cookie's value could not be satisfied."]; } 89 | 90 | +(SEError*) unexpectedAlertOpen { return [self errorWithCode:26 Message:@"UnexpectedAlertOpen: A modal dialog was open, blocking this operation"]; } 91 | 92 | +(SEError*) noAlertOpenError { return [self errorWithCode:27 Message:@"NoAlertOpenError: An attempt was made to operate on a modal dialog when one was not open."]; } 93 | 94 | +(SEError*) scriptTimeout { return [self errorWithCode:28 Message:@"ScriptTimeout: A script did not complete before its timeout expired."]; } 95 | 96 | +(SEError*) invalidElementCoordinates { return [self errorWithCode:29 Message:@"InvalidElementCoordinates: The coordinates provided to an interactions operation are invalid."]; } 97 | 98 | +(SEError*) imeNotAvailable { return [self errorWithCode:30 Message:@"IMENotAvailable: IME was not available."]; } 99 | 100 | +(SEError*) imeEngineActivationFailed { return [self errorWithCode:31 Message:@"IMEEngineActivationFailed: An IME engine could not be started."]; } 101 | 102 | +(SEError*) invalidSelector { return [self errorWithCode:32 Message:@"InvalidSelector: Argument was an invalid selector (e.g. XPath/CSS)."]; } 103 | 104 | +(SEError*) sessionNotCreatedException { return [self errorWithCode:33 Message:@"SessionNotCreatedException: A new session could not be created."]; } 105 | 106 | +(SEError*) moveTargetOutOfBounds { return [self errorWithCode:34 Message:@"MoveTargetOutOfBounds: Target provided for a move action is out of bounds."]; } 107 | 108 | @end 109 | -------------------------------------------------------------------------------- /Selenium/Selenium/SEWebElement.m: -------------------------------------------------------------------------------- 1 | // 2 | // SEWebElement.m 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/18/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import "SEWebElement.h" 10 | 11 | @interface SEWebElement () 12 | @property SEJsonWireClient *jsonWireClient; 13 | @end 14 | 15 | @implementation SEWebElement 16 | 17 | -(id) initWithOpaqueId:(NSString*)opaqueId jsonWireClient:(SEJsonWireClient*)jsonWireClient session:(NSString*)sessionId 18 | { 19 | self = [super init]; 20 | if (self) { 21 | [self setOpaqueId:opaqueId]; 22 | [self setJsonWireClient:jsonWireClient]; 23 | [self setSessionId:sessionId]; 24 | } 25 | return self; 26 | } 27 | 28 | -(void) click 29 | { 30 | NSError *error; 31 | [self clickAndReturnError:&error]; 32 | [self.jsonWireClient addError:error]; 33 | } 34 | 35 | -(void) clickAndReturnError:(NSError**)error 36 | { 37 | [self.jsonWireClient postClickElement:self session:self.sessionId error:error]; 38 | } 39 | 40 | -(void) submit 41 | { 42 | NSError *error; 43 | [self submitAndReturnError:&error]; 44 | [self.jsonWireClient addError:error]; 45 | } 46 | 47 | -(void) submitAndReturnError:(NSError**)error 48 | { 49 | [self.jsonWireClient postSubmitElement:self session:self.sessionId error:error]; 50 | } 51 | 52 | -(NSString*) text 53 | { 54 | NSError *error; 55 | NSString *text = [self textAndReturnError:&error]; 56 | [self.jsonWireClient addError:error]; 57 | return text; 58 | } 59 | 60 | -(NSString*) textAndReturnError:(NSError**)error 61 | { 62 | return [self.jsonWireClient getElementText:self session:self.sessionId error:error]; 63 | } 64 | 65 | -(void) sendKeys:(NSString*)keyString 66 | { 67 | NSError *error; 68 | [self sendKeys:keyString error:&error]; 69 | [self.jsonWireClient addError:error]; 70 | } 71 | 72 | -(void) sendKeys:(NSString*)keyString error:(NSError**)error 73 | { 74 | unichar keys[keyString.length+1]; 75 | for(int i=0; i < keyString.length; i++) 76 | keys[i] = [keyString characterAtIndex:i]; 77 | keys[keyString.length] = '\0'; 78 | return [self.jsonWireClient postKeys:keys element:self session:self.sessionId error:error]; 79 | } 80 | 81 | -(NSString*) tagName 82 | { 83 | NSError *error; 84 | NSString *tagName = [self tagNameAndReturnError:&error]; 85 | [self.jsonWireClient addError:error]; 86 | return tagName; 87 | } 88 | 89 | -(NSString*) tagNameAndReturnError:(NSError**)error 90 | { 91 | return [self.jsonWireClient getElementName:self session:self.sessionId error:error]; 92 | } 93 | 94 | -(void) clear 95 | { 96 | NSError *error; 97 | [self clearAndReturnError:&error]; 98 | [self.jsonWireClient addError:error]; 99 | } 100 | 101 | -(void) clearAndReturnError:(NSError**)error 102 | { 103 | [self.jsonWireClient postClearElement:self session:self.sessionId error:error]; 104 | } 105 | 106 | -(BOOL) isSelected 107 | { 108 | NSError *error; 109 | return [self isSelectedAndReturnError:&error]; 110 | } 111 | 112 | -(BOOL) isSelectedAndReturnError:(NSError**)error 113 | { 114 | return [self.jsonWireClient getElementIsSelected:self session:self.sessionId error:error]; 115 | } 116 | 117 | -(BOOL) isEnabled 118 | { 119 | NSError *error; 120 | return [self isEnabledAndReturnError:&error]; 121 | } 122 | 123 | -(BOOL) isEnabledAndReturnError:(NSError**)error 124 | { 125 | return [self.jsonWireClient getElementIsEnabled:self session:self.sessionId error:error]; 126 | } 127 | 128 | -(NSString*) attribute:(NSString*)attributeName 129 | { 130 | NSError *error; 131 | NSString *attribute = [self attribute:attributeName error:&error]; 132 | [self.jsonWireClient addError:error]; 133 | return attribute; 134 | } 135 | 136 | -(NSString*) attribute:(NSString*)attributeName error:(NSError**)error 137 | { 138 | return [self.jsonWireClient getAttribute:attributeName element:self session:self.sessionId error:error]; 139 | } 140 | 141 | -(BOOL) isEqualToElement:(SEWebElement*)element 142 | { 143 | NSError *error; 144 | BOOL result = [self isEqualToElement:element error:&error]; 145 | [self.jsonWireClient addError:error]; 146 | return result; 147 | } 148 | 149 | -(BOOL) isEqualToElement:(SEWebElement*)element error:(NSError**)error 150 | { 151 | return [self.jsonWireClient getEqualityForElement:self element:element session:self.sessionId error:error]; 152 | } 153 | 154 | -(BOOL) isDisplayed 155 | { 156 | NSError *error; 157 | BOOL isDisplayed = [self isDisplayedAndReturnError:&error]; 158 | [self.jsonWireClient addError:error]; 159 | return isDisplayed; 160 | } 161 | 162 | -(BOOL) isDisplayedAndReturnError:(NSError**)error 163 | { 164 | return [self.jsonWireClient getElementIsDisplayed:self session:self.sessionId error:error]; 165 | } 166 | 167 | -(POINT_TYPE) location 168 | { 169 | NSError *error; 170 | POINT_TYPE location = [self locationAndReturnError:&error]; 171 | [self.jsonWireClient addError:error]; 172 | return location; 173 | } 174 | 175 | -(POINT_TYPE) locationAndReturnError:(NSError**)error 176 | { 177 | return [self.jsonWireClient getElementLocation:self session:self.sessionId error:error]; 178 | } 179 | 180 | -(POINT_TYPE) locationInView 181 | { 182 | NSError *error; 183 | POINT_TYPE locationInView = [self locationInViewAndReturnError:&error]; 184 | [self.jsonWireClient addError:error]; 185 | return locationInView; 186 | } 187 | 188 | -(POINT_TYPE) locationInViewAndReturnError:(NSError**)error 189 | { 190 | return [self.jsonWireClient getElementLocationInView:self session:self.sessionId error:error]; 191 | } 192 | 193 | -(SIZE_TYPE) size 194 | { 195 | NSError *error; 196 | SIZE_TYPE size = [self sizeAndReturnError:&error]; 197 | [self.jsonWireClient addError:error]; 198 | return size; 199 | } 200 | 201 | -(SIZE_TYPE) sizeAndReturnError:(NSError**)error 202 | { 203 | return [self.jsonWireClient getElementSize:self session:self.sessionId error:error]; 204 | } 205 | 206 | -(NSString*) cssProperty:(NSString*)propertyName 207 | { 208 | NSError *error; 209 | NSString *property = [self cssProperty:propertyName error:&error]; 210 | [self.jsonWireClient addError:error]; 211 | return property; 212 | } 213 | 214 | -(NSString*) cssProperty:(NSString*)propertyName error:(NSError**)error 215 | { 216 | return [self.jsonWireClient getCSSProperty:propertyName element:self session:self.sessionId error:error]; 217 | } 218 | 219 | -(SEWebElement*) findElementBy:(SEBy*)by 220 | { 221 | NSError *error; 222 | SEWebElement *element = [self findElementBy:by error:&error]; 223 | [self.jsonWireClient addError:error]; 224 | return element; 225 | } 226 | 227 | -(SEWebElement*) findElementBy:(SEBy*)by error:(NSError**)error 228 | { 229 | SEWebElement *element = [self.jsonWireClient postElementFromElement:self by:by session:self.sessionId error:error]; 230 | return element != nil && element.opaqueId != nil ? element : nil; 231 | } 232 | 233 | -(NSArray*) findElementsBy:(SEBy*)by 234 | { 235 | NSError *error; 236 | NSArray *elements = [self findElementsBy:by error:&error]; 237 | [self.jsonWireClient addError:error]; 238 | return elements; 239 | } 240 | 241 | -(NSArray*) findElementsBy:(SEBy*)by error:(NSError**)error 242 | { 243 | NSArray *elements = [self.jsonWireClient postElementsFromElement:self by:by session:self.sessionId error:error]; 244 | if (elements == nil || elements.count < 1) { 245 | return [NSArray new]; 246 | } 247 | SEWebElement *element = [elements objectAtIndex:0]; 248 | if (element == nil || element.opaqueId == nil) { 249 | return [NSArray new]; 250 | } 251 | return elements; 252 | } 253 | 254 | -(NSDictionary*)elementJson 255 | { 256 | NSDictionary* json = [[NSDictionary alloc] initWithObjectsAndKeys:self.opaqueId, @"ELEMENT", nil]; 257 | return json; 258 | } 259 | 260 | -(void) setValue:(NSString*)value { 261 | [self setValue:value isUnicode:NO]; 262 | } 263 | 264 | -(void) setValue:(NSString*)value isUnicode:(BOOL)isUnicode { 265 | NSError *error; 266 | [self setValue:value isUnicode:isUnicode error:&error]; 267 | [self.jsonWireClient addError:error]; 268 | } 269 | 270 | -(void) setValue:(NSString*)value isUnicode:(BOOL)isUnicode error:(NSError**)error 271 | { 272 | [self.jsonWireClient postSetValueForElement:self value:value isUnicode:isUnicode session:self.sessionId error:error]; 273 | } 274 | 275 | -(void) replaceValue:(NSString*)value element:(SEWebElement*)element { 276 | [self replaceValue:value element:element isUnicode:NO]; 277 | } 278 | 279 | -(void) replaceValue:(NSString*)value element:(SEWebElement*)element isUnicode:(BOOL)isUnicode { 280 | NSError *error; 281 | [self replaceValue:value isUnicode:isUnicode error:&error]; 282 | [self.jsonWireClient addError:error]; 283 | } 284 | 285 | -(void) replaceValue:(NSString*)value isUnicode:(BOOL)isUnicode error:(NSError**)error 286 | { 287 | [self.jsonWireClient postReplaceValueForElement:self value:value isUnicode:isUnicode session:self.sessionId error:error]; 288 | } 289 | 290 | @end 291 | -------------------------------------------------------------------------------- /Selenium/Selenium/SECapabilities.m: -------------------------------------------------------------------------------- 1 | // 2 | // SECapabilities.m 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/14/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #define BROWSER_NAME @"browserName" 10 | #define VERSION @"version" 11 | #define PLATFORM @"platform" 12 | #define JAVASCRIPT_ENABLED @"javascriptEnabled" 13 | #define TAKES_SCREENSHOT @"takesScreenshot" 14 | #define HANDLES_ALERTS @"handlesAlerts" 15 | #define DATABASE_ENABLED @"databaseEnabled" 16 | #define LOCATION_CONTEXT_ENABLED @"locationContextEnabled" 17 | #define APPLICATION_CACHE_ENABLED @"applicationCacheEnabled" 18 | #define BROWSER_CONNECTION_ENABLED @"browserConnectionEnabled" 19 | #define CSS_SELECTORS_ENABLED @"cssSelectorsEnabled" 20 | #define WEB_STORAGE_ENABLED @"webStorageEnabled" 21 | #define ROTATABLE @"rotatable" 22 | #define ACCEPT_SSL_CERTS @"acceptSslCerts" 23 | #define NATIVE_EVENTS @"nativeEvents" 24 | #define PROXY @"proxy" 25 | 26 | #define APP @"app" 27 | #define AUTOMATION_NAME @"automationName" 28 | #define DEVICE_NAME @"deviceName" 29 | #define PLATFORM_NAME @"platformName" 30 | #define PLATFORM_VERSION @"platformVersion" 31 | 32 | #import "SECapabilities.h" 33 | 34 | @interface SECapabilities() { 35 | @private 36 | NSMutableDictionary* _dict; 37 | } 38 | @end 39 | 40 | @implementation SECapabilities 41 | 42 | #pragma mark - Constructors 43 | 44 | -(id) init 45 | { 46 | self = [super init]; 47 | if (self) { 48 | _dict = [NSMutableDictionary new]; 49 | } 50 | return self; 51 | } 52 | 53 | -(id) initWithDictionary:(NSDictionary*)dict 54 | { 55 | self = [super init]; 56 | if (self) { 57 | _dict = [NSMutableDictionary new]; 58 | if ([dict objectForKey:BROWSER_NAME]) { 59 | [self setBrowserName:[dict objectForKey:BROWSER_NAME]]; 60 | } 61 | 62 | if ([dict objectForKey:VERSION]) { 63 | [self setVersion:[dict objectForKey:VERSION]]; 64 | } 65 | 66 | if ([dict objectForKey:PLATFORM]) { 67 | [self setPlatform:[dict objectForKey:PLATFORM]]; 68 | } 69 | 70 | if ([dict objectForKey:JAVASCRIPT_ENABLED]) { 71 | [self setJavascriptEnabled:[[dict objectForKey:JAVASCRIPT_ENABLED] boolValue]]; 72 | } 73 | 74 | if ([dict objectForKey:TAKES_SCREENSHOT]) { 75 | [self setTakesScreenShot:[[dict objectForKey:TAKES_SCREENSHOT] boolValue]]; 76 | } 77 | 78 | if ([dict objectForKey:HANDLES_ALERTS]) { 79 | [self setHandlesAlerts:[[dict objectForKey:HANDLES_ALERTS] boolValue]]; 80 | } 81 | 82 | if ([dict objectForKey:DATABASE_ENABLED]) { 83 | [self setDatabaseEnabled:[[dict objectForKey:DATABASE_ENABLED] boolValue]]; 84 | } 85 | 86 | if ([dict objectForKey:LOCATION_CONTEXT_ENABLED]) { 87 | [self setLocationContextEnabled:[[dict objectForKey:LOCATION_CONTEXT_ENABLED] boolValue]]; 88 | } 89 | 90 | if ([dict objectForKey:APPLICATION_CACHE_ENABLED]) { 91 | [self setApplicationCacheEnabled:[[dict objectForKey:APPLICATION_CACHE_ENABLED] boolValue]]; 92 | } 93 | 94 | if ([dict objectForKey:BROWSER_CONNECTION_ENABLED]) { 95 | [self setBrowserConnectionEnabled:[[dict objectForKey:BROWSER_CONNECTION_ENABLED] boolValue]]; 96 | } 97 | 98 | if ([dict objectForKey:CSS_SELECTORS_ENABLED]) { 99 | [self setCssSelectorsEnabled:[[dict objectForKey:CSS_SELECTORS_ENABLED] boolValue]]; 100 | } 101 | 102 | if ([dict objectForKey:WEB_STORAGE_ENABLED]) { 103 | [self setWebStorageEnabled:[[dict objectForKey:WEB_STORAGE_ENABLED] boolValue]]; 104 | } 105 | 106 | if ([dict objectForKey:APP]) { 107 | [self setApp:[dict objectForKey:APP]]; 108 | } 109 | if ([dict objectForKey:AUTOMATION_NAME]) { 110 | [self setAutomationName:[dict objectForKey:AUTOMATION_NAME]]; 111 | } 112 | if ([dict objectForKey:DEVICE_NAME]) { 113 | [self setDeviceName:[dict objectForKey:DEVICE_NAME]]; 114 | } 115 | if ([dict objectForKey:PLATFORM_NAME]) { 116 | [self setPlatformName:[dict objectForKey:PLATFORM_NAME]]; 117 | } 118 | if ([dict objectForKey:PLATFORM_VERSION]) { 119 | [self setPlatformVersion:[dict objectForKey:PLATFORM_VERSION]]; 120 | } 121 | } 122 | return self; 123 | } 124 | 125 | #pragma mark - Built-in Capabilities 126 | 127 | -(NSString*) browserName { return [_dict objectForKey:BROWSER_NAME];} 128 | -(void) setBrowserName:(NSString *)browserName { [_dict setValue:browserName forKey:BROWSER_NAME]; } 129 | 130 | -(NSString*) version { return [_dict objectForKey:VERSION];} 131 | -(void) setVersion:(NSString *)version { [_dict setValue:version forKey:VERSION]; } 132 | 133 | -(NSString*) platform { return [_dict objectForKey:PLATFORM];} 134 | -(void) setPlatform:(NSString *)platform { [_dict setValue:platform forKey:PLATFORM]; } 135 | 136 | -(BOOL) javascriptEnabled { return [[_dict objectForKey:JAVASCRIPT_ENABLED] boolValue]; } 137 | -(void) setJavascriptEnabled:(BOOL)javascriptEnabled { [_dict setValue:[NSNumber numberWithBool:javascriptEnabled] forKey:JAVASCRIPT_ENABLED]; } 138 | 139 | -(BOOL) takesScreenShot { return [[_dict objectForKey:TAKES_SCREENSHOT] boolValue]; } 140 | -(void) setTakesScreenShot:(BOOL)takesScreenShot { [_dict setValue:[NSNumber numberWithBool:takesScreenShot] forKey:TAKES_SCREENSHOT]; } 141 | 142 | -(BOOL) handlesAlerts { return [[_dict objectForKey:HANDLES_ALERTS] boolValue]; } 143 | -(void) setHandlesAlerts:(BOOL)handlesAlerts { [_dict setValue:[NSNumber numberWithBool:handlesAlerts] forKey:HANDLES_ALERTS]; } 144 | 145 | -(BOOL) databaseEnabled { return [[_dict objectForKey:DATABASE_ENABLED] boolValue]; } 146 | -(void) setDatabaseEnabled:(BOOL)databaseEnabled { [_dict setValue:[NSNumber numberWithBool:databaseEnabled] forKey:DATABASE_ENABLED]; } 147 | 148 | -(BOOL) locationContextEnabled { return [[_dict objectForKey:LOCATION_CONTEXT_ENABLED] boolValue]; } 149 | -(void) setLocationContextEnabled:(BOOL)locationContextEnabled { [_dict setValue:[NSNumber numberWithBool:locationContextEnabled] forKey:LOCATION_CONTEXT_ENABLED];} 150 | 151 | -(BOOL) applicationCacheEnabled { return [[_dict objectForKey:APPLICATION_CACHE_ENABLED] boolValue]; } 152 | -(void) setApplicationCacheEnabled:(BOOL)applicationCacheEnabled { [_dict setValue:[NSNumber numberWithBool:applicationCacheEnabled] forKey:APPLICATION_CACHE_ENABLED]; } 153 | 154 | -(BOOL) browserConnectionEnabled { return [[_dict objectForKey:BROWSER_CONNECTION_ENABLED] boolValue]; } 155 | -(void) setBrowserConnectionEnabled:(BOOL)browserConnectionEnabled { [_dict setValue:[NSNumber numberWithBool:browserConnectionEnabled] forKey:BROWSER_CONNECTION_ENABLED]; } 156 | 157 | -(BOOL) cssSelectorsEnabled { return [[_dict objectForKey:CSS_SELECTORS_ENABLED] boolValue]; } 158 | -(void) setCssSelectorsEnabled:(BOOL)cssSelectorsEnabled { [_dict setValue:[NSNumber numberWithBool:cssSelectorsEnabled] forKey:CSS_SELECTORS_ENABLED]; } 159 | 160 | -(BOOL) webStorageEnabled { return [[_dict objectForKey:WEB_STORAGE_ENABLED] boolValue]; } 161 | -(void) setWebStorageEnabled:(BOOL)webStorageEnabled { [_dict setValue:[NSNumber numberWithBool:webStorageEnabled] forKey:WEB_STORAGE_ENABLED]; } 162 | 163 | -(BOOL) rotatable { return [[_dict objectForKey:ROTATABLE] boolValue]; } 164 | -(void) setRotatable:(BOOL)rotatable { [_dict setValue:[NSNumber numberWithBool:rotatable] forKey:ROTATABLE]; } 165 | 166 | -(BOOL) acceptSslCerts { return [[_dict objectForKey:ACCEPT_SSL_CERTS] boolValue]; } 167 | -(void) setAcceptSslCerts:(BOOL)acceptSslCerts { [_dict setValue:[NSNumber numberWithBool:acceptSslCerts] forKey:ACCEPT_SSL_CERTS]; } 168 | 169 | -(BOOL) nativeEvents { return [[_dict objectForKey:NATIVE_EVENTS] boolValue]; } 170 | -(void) setNativeEvents:(BOOL)nativeEvents { [_dict setValue:[NSNumber numberWithBool:nativeEvents] forKey:NATIVE_EVENTS]; } 171 | 172 | #pragma mark - Appium Capabilities 173 | 174 | - (NSString *)app { return [_dict objectForKey:APP]; } 175 | - (void)setApp:(NSString *)app { [_dict setObject:app forKey:APP]; } 176 | 177 | - (NSString *)automationName { return [_dict objectForKey:AUTOMATION_NAME]; } 178 | - (void)setAutomationName:(NSString *)automationName { [_dict setObject:automationName forKey:AUTOMATION_NAME]; } 179 | 180 | - (NSString *)deviceName { return [_dict objectForKey:DEVICE_NAME]; } 181 | - (void)setDeviceName:(NSString *)deviceName { [_dict setObject:deviceName forKey:DEVICE_NAME]; } 182 | 183 | - (NSString *)platformName { return [_dict objectForKey:PLATFORM_NAME]; } 184 | - (void)setPlatformName:(NSString *)platformName { [_dict setObject:platformName forKey:PLATFORM_NAME]; } 185 | 186 | - (NSString *)platformVersion { return [_dict objectForKey:PLATFORM_VERSION]; } 187 | - (void)setPlatformVersion:(NSString *)platformVersion { [_dict setObject:platformVersion forKey:PLATFORM_VERSION]; } 188 | 189 | #pragma mark - Custom Capabilities 190 | 191 | -(id) getCapabilityForKey:(NSString*)key { return [_dict valueForKey:key]; } 192 | -(void) addCapabilityForKey:(NSString*)key andValue:(id)value { [_dict setValue:value forKey:key]; } 193 | -(NSDictionary*) dictionary { return _dict; } 194 | 195 | @end 196 | -------------------------------------------------------------------------------- /Selenium/Selenium/NSData+Base64.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Base64.m 3 | // base64 4 | // 5 | // Created by Matt Gallagher on 2009/06/03. 6 | // Copyright 2009 Matt Gallagher. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. Permission is granted to anyone to 11 | // use this software for any purpose, including commercial applications, and to 12 | // alter it and redistribute it freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would be 17 | // appreciated but is not required. 18 | // 2. Altered source versions must be plainly marked as such, and must not be 19 | // misrepresented as being the original software. 20 | // 3. This notice may not be removed or altered from any source 21 | // distribution. 22 | // 23 | 24 | #import "NSData+Base64.h" 25 | 26 | // 27 | // Mapping from 6 bit pattern to ASCII character. 28 | // 29 | static unsigned char base64EncodeLookup[65] = 30 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 31 | 32 | // 33 | // Definition for "masked-out" areas of the base64DecodeLookup mapping 34 | // 35 | #define xx 65 36 | 37 | // 38 | // Mapping from ASCII character to 6 bit pattern. 39 | // 40 | static unsigned char base64DecodeLookup[256] = 41 | { 42 | xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 43 | xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 44 | xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 62, xx, xx, xx, 63, 45 | 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, xx, xx, xx, xx, xx, xx, 46 | xx, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 47 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, xx, xx, xx, xx, xx, 48 | xx, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 49 | 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, xx, xx, xx, xx, xx, 50 | xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 51 | xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 52 | xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 53 | xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 54 | xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 55 | xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 56 | xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 57 | xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 58 | }; 59 | 60 | // 61 | // Fundamental sizes of the binary and base64 encode/decode units in bytes 62 | // 63 | #define BINARY_UNIT_SIZE 3 64 | #define BASE64_UNIT_SIZE 4 65 | 66 | // 67 | // NewBase64Decode 68 | // 69 | // Decodes the base64 ASCII string in the inputBuffer to a newly malloced 70 | // output buffer. 71 | // 72 | // inputBuffer - the source ASCII string for the decode 73 | // length - the length of the string or -1 (to specify strlen should be used) 74 | // outputLength - if not-NULL, on output will contain the decoded length 75 | // 76 | // returns the decoded buffer. Must be free'd by caller. Length is given by 77 | // outputLength. 78 | // 79 | void *NewBase64Decode( 80 | const char *inputBuffer, 81 | size_t length, 82 | size_t *outputLength) 83 | { 84 | if (length == -1) 85 | { 86 | length = strlen(inputBuffer); 87 | } 88 | 89 | size_t outputBufferSize = 90 | ((length+BASE64_UNIT_SIZE-1) / BASE64_UNIT_SIZE) * BINARY_UNIT_SIZE; 91 | unsigned char *outputBuffer = (unsigned char *)malloc(outputBufferSize); 92 | 93 | size_t i = 0; 94 | size_t j = 0; 95 | while (i < length) 96 | { 97 | // 98 | // Accumulate 4 valid characters (ignore everything else) 99 | // 100 | unsigned char accumulated[BASE64_UNIT_SIZE]; 101 | size_t accumulateIndex = 0; 102 | while (i < length) 103 | { 104 | unsigned char decode = base64DecodeLookup[inputBuffer[i++]]; 105 | if (decode != xx) 106 | { 107 | accumulated[accumulateIndex] = decode; 108 | accumulateIndex++; 109 | 110 | if (accumulateIndex == BASE64_UNIT_SIZE) 111 | { 112 | break; 113 | } 114 | } 115 | } 116 | 117 | // 118 | // Store the 6 bits from each of the 4 characters as 3 bytes 119 | // 120 | // (Uses improved bounds checking suggested by Alexandre Colucci) 121 | // 122 | if(accumulateIndex >= 2) 123 | outputBuffer[j] = (accumulated[0] << 2) | (accumulated[1] >> 4); 124 | if(accumulateIndex >= 3) 125 | outputBuffer[j + 1] = (accumulated[1] << 4) | (accumulated[2] >> 2); 126 | if(accumulateIndex >= 4) 127 | outputBuffer[j + 2] = (accumulated[2] << 6) | accumulated[3]; 128 | j += accumulateIndex - 1; 129 | } 130 | 131 | if (outputLength) 132 | { 133 | *outputLength = j; 134 | } 135 | return outputBuffer; 136 | } 137 | 138 | // 139 | // NewBase64Encode 140 | // 141 | // Encodes the arbitrary data in the inputBuffer as base64 into a newly malloced 142 | // output buffer. 143 | // 144 | // inputBuffer - the source data for the encode 145 | // length - the length of the input in bytes 146 | // separateLines - if zero, no CR/LF characters will be added. Otherwise 147 | // a CR/LF pair will be added every 64 encoded chars. 148 | // outputLength - if not-NULL, on output will contain the encoded length 149 | // (not including terminating 0 char) 150 | // 151 | // returns the encoded buffer. Must be free'd by caller. Length is given by 152 | // outputLength. 153 | // 154 | char *NewBase64Encode( 155 | const void *buffer, 156 | size_t length, 157 | bool separateLines, 158 | size_t *outputLength) 159 | { 160 | const unsigned char *inputBuffer = (const unsigned char *)buffer; 161 | 162 | #define MAX_NUM_PADDING_CHARS 2 163 | #define OUTPUT_LINE_LENGTH 64 164 | #define INPUT_LINE_LENGTH ((OUTPUT_LINE_LENGTH / BASE64_UNIT_SIZE) * BINARY_UNIT_SIZE) 165 | #define CR_LF_SIZE 2 166 | 167 | // 168 | // Byte accurate calculation of final buffer size 169 | // 170 | size_t outputBufferSize = 171 | ((length / BINARY_UNIT_SIZE) 172 | + ((length % BINARY_UNIT_SIZE) ? 1 : 0)) 173 | * BASE64_UNIT_SIZE; 174 | if (separateLines) 175 | { 176 | outputBufferSize += 177 | (outputBufferSize / OUTPUT_LINE_LENGTH) * CR_LF_SIZE; 178 | } 179 | 180 | // 181 | // Include space for a terminating zero 182 | // 183 | outputBufferSize += 1; 184 | 185 | // 186 | // Allocate the output buffer 187 | // 188 | char *outputBuffer = (char *)malloc(outputBufferSize); 189 | if (!outputBuffer) 190 | { 191 | return NULL; 192 | } 193 | 194 | size_t i = 0; 195 | size_t j = 0; 196 | const size_t lineLength = separateLines ? INPUT_LINE_LENGTH : length; 197 | size_t lineEnd = lineLength; 198 | 199 | while (true) 200 | { 201 | if (lineEnd > length) 202 | { 203 | lineEnd = length; 204 | } 205 | 206 | for (; i + BINARY_UNIT_SIZE - 1 < lineEnd; i += BINARY_UNIT_SIZE) 207 | { 208 | // 209 | // Inner loop: turn 48 bytes into 64 base64 characters 210 | // 211 | outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2]; 212 | outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i] & 0x03) << 4) 213 | | ((inputBuffer[i + 1] & 0xF0) >> 4)]; 214 | outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i + 1] & 0x0F) << 2) 215 | | ((inputBuffer[i + 2] & 0xC0) >> 6)]; 216 | outputBuffer[j++] = base64EncodeLookup[inputBuffer[i + 2] & 0x3F]; 217 | } 218 | 219 | if (lineEnd == length) 220 | { 221 | break; 222 | } 223 | 224 | // 225 | // Add the newline 226 | // 227 | outputBuffer[j++] = '\r'; 228 | outputBuffer[j++] = '\n'; 229 | lineEnd += lineLength; 230 | } 231 | 232 | if (i + 1 < length) 233 | { 234 | // 235 | // Handle the single '=' case 236 | // 237 | outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2]; 238 | outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i] & 0x03) << 4) 239 | | ((inputBuffer[i + 1] & 0xF0) >> 4)]; 240 | outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i + 1] & 0x0F) << 2]; 241 | outputBuffer[j++] = '='; 242 | } 243 | else if (i < length) 244 | { 245 | // 246 | // Handle the double '=' case 247 | // 248 | outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2]; 249 | outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0x03) << 4]; 250 | outputBuffer[j++] = '='; 251 | outputBuffer[j++] = '='; 252 | } 253 | outputBuffer[j] = 0; 254 | 255 | // 256 | // Set the output length and return the buffer 257 | // 258 | if (outputLength) 259 | { 260 | *outputLength = j; 261 | } 262 | return outputBuffer; 263 | } 264 | 265 | @implementation NSData (Base64) 266 | 267 | // 268 | // dataFromBase64String: 269 | // 270 | // Creates an NSData object containing the base64 decoded representation of 271 | // the base64 string 'aString' 272 | // 273 | // Parameters: 274 | // aString - the base64 string to decode 275 | // 276 | // returns the autoreleased NSData representation of the base64 string 277 | // 278 | + (NSData *)dataFromBase64String:(NSString *)aString 279 | { 280 | NSData *data = [aString dataUsingEncoding:NSASCIIStringEncoding]; 281 | size_t outputLength; 282 | void *outputBuffer = NewBase64Decode([data bytes], [data length], &outputLength); 283 | NSData *result = [NSData dataWithBytes:outputBuffer length:outputLength]; 284 | free(outputBuffer); 285 | return result; 286 | } 287 | 288 | // 289 | // base64EncodedString 290 | // 291 | // Creates an NSString object that contains the base 64 encoding of the 292 | // receiver's data. Lines are broken at 64 characters long. 293 | // 294 | // returns an autoreleased NSString being the base 64 representation of the 295 | // receiver. 296 | // 297 | - (NSString *)base64EncodedString 298 | { 299 | size_t outputLength; 300 | char *outputBuffer = 301 | NewBase64Encode([self bytes], [self length], true, &outputLength); 302 | 303 | NSString *result = 304 | [[NSString alloc] 305 | initWithBytes:outputBuffer 306 | length:outputLength 307 | encoding:NSASCIIStringEncoding]; 308 | free(outputBuffer); 309 | return result; 310 | } 311 | 312 | // added by Hiroshi Hashiguchi 313 | - (NSString *)base64EncodedStringWithSeparateLines:(BOOL)separateLines 314 | { 315 | size_t outputLength; 316 | char *outputBuffer = 317 | NewBase64Encode([self bytes], [self length], separateLines, &outputLength); 318 | 319 | NSString *result = 320 | [[NSString alloc] 321 | initWithBytes:outputBuffer 322 | length:outputLength 323 | encoding:NSASCIIStringEncoding]; 324 | free(outputBuffer); 325 | return result; 326 | } 327 | 328 | 329 | @end -------------------------------------------------------------------------------- /Selenium/Selenium/SERemoteWebDriver.h: -------------------------------------------------------------------------------- 1 | // 2 | // SERemoteWebDriver.h 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/13/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SECapabilities.h" 11 | #import "SEBy.h" 12 | #import "SEWebElement.h" 13 | #import "SESession.h" 14 | #import "SEEnums.h" 15 | #import "SETouchAction.h" 16 | 17 | @class SECapabilities; 18 | @class SEBy; 19 | @class SEWebElement; 20 | @class SESession; 21 | 22 | @interface SERemoteWebDriver : NSObject 23 | 24 | @property SESession *session; 25 | @property (readonly) NSError *lastError; 26 | @property (readonly) NSArray *errors; 27 | 28 | @property (readonly) NSString *alertText; 29 | @property (readonly) NSArray *allContexts; 30 | @property (readonly) NSArray *allLogTypes; 31 | @property (readonly) NSArray *allSessions; 32 | @property (readonly) NSArray *allWindows; 33 | @property (readonly) NSDictionary *appiumSettings; 34 | @property NSString *context; 35 | @property (readonly) NSArray *cookies; 36 | @property SELocation *location; 37 | @property (readonly) SEScreenOrientation orientation; 38 | @property (readonly) NSString *pageSource; 39 | @property (readonly) IMAGE_TYPE *screenshot; 40 | @property (readonly) NSString *title; 41 | @property NSURL *url; 42 | @property NSString *window; 43 | 44 | -(id) initWithServerAddress:(NSString *)address port:(NSInteger)port; 45 | -(id) initWithServerAddress:(NSString*)address port:(NSInteger)port desiredCapabilities:(SECapabilities*)desiredCapabilities requiredCapabilities:(SECapabilities*)requiredCapabilites error:(NSError**)error; 46 | -(void)quit; 47 | -(void)quitWithError:(NSError**)error; 48 | -(SESession*) startSessionWithDesiredCapabilities:(SECapabilities*)desiredCapabilities requiredCapabilities:(SECapabilities*)requiredCapabilites; 49 | -(SESession*) startSessionWithDesiredCapabilities:(SECapabilities*)desiredCapabilities requiredCapabilities:(SECapabilities*)requiredCapabilites error:(NSError**)error; 50 | -(NSArray*) allSessions; 51 | -(NSArray*) allSessionsWithError:(NSError**)error; 52 | -(NSArray*) allContexts; 53 | -(NSArray*) allContextsWithError:(NSError**)error; 54 | -(NSString*) context; 55 | -(NSString*) contextWithError:(NSError**)error; 56 | -(void) setContext:(NSString*)context; 57 | -(void) setContext:(NSString*)context error:(NSError**)error; 58 | -(void) setTimeout:(NSInteger)timeoutInMilliseconds forType:(SETimeoutType)type; 59 | -(void) setTimeout:(NSInteger)timeoutInMilliseconds forType:(SETimeoutType)type error:(NSError**)error; 60 | -(void) setAsyncScriptTimeout:(NSInteger)timeoutInMilliseconds; 61 | -(void) setAsyncScriptTimeout:(NSInteger)timeoutInMilliseconds error:(NSError**)error; 62 | -(void) setImplicitWaitTimeout:(NSInteger)timeoutInMilliseconds; 63 | -(void) setImplicitWaitTimeout:(NSInteger)timeoutInMilliseconds error:(NSError**)error; 64 | -(NSString*) window; 65 | -(NSString*) windowWithError:(NSError**)error; 66 | -(NSArray*) allWindows; 67 | -(NSArray*) allWindowsWithError:(NSError**)error; 68 | -(NSURL*) url; 69 | -(NSURL*) urlWithError:(NSError**)error; 70 | -(void) setUrl:(NSURL*)url; 71 | -(void) setUrl:(NSURL*)url error:(NSError**)error; 72 | -(void) forward; 73 | -(void) forwardWithError:(NSError**)error; 74 | -(void) back; 75 | -(void) backWithError:(NSError**)error; 76 | -(void) refresh; 77 | -(void) refreshWithError:(NSError**)error; 78 | -(NSDictionary*) executeScript:(NSString*)script; 79 | -(NSDictionary*) executeScript:(NSString*)script arguments:(NSArray*)arguments; 80 | -(NSDictionary*) executeScript:(NSString*)script arguments:(NSArray*)arguments error:(NSError**)error; 81 | -(NSDictionary*) executeAnsynchronousScript:(NSString*)script; 82 | -(NSDictionary*) executeAnsynchronousScript:(NSString*)script arguments:(NSArray*)arguments; 83 | -(NSDictionary*) executeAnsynchronousScript:(NSString*)script arguments:(NSArray*)arguments error:(NSError**)error; 84 | -(IMAGE_TYPE*) screenshot; 85 | -(IMAGE_TYPE*) screenshotWithError:(NSError**)error; 86 | -(NSArray*) availableInputMethodEngines; 87 | -(NSArray*) availableInputMethodEnginesWithError:(NSError**)error; 88 | -(NSString*) activeInputMethodEngine; 89 | -(NSString*) activeInputMethodEngineWithError:(NSError**)error; 90 | -(BOOL) inputMethodEngineIsActive; 91 | -(BOOL) inputMethodEngineIsActiveWithError:(NSError**)error; 92 | -(void) deactivateInputMethodEngine; 93 | -(void) deactivateInputMethodEngineWithError:(NSError**)error; 94 | -(void) activateInputMethodEngine:(NSString*)engine; 95 | -(void) activateInputMethodEngine:(NSString*)engine error:(NSError**)error; 96 | -(void) setFrame:(NSString*)name; 97 | -(void) setFrame:(NSString*)name error:(NSError**)error; 98 | -(void) setWindow:(NSString*)windowHandle; 99 | -(void) setWindow:(NSString*)windowHandle error:(NSError**)error; 100 | -(void) closeWindow:(NSString*)windowHandle; 101 | -(void) closeWindow:(NSString*)windowHandle error:(NSError**)error; 102 | -(void) setWindowSize:(SIZE_TYPE)size window:(NSString*)windowHandle; 103 | -(void) setWindowSize:(SIZE_TYPE)size window:(NSString*)windowHandle error:(NSError**)error; 104 | -(SIZE_TYPE) windowSizeForWindow:(NSString*)windowHandle; 105 | -(SIZE_TYPE) windowSizeForWindow:(NSString*)windowHandle error:(NSError**)error; 106 | -(void) setWindowPosition:(POINT_TYPE)position window:(NSString*)windowHandle; 107 | -(void) setWindowPosition:(POINT_TYPE)position window:(NSString*)windowHandle error:(NSError**)error; 108 | -(POINT_TYPE) windowPositionForWindow:(NSString*)windowHandle; 109 | -(POINT_TYPE) windowPositionForWindow:(NSString*)windowHandle error:(NSError**)error; 110 | -(void) maximizeWindow:(NSString*)windowHandle; 111 | -(void) maximizeWindow:(NSString*)windowHandle error:(NSError**)error; 112 | -(NSArray*) cookies; 113 | -(NSArray*) cookiesWithError:(NSError**)error; 114 | -(void) setCookie:(NSHTTPCookie*)cookie; 115 | -(void) setCookie:(NSHTTPCookie*)cookie error:(NSError**)error; 116 | -(void) deleteCookies; 117 | -(void) deleteCookiesWithError:(NSError**)error; 118 | -(void) deleteCookie:(NSString*)cookieName; 119 | -(void) deleteCookie:(NSString*)cookieName error:(NSError**)error; 120 | -(NSString*) pageSource; 121 | -(NSString*) pageSourceWithError:(NSError**)error; 122 | -(NSString*) title; 123 | -(NSString*) titleWithError:(NSError**)error; 124 | -(SEWebElement*) findElementBy:(SEBy*)by; 125 | -(SEWebElement*) findElementBy:(SEBy*)by error:(NSError**)error; 126 | -(NSArray*) findElementsBy:(SEBy*)by; 127 | -(NSArray*) findElementsBy:(SEBy*)by error:(NSError**)error; 128 | -(SEWebElement*) activeElement; 129 | -(SEWebElement*) activeElementWithError:(NSError**)error; 130 | -(void) sendKeys:(NSString*)keyString; 131 | -(void) sendKeys:(NSString*)keyString error:(NSError**)error; 132 | -(SEScreenOrientation) orientation; 133 | -(SEScreenOrientation) orientationWithError:(NSError**)error; 134 | -(void) setOrientation:(SEScreenOrientation)orientation; 135 | -(void) setOrientation:(SEScreenOrientation)orientation error:(NSError**)error; 136 | -(NSString*)alertText; 137 | -(NSString*)alertTextWithError:(NSError**)error; 138 | -(void) setAlertText:(NSString*)text; 139 | -(void) setAlertText:(NSString*)text error:(NSError**)error; 140 | -(void) acceptAlert; 141 | -(void) acceptAlertWithError:(NSError**)error; 142 | -(void) dismissAlert; 143 | -(void) dismissAlertWithError:(NSError**)error; 144 | -(void) moveMouseWithXOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset; 145 | -(void) moveMouseToElement:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset; 146 | -(void) moveMouseToElement:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset error:(NSError**)error; 147 | -(void) clickPrimaryMouseButton; 148 | -(void) clickMouseButton:(SEMouseButton)button; 149 | -(void) clickMouseButton:(SEMouseButton)button error:(NSError**)error; 150 | -(void) mouseButtonDown:(SEMouseButton)button; 151 | -(void) mouseButtonDown:(SEMouseButton)button error:(NSError**)error; 152 | -(void) mouseButtonUp:(SEMouseButton)button; 153 | -(void) mouseButtonUp:(SEMouseButton)button error:(NSError**)error; 154 | -(void) doubleclick; 155 | -(void) doubleclickWithError:(NSError**)error; 156 | -(void) tapElement:(SEWebElement*)element; 157 | -(void) tapElement:(SEWebElement*)element error:(NSError**)error; 158 | -(void) fingerDownAt:(POINT_TYPE)point; 159 | -(void) fingerDownAt:(POINT_TYPE)point error:(NSError**)error; 160 | -(void) fingerUpAt:(POINT_TYPE)point; 161 | -(void) fingerUpAt:(POINT_TYPE)point error:(NSError**)error; 162 | -(void) moveFingerTo:(POINT_TYPE)point; 163 | -(void) moveFingerTo:(POINT_TYPE)point error:(NSError**)error; 164 | -(void) scrollfromElement:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset; 165 | -(void) scrollfromElement:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset error:(NSError**)error; 166 | -(void) scrollTo:(POINT_TYPE)position; 167 | -(void) scrollTo:(POINT_TYPE)position error:(NSError**)error; 168 | -(void) doubletapElement:(SEWebElement*)element; 169 | -(void) doubletapElement:(SEWebElement*)element error:(NSError**)error; 170 | -(void) pressElement:(SEWebElement*)element; 171 | -(void) pressElement:(SEWebElement*)element error:(NSError**)error; 172 | -(void) performTouchAction:(SETouchAction *)touchAction; 173 | -(void) performTouchAction:(SETouchAction *)touchAction error:(NSError**)error; 174 | -(void) flickfromElement:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset speed:(NSInteger)speed; 175 | -(void) flickfromElement:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset speed:(NSInteger)speed error:(NSError**)error; 176 | -(void) flickWithXSpeed:(NSInteger)xSpeed ySpeed:(NSInteger)ySpeed; 177 | -(void) flickWithXSpeed:(NSInteger)xSpeed ySpeed:(NSInteger)ySpeed error:(NSError**)error; 178 | -(SELocation*) location; 179 | -(SELocation*) locationWithError:(NSError**)error; 180 | -(void) setLocation:(SELocation*)location; 181 | -(void) setLocation:(SELocation*)location error:(NSError**)error; 182 | -(NSArray*) allLocalStorageKeys; 183 | -(NSArray*) allLocalStorageKeysWithError:(NSError**)error; 184 | -(void) setLocalStorageValue:(NSString*)value forKey:(NSString*)key; 185 | -(void) setLocalStorageValue:(NSString*)value forKey:(NSString*)key error:(NSError**)error; 186 | -(void) clearLocalStorage; 187 | -(void) clearLocalStorageWithError:(NSError**)error; 188 | -(void) localStorageItemForKey:(NSString*)key; 189 | -(void) localStorageItemForKey:(NSString*)key error:(NSError**)error; 190 | -(void) deleteLocalStorageItemForKey:(NSString*)key; 191 | -(void) deleteLocalStorageItemForKey:(NSString*)key error:(NSError**)error; 192 | -(NSInteger) countOfItemsInLocalStorage; 193 | -(NSInteger) countOfItemsInLocalStorageWithError:(NSError**)error; 194 | -(NSArray*) allSessionStorageKeys; 195 | -(NSArray*) allSessionStorageKeysWithError:(NSError**)error; 196 | -(void) setSessionStorageValue:(NSString*)value forKey:(NSString*)key; 197 | -(void) setSessionStorageValue:(NSString*)value forKey:(NSString*)key error:(NSError**)error; 198 | -(void) clearSessionStorage; 199 | -(void) clearSessionStorageWithError:(NSError**)error; 200 | -(void) sessionStorageItemForKey:(NSString*)key; 201 | -(void) sessionStorageItemForKey:(NSString*)key error:(NSError**)error; 202 | -(void) deleteStorageItemForKey:(NSString*)key; 203 | -(void) deleteStorageItemForKey:(NSString*)key error:(NSError**)error; 204 | -(NSInteger) countOfItemsInStorage; 205 | -(NSInteger) countOfItemsInStorageWithError:(NSError**)error; 206 | -(NSArray*) getLogForType:(SELogType)type; 207 | -(NSArray*) getLogForType:(SELogType)type error:(NSError**)error; 208 | -(NSArray*) allLogTypes; 209 | -(NSArray*) allLogTypesWithError:(NSError**)error; 210 | -(SEApplicationCacheStatus) applicationCacheStatus; 211 | -(SEApplicationCacheStatus) applicationCacheStatusWithError:(NSError**)error; 212 | 213 | #pragma mark - 3.0 methods 214 | ///////////////// 215 | // 3.0 METHODS // 216 | ///////////////// 217 | 218 | -(void) shakeDevice; 219 | -(void) shakeDeviceWithError:(NSError**)error; 220 | -(void) lockDeviceScreen:(NSInteger)seconds; 221 | -(void) lockDeviceScreen:(NSInteger)seconds error:(NSError**)error; 222 | -(void) unlockDeviceScreen:(NSInteger)seconds; 223 | -(void) unlockDeviceScreen:(NSInteger)seconds error:(NSError**)error; 224 | -(BOOL) isDeviceLocked; 225 | -(BOOL) isDeviceLockedWithError:(NSError**)error; 226 | -(void) pressKeycode:(NSInteger)keycode metaState:(NSInteger)metastate error:(NSError**)error; 227 | -(void) longPressKeycode:(NSInteger)keycode metaState:(NSInteger)metastate error:(NSError**)error; 228 | -(void) triggerKeyEvent:(NSInteger)keycode metaState:(NSInteger)metastate error:(NSError**)error; 229 | -(void) rotateDevice:(SEScreenOrientation)orientation; 230 | -(void) rotateDevice:(SEScreenOrientation)orientation error:(NSError**)error; 231 | -(NSString*)currentActivity; 232 | -(NSString*)currentActivityWithError:(NSError**)error; 233 | -(void)installAppAtPath:(NSString*)appPath; 234 | -(void)installAppAtPath:(NSString*)appPath error:(NSError**)error; 235 | -(void)removeApp:(NSString*)bundleId; 236 | -(void)removeApp:(NSString*)bundleId error:(NSError**)error; 237 | -(BOOL)isAppInstalled:(NSString*)bundleId; 238 | -(BOOL)isAppInstalled:(NSString*)bundleId error:(NSError**)error; 239 | -(void) hideKeyboard; 240 | -(void) hideKeyboardWithError:(NSError**)error; 241 | -(void) pushFileToPath:(NSString*)filePath data:(NSData*)data; 242 | -(void) pushFileToPath:(NSString*)filePath data:(NSData*)data error:(NSError**) error; 243 | -(NSData*) pullFileAtPath:(NSString*)filePath; 244 | -(NSData*) pullFileAtPath:(NSString*)filePath error:(NSError**) error; 245 | -(NSData*) pullFolderAtPath:(NSString*)filePath; 246 | -(NSData*) pullFolderAtPath:(NSString*)filePath error:(NSError**) error; 247 | -(void) toggleAirplaneMode; 248 | -(void) toggleAirplaneModeWithError:(NSError**)error; 249 | -(void) toggleCellularData; 250 | -(void) toggleCellularDataWithError:(NSError**)error; 251 | -(void) toggleWifi; 252 | -(void) toggleWifiWithError:(NSError**)error; 253 | -(void) toggleLocationServices; 254 | -(void) toggleLocationServicesWithError:(NSError**)error; 255 | -(void) openNotifications; 256 | -(void) openNotificationsWithError:(NSError**)error; 257 | -(void) startActivity:(NSString*)activity package:(NSString*)package; 258 | -(void) startActivity:(NSString*)activity package:(NSString*)package waitActivity:(NSString*)waitActivity waitPackage:(NSString*)waitPackage; 259 | -(void) startActivity:(NSString*)activity package:(NSString*)package waitActivity:(NSString*)waitActivity waitPackage:(NSString*)waitPackage error:(NSError**)error; 260 | -(void) launchApp; 261 | -(void) launchAppWithError:(NSError**)error; 262 | -(void) closeApp; 263 | -(void) closeAppWithError:(NSError**)error; 264 | -(void) resetApp; 265 | -(void) resetAppWithError:(NSError**)error; 266 | -(void) runAppInBackground:(NSInteger)seconds; 267 | -(void) runAppInBackground:(NSInteger)seconds error:(NSError**)error; 268 | -(void) endTestCodeCoverage; 269 | -(void) endTestCodeCoverageWithError:(NSError**)error; 270 | -(NSString*)appStrings; 271 | -(NSString*)appStringsForLanguage:(NSString*)languageCode; 272 | -(NSString*)appStringsForLanguage:(NSString*)languageCode error:(NSError**)error; 273 | -(void) setAppiumSettings:(NSDictionary*)settings; 274 | -(void) setAppiumSettings:(NSDictionary*)settings error:(NSError**)error; 275 | -(NSDictionary*) appiumSettings; 276 | -(NSDictionary*) appiumSettingsWithError:(NSError**)error; 277 | 278 | @end 279 | -------------------------------------------------------------------------------- /Selenium/Selenium/SEJsonWireClient.h: -------------------------------------------------------------------------------- 1 | // 2 | // SEJsonWireClient.h 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/19/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SESession.h" 11 | #import "SECapabilities.h" 12 | #import "SEWebElement.h" 13 | #import "SEBy.h" 14 | #import "SEEnums.h" 15 | #import "SELocation.h" 16 | 17 | @class SEBy; 18 | @class SECapabilities; 19 | @class SEStatus; 20 | @class SESession; 21 | @class SEWebElement; 22 | @class SELocation; 23 | @class SETouchAction; 24 | 25 | @interface SEJsonWireClient : NSObject 26 | 27 | @property NSError *lastError; 28 | @property NSMutableArray *errors; 29 | 30 | -(id) initWithServerAddress:(NSString*)address port:(NSInteger)port error:(NSError**)error; 31 | -(void) addError:(NSError*)error; 32 | 33 | #pragma mark - JSON-Wire Protocol Implementation 34 | 35 | // GET /status 36 | -(SEStatus*) getStatusAndReturnError:(NSError**)error; 37 | 38 | // POST /session 39 | -(SESession*) postSessionWithDesiredCapabilities:(SECapabilities*)desiredCapabilities andRequiredCapabilities:(SECapabilities*)requiredCapabilities error:(NSError**)error; 40 | 41 | // GET /sessions 42 | -(NSArray*) getSessionsAndReturnError:(NSError**)error; 43 | 44 | // GET /session/:sessionId 45 | -(SESession*) getSessionWithSession:(NSString*)sessionId error:(NSError**)error; 46 | 47 | // DELETE /session/:sessionId 48 | -(void) deleteSessionWithSession:(NSString*)sessionId error:(NSError**)error; 49 | 50 | // GET /session/:sessionid/contexts 51 | -(NSArray*) getContextsForSession:(NSString*)sessionId error:(NSError**)error; 52 | 53 | // GET /session/:sessionid/context 54 | -(NSString*) getContextForSession:(NSString*)sessionId error:(NSError**)error; 55 | 56 | // POST /session/:sessionid/context 57 | -(void) postContext:(NSString*)context session:(NSString*)sessionId error:(NSError**)error; 58 | 59 | // POST /session/:sessionId/timeouts 60 | -(void) postTimeout:(NSInteger)timeoutInMilliseconds forType:(SETimeoutType)type session:(NSString*)sessionId error:(NSError**)error; 61 | 62 | // POST /session/:sessionId/timeouts/async_script 63 | -(void) postAsyncScriptWaitTimeout:(NSInteger)timeoutInMilliseconds session:(NSString*)sessionId error:(NSError**)error; 64 | 65 | // POST /session/:sessionId/timeouts/implicit_wait 66 | -(void) postImplicitWaitTimeout:(NSInteger)timeoutInMilliseconds session:(NSString*)sessionId error:(NSError**)error; 67 | 68 | // GET /session/:sessionId/window_handle 69 | -(NSString*) getWindowHandleWithSession:(NSString*)sessionId error:(NSError**)error; 70 | 71 | // GET /session/:sessionId/window_handles 72 | -(NSArray*) getWindowHandlesWithSession:(NSString*)sessionId error:(NSError**)error; 73 | 74 | // GET /session/:sessionId/url 75 | -(NSURL*) getURLWithSession:(NSString*)sessionId error:(NSError**)error; 76 | 77 | // POST /session/:sessionId/url 78 | -(void) postURL:(NSURL*)url session:(NSString*)sessionId error:(NSError**)error; 79 | 80 | // POST /session/:sessionId/forward 81 | -(void) postForwardWithSession:(NSString*)sessionId error:(NSError**)error; 82 | 83 | // POST /session/:sessionId/back 84 | -(void) postBackWithSession:(NSString*)sessionId error:(NSError**)error; 85 | 86 | // POST /session/:sessionId/refresh 87 | -(void) postRefreshWithSession:(NSString*)sessionId error:(NSError**)error; 88 | 89 | // POST /session/:sessionId/execute 90 | -(NSDictionary*) postExecuteScript:(NSString*)script arguments:(NSArray*)arguments session:(NSString*)sessionId error:(NSError**)error; 91 | 92 | // POST /session/:sessionId/execute_async 93 | -(NSDictionary*) postExecuteAsyncScript:(NSString*)script arguments:(NSArray*)arguments session:(NSString*)sessionId error:(NSError**)error; 94 | 95 | // GET /session/:sessionId/screenshot 96 | -(IMAGE_TYPE*) getScreenshotWithSession:(NSString*)sessionId error:(NSError**)error; 97 | 98 | // GET /session/:sessionId/ime/available_engines 99 | -(NSArray*) getAvailableInputMethodEnginesWithSession:(NSString*)sessionId error:(NSError**)error; 100 | 101 | // GET /session/:sessionId/ime/active_engine 102 | -(NSString*) getActiveInputMethodEngineWithSession:(NSString*)sessionId error:(NSError**)error; 103 | 104 | // GET /session/:sessionId/ime/activated 105 | -(BOOL) getInputMethodEngineIsActivatedWithSession:(NSString*)sessionId error:(NSError**)error; 106 | 107 | // POST /session/:sessionId/ime/deactivate 108 | -(void) postDeactivateInputMethodEngineWithSession:(NSString*)sessionId error:(NSError**)error; 109 | 110 | // POST /session/:sessionId/ime/activate 111 | -(void) postActivateInputMethodEngine:(NSString*)engine session:(NSString*)sessionId error:(NSError**)error; 112 | 113 | // POST /session/:sessionId/frame 114 | -(void) postSetFrame:(id)name session:(NSString*)sessionId error:(NSError**)error; 115 | 116 | // POST /session/:sessionId/window 117 | -(void) postSetWindow:(NSString*)windowHandle session:(NSString*)sessionId error:(NSError**)error; 118 | 119 | // DELETE /session/:sessionId/window 120 | -(void) deleteWindowWithSession:(NSString*)sessionId error:(NSError**)error; 121 | 122 | // POST /session/:sessionId/window/:windowHandle/size 123 | -(void) postSetWindowSize:(SIZE_TYPE)size window:(NSString*)windowHandle session:(NSString*)sessionId error:(NSError**)error; 124 | 125 | // GET /session/:sessionId/window/:windowHandle/size 126 | -(SIZE_TYPE) getWindowSizeWithWindow:(NSString*)windowHandle session:(NSString*)sessionId error:(NSError**)error; 127 | 128 | // POST /session/:sessionId/window/:windowHandle/position 129 | -(void) postSetWindowPosition:(POINT_TYPE)position window:(NSString*)windowHandle session:(NSString*)sessionId error:(NSError**)error; 130 | 131 | // GET /session/:sessionId/window/:windowHandle/position 132 | -(POINT_TYPE) getWindowPositionWithWindow:(NSString*)windowHandle session:(NSString*)sessionId error:(NSError**)error; 133 | 134 | // POST /session/:sessionId/window/:windowHandle/maximize 135 | -(void) postMaximizeWindow:(NSString*)windowHandle session:(NSString*)sessionId error:(NSError**)error; 136 | 137 | // GET /session/:sessionId/cookie 138 | -(NSArray*) getCookiesWithSession:(NSString*)sessionId error:(NSError**)error; 139 | 140 | // POST /session/:sessionId/cookie 141 | -(void) postCookie:(NSHTTPCookie*)cookie session:(NSString*)sessionId error:(NSError**)error; 142 | 143 | // DELETE /session/:sessionId/cookie 144 | -(void) deleteCookiesWithSession:(NSString*)sessionId error:(NSError**)error; 145 | 146 | // DELETE /session/:sessionId/cookie/:name 147 | -(void) deleteCookie:(NSString*)cookieName session:(NSString*)sessionId error:(NSError**)error; 148 | 149 | // GET /session/:sessionId/source 150 | -(NSString*) getSourceWithSession:(NSString*)sessionId error:(NSError**)error; 151 | 152 | // GET /session/:sessionId/title 153 | -(NSString*) getTitleWithSession:(NSString*)sessionId error:(NSError**)error; 154 | 155 | // POST /session/:sessionId/element 156 | -(SEWebElement*) postElement:(SEBy*)locator session:(NSString*)sessionId error:(NSError**)error; 157 | 158 | // POST /session/:sessionId/elements 159 | -(NSArray*) postElements:(SEBy*)locator session:(NSString*)sessionId error:(NSError**)error; 160 | 161 | // POST /session/:sessionId/element/active 162 | -(SEWebElement*) postActiveElementWithSession:(NSString*)sessionId error:(NSError**)error; 163 | 164 | // POST /session/:sessionId/element/:id 165 | // FUTURE (NOT YET IMPLEMENTED) 166 | 167 | // POST /session/:sessionId/element/:id/element 168 | -(SEWebElement*) postElementFromElement:(SEWebElement*)element by:(SEBy*)locator session:(NSString*)sessionId error:(NSError**)error; 169 | 170 | // POST /session/:sessionId/element/:id/elements 171 | -(NSArray*) postElementsFromElement:(SEWebElement*)element by:(SEBy*)locator session:(NSString*)sessionId error:(NSError**)error; 172 | 173 | // POST /session/:sessionId/element/:id/click 174 | -(void) postClickElement:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 175 | 176 | // POST /session/:sessionId/element/:id/submit 177 | -(void) postSubmitElement:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 178 | 179 | // GET /session/:sessionId/element/:id/text 180 | -(NSString*) getElementText:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 181 | 182 | // /session/:sessionId/element/:id/value 183 | -(void) postKeys:(unichar *)keys element:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 184 | 185 | // POST /session/:sessionId/keys 186 | -(void) postKeys:(unichar *)keys session:(NSString*)sessionId error:(NSError**)error; 187 | 188 | // GET /session/:sessionId/element/:id/name 189 | -(NSString*) getElementName:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 190 | 191 | // POST /session/:sessionId/element/:id/clear 192 | -(void) postClearElement:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 193 | 194 | // GET /session/:sessionId/element/:id/selected 195 | -(BOOL) getElementIsSelected:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 196 | 197 | // GET /session/:sessionId/element/:id/enabled 198 | -(BOOL) getElementIsEnabled:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 199 | 200 | // GET /session/:sessionId/element/:id/attribute/:name 201 | -(NSString*) getAttribute:(NSString*)attributeName element:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 202 | 203 | // GET /session/:sessionId/element/:id/equals/:other 204 | -(BOOL) getEqualityForElement:(SEWebElement*)element element:(SEWebElement*)otherElement session:(NSString*)sessionId error:(NSError**)error; 205 | 206 | // GET /session/:sessionId/element/:id/displayed 207 | -(BOOL) getElementIsDisplayed:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 208 | 209 | // GET /session/:sessionId/element/:id/location 210 | -(POINT_TYPE) getElementLocation:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 211 | 212 | // GET /session/:sessionId/element/:id/location_in_view 213 | -(POINT_TYPE) getElementLocationInView:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 214 | 215 | // GET /session/:sessionId/element/:id/size 216 | -(SIZE_TYPE) getElementSize:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 217 | 218 | // GET /session/:sessionId/element/:id/css/:propertyName 219 | -(NSString*) getCSSProperty:(NSString*)propertyName element:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 220 | 221 | // GET /session/:sessionId/orientation 222 | -(SEScreenOrientation) getOrientationWithSession:(NSString*)sessionId error:(NSError**)error; 223 | 224 | // POST /session/:sessionId/orientation 225 | -(void) postOrientation:(SEScreenOrientation)orientation session:(NSString*)sessionId error:(NSError**)error; 226 | 227 | // GET /session/:sessionId/alert_text 228 | -(NSString*) getAlertTextWithSession:(NSString*)sessionId error:(NSError**)error; 229 | 230 | // POST /session/:sessionId/alert_text 231 | -(void) postAlertText:(NSString*)text session:(NSString*)sessionId error:(NSError**)error; 232 | 233 | // POST /session/:sessionId/accept_alert 234 | -(void) postAcceptAlertWithSession:(NSString*)sessionId error:(NSError**)error; 235 | 236 | // POST /session/:sessionId/dismiss_alert 237 | -(void) postDismissAlertWithSession:(NSString*)sessionId error:(NSError**)error; 238 | 239 | // POST /session/:sessionId/moveto 240 | -(void) postMoveMouseToElement:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset session:(NSString*)sessionId error:(NSError**)error; 241 | 242 | // POST /session/:sessionId/click 243 | -(void) postClickMouseButton:(SEMouseButton)button session:(NSString*)sessionId error:(NSError**)error; 244 | 245 | // POST /session/:sessionId/buttondown 246 | -(void) postMouseButtonDown:(SEMouseButton)button session:(NSString*)sessionId error:(NSError**)error; 247 | 248 | // POST /session/:sessionId/buttonup 249 | -(void) postMouseButtonUp:(SEMouseButton)button session:(NSString*)sessionId error:(NSError**)error; 250 | 251 | // POST /session/:sessionId/doubleclick 252 | -(void) postDoubleClickWithSession:(NSString*)sessionId error:(NSError**)error; 253 | 254 | // POST /session/:sessionId/touch/click 255 | -(void) postTapElement:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 256 | 257 | // POST /session/:sessionId/touch/down 258 | -(void) postFingerDownAt:(POINT_TYPE)point session:(NSString*)sessionId error:(NSError**)error; 259 | 260 | // POST /session/:sessionId/touch/up 261 | -(void) postFingerUpAt:(POINT_TYPE)point session:(NSString*)sessionId error:(NSError**)error; 262 | 263 | // POST /session/:sessionId/touch/move 264 | -(void) postMoveFingerTo:(POINT_TYPE)point session:(NSString*)sessionId error:(NSError**)error; 265 | 266 | // POST /session/:sessionId/touch/scroll 267 | -(void) postStartScrollingAtParticularLocation:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset session:(NSString*)sessionId error:(NSError**)error; 268 | 269 | // POST /session/:sessionId/touch/scroll 270 | -(void) postScrollfromAnywhereOnTheScreenWithSession:(POINT_TYPE)point session:(NSString*)sessionId error:(NSError**)error; 271 | 272 | // POST /session/:sessionId/touch/doubleclick 273 | -(void) postDoubleTapElement:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 274 | 275 | // POST /session/:sessionId/touch/longclick 276 | -(void) postPressElement:(SEWebElement*)element session:(NSString*)sessionId error:(NSError**)error; 277 | 278 | // POST /session/:sessionId/touch/perform 279 | -(void) postTouchAction:(SETouchAction *)touchAction session:(NSString*)sessionId error:(NSError**)error; 280 | 281 | // POST /session/:sessionId/touch/flick 282 | -(void) postFlickFromParticularLocation:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset speed:(NSInteger)speed session:(NSString*)sessionId error:(NSError**)error; 283 | 284 | // POST /session/:sessionId/touch/flick 285 | -(void) postFlickFromAnywhere:(NSInteger)xSpeed ySpeed:(NSInteger)ySpeed session:(NSString*)sessionId error:(NSError**)error; 286 | 287 | // GET /session/:sessionId/location 288 | -(SELocation*) getLocationAndReturnError:(NSString*)sessionId error:(NSError**)error; 289 | 290 | // POST /session/:sessionId/location 291 | -(void) postLocation:(SELocation*)location session:(NSString*)sessionId error:(NSError**)error; 292 | 293 | // GET /session/:sessionId/local_storage 294 | -(NSArray*) getAllLocalStorageKeys:(NSString*)sessionId error:(NSError**)error; 295 | 296 | //POST /session/:sessionId/local_storage 297 | -(void) postSetLocalStorageItemForKey:(NSString*)key value:(NSString*)value session:(NSString*)sessionId error:(NSError**)error; 298 | 299 | // DELETE /session/:sessionId/local_storage 300 | -(void) deleteLocalStorage:(NSString*)sessionId error:(NSError**)error; 301 | 302 | // GET /session/:sessionId/local_storage/key/:key 303 | -(void) getLocalStorageItemForKey:(NSString*)key session:(NSString*)sessionId error:(NSError**)error; 304 | 305 | //DELETE /session/:sessionId/local_storage/key/:key 306 | -(void) deleteLocalStorageItemForGivenKey:(NSString*)key session:(NSString*)sessionId error:(NSError**)error; 307 | 308 | // GET /session/:sessionId/local_storage/size 309 | -(NSInteger) getLocalStorageSize:(NSString*)sessionId error:(NSError**)error; 310 | 311 | // GET /session/:sessionId/session_storage 312 | -(NSArray*) getAllStorageKeys:(NSString*)sessionId error:(NSError**)error; 313 | 314 | //POST /session/:sessionId/session_storage 315 | -(void) postSetStorageItemForKey:(NSString*)key value:(NSString*)value session:(NSString*)sessionId error:(NSError**)error; 316 | 317 | // DELETE /session/:sessionId/session_storage 318 | -(void) deleteStorage:(NSString*)sessionId error:(NSError**)error; 319 | 320 | // GET /session/:sessionId/session_storage/key/:key 321 | -(void) getStorageItemForKey:(NSString*)key session:(NSString*)sessionId error:(NSError**)error; 322 | 323 | //DELETE /session/:sessionId/session_storage/key/:key 324 | -(void) deleteStorageItemForGivenKey:(NSString*)key session:(NSString*)sessionId error:(NSError**)error; 325 | 326 | // GET /session/:sessionId/session_storage/size 327 | -(NSInteger) getStorageSize:(NSString*) sessionId error:(NSError**) error; 328 | 329 | // POST /session/:sessionId/log 330 | -(NSArray*) getLogForGivenLogType:(SELogType)type session:(NSString*)sessionId error:(NSError**)error; 331 | 332 | // GET /session/:sessionId/log/types 333 | -(NSArray*) getLogTypes:(NSString*)sessionId error:(NSError**)error; 334 | 335 | // GET /session/:sessionId/application_cache/status 336 | -(SEApplicationCacheStatus) getApplicationCacheStatusWithSession:(NSString*)sessionId error:(NSError**)error; 337 | 338 | 339 | #pragma mark - 3.0 methods 340 | ///////////////// 341 | // 3.0 METHODS // 342 | ///////////////// 343 | 344 | // POST /wd/hub/session/:sessionId/appium/device/shake 345 | -(void) postShakeDeviceWithSession:(NSString*)sessionId error:(NSError**)error; 346 | 347 | // POST /wd/hub/session/:sessionId/appium/device/lock 348 | -(void) postLockDeviceWithSession:(NSString*)sessionId seconds:(NSInteger)seconds error:(NSError**)error; 349 | 350 | // POST /wd/hub/session/:sessionId/appium/device/unlock 351 | -(void) postUnlockDeviceWithSession:(NSString*)sessionId error:(NSError**)error; 352 | 353 | // POST /wd/hub/session/:sessionId/appium/device/is_locked 354 | -(BOOL) postIsDeviceLockedWithSession:(NSString*)sessionId error:(NSError**)error; 355 | 356 | // POST /wd/hub/session/:sessionId/appium/device/press_keycode 357 | -(void) postPressKeycode:(NSInteger)keycode metastate:(NSInteger)metaState session:(NSString*)sessionId error:(NSError**)error; 358 | 359 | // POST /wd/hub/session/:sessionId/appium/device/long_press_keycode 360 | -(void) postLongPressKeycode:(NSInteger)keycode metastate:(NSInteger)metaState session:(NSString*)sessionId error:(NSError**)error; 361 | 362 | // POST /wd/hub/session/:sessionId/appium/device/keyevent 363 | -(void) postKeyEvent:(NSInteger)keycode metastate:(NSInteger)metaState session:(NSString*)sessionId error:(NSError**)error; 364 | 365 | // POST /session/:sessionId/appium/app/rotate 366 | - (void)postRotate:(SEScreenOrientation)orientation session:(NSString*)sessionId error:(NSError **)error; 367 | 368 | // GET /wd/hub/session/:sessionId/appium/device/current_activity 369 | -(NSString*) getCurrentActivityForDeviceForSession:(NSString*)sessionId error:(NSError**)error; 370 | 371 | // POST /wd/hub/session/:sessionId/appium/device/install_app 372 | - (void)postInstallApp:(NSString*)appPath session:(NSString*)sessionId error:(NSError **)error; 373 | 374 | // POST /wd/hub/session/:sessionId/appium/device/remove_app 375 | - (void)postRemoveApp:(NSString*)appPath session:(NSString*)sessionId error:(NSError **)error; 376 | 377 | // POST /wd/hub/session/:sessionId/appium/device/app_installed 378 | -(BOOL) postIsAppInstalledWithBundleId:(NSString*)bundleId session:(NSString*)sessionId error:(NSError**)error; 379 | 380 | // POST /wd/hub/session/:sessionId/appium/device/hide_keyboard 381 | -(void) postHideKeyboardWithSession:(NSString*)sessionId error:(NSError**)error; 382 | 383 | // POST /wd/hub/session/:sessionId/appium/device/push_file 384 | - (void)postPushFileToPath:(NSString*)path data:(NSData*)data session:(NSString*)sessionId error:(NSError **)error; 385 | 386 | // POST /wd/hub/session/:sessionId/appium/device/pull_file 387 | -(NSData*) postPullFileAtPath:(NSString*)path session:(NSString*)sessionId error:(NSError**)error; 388 | 389 | // POST /wd/hub/session/:sessionId/appium/device/pull_folder 390 | -(NSData*) postPullFolderAtPath:(NSString*)path session:(NSString*)sessionId error:(NSError**)error; 391 | 392 | // POST /wd/hub/session/:sessionId/appium/device/toggle_airplane_mode 393 | -(void) postToggleAirplaneModeWithSession:(NSString*)sessionId error:(NSError**)error; 394 | 395 | // POST /wd/hub/session/:sessionId/appium/device/toggle_data 396 | -(void) postToggleDataWithSession:(NSString*)sessionId error:(NSError**)error; 397 | 398 | // POST /wd/hub/session/:sessionId/appium/device/toggle_wifi 399 | -(void) postToggleWifiWithSession:(NSString*)sessionId error:(NSError**)error; 400 | 401 | // POST /wd/hub/session/:sessionId/appium/device/toggle_location_services 402 | -(void) postToggleLocationServicesWithSession:(NSString*)sessionId error:(NSError**)error; 403 | 404 | // POST /wd/hub/session/:sessionId/appium/device/open_notifications 405 | -(void) postOpenNotificationsWithSession:(NSString*)sessionId error:(NSError**)error; 406 | 407 | // POST /wd/hub/session/:sessionId/appium/device/start_activity 408 | -(void) postStartActivity:(NSString*)activity package:(NSString*)package waitActivity:(NSString*)waitActivity waitPackage:(NSString*)waitPackage session:(NSString*)sessionId error:(NSError**)error; 409 | 410 | // POST /session/:sessionId/appium/app/launch 411 | - (void)postLaunchAppWithSession:(NSString *)sessionId error:(NSError **)error; 412 | 413 | // POST /session/:sessionId/appium/app/close 414 | - (void)postCloseAppWithSession:(NSString *)sessionId error:(NSError **)error; 415 | 416 | // POST /session/:sessionId/appium/app/reset 417 | - (void)postResetAppWithSession:(NSString *)sessionId error:(NSError **)error; 418 | 419 | // POST /session/:sessionId/appium/app/background 420 | - (void)postRunAppInBackground:(NSInteger)seconds session:(NSString *)sessionId error:(NSError **)error; 421 | 422 | // POST /wd/hub/session/:sessionId/appium/app/end_test_coverage 423 | - (void)postEndTestCoverageWithSession:(NSString *)sessionId error:(NSError **)error; 424 | 425 | // GET /wd/hub/session/:sessionId/appium/app/strings 426 | -(NSString*) getAppStringsForLanguage:(NSString*)languageCode session:(NSString*)sessionId error:(NSError**)error; 427 | 428 | // POST /wd/hub/session/:sessionId/appium/element/:elementId?/value 429 | -(void) postSetValueForElement:(SEWebElement*)element value:(NSString*)value isUnicode:(BOOL)isUnicode session:(NSString*)sessionId error:(NSError**)error; 430 | 431 | // POST /wd/hub/session/:sessionId/appium/element/:elementId?/replace_value 432 | -(void) postReplaceValueForElement:(SEWebElement*)element value:(NSString*)value isUnicode:(BOOL)isUnicode session:(NSString*)sessionId error:(NSError**)error; 433 | 434 | // POST /wd/hub/session/:sessionId/appium/settings 435 | -(void) postSetAppiumSettings:(NSDictionary*)settings session:(NSString*)sessionId error:(NSError**)error; 436 | 437 | // GET /wd/hub/session/:sessionId/appium/settings 438 | -(NSDictionary*) getAppiumSettingsWithSession:(NSString*)sessionId error:(NSError**)error; 439 | 440 | @end 441 | -------------------------------------------------------------------------------- /Selenium/Selenium/SERemoteWebDriver.m: -------------------------------------------------------------------------------- 1 | // 2 | // SERemoteWebDriver.m 3 | // Selenium 4 | // 5 | // Created by Dan Cuellar on 3/13/13. 6 | // Copyright (c) 2013 Appium. All rights reserved. 7 | // 8 | 9 | #import "SERemoteWebDriver.h" 10 | 11 | @interface SERemoteWebDriver () 12 | @property SEJsonWireClient *jsonWireClient; 13 | @end 14 | 15 | @implementation SERemoteWebDriver 16 | 17 | #pragma mark - Public Methods 18 | 19 | -(id) init 20 | { 21 | @throw [NSException exceptionWithName:NSInternalInconsistencyException 22 | reason:@"-init is not a valid initializer for the class SERemoteWebDriver" 23 | userInfo:nil]; 24 | return nil; 25 | } 26 | 27 | -(id) initWithServerAddress:(NSString *)address port:(NSInteger)port 28 | { 29 | self = [super init]; 30 | if (self) { 31 | NSError *error; 32 | [self setJsonWireClient:[[SEJsonWireClient alloc] initWithServerAddress:address port:port error:&error]]; 33 | [self addError:error]; 34 | } 35 | return self; 36 | } 37 | 38 | -(id) initWithServerAddress:(NSString*)address port:(NSInteger)port desiredCapabilities:(SECapabilities*)desiredCapabilities requiredCapabilities:(SECapabilities*)requiredCapabilites error:(NSError**)error 39 | { 40 | self = [self initWithServerAddress:address port:port]; 41 | if (self) { 42 | [self setJsonWireClient:[[SEJsonWireClient alloc] initWithServerAddress:address port:port error:error]]; 43 | [self addError:*error]; 44 | 45 | // get session 46 | [self setSession:[self startSessionWithDesiredCapabilities:desiredCapabilities requiredCapabilities:requiredCapabilites]]; 47 | if (self.session == nil) 48 | return nil; 49 | } 50 | return self; 51 | } 52 | 53 | -(void)addError:(NSError*)error 54 | { 55 | [self.jsonWireClient addError:error]; 56 | } 57 | 58 | -(NSArray*) errors { 59 | return self.jsonWireClient.errors; 60 | } 61 | 62 | -(NSError*) lastError { 63 | return self.jsonWireClient.lastError; 64 | } 65 | 66 | -(void)quit 67 | { 68 | NSError *error; 69 | [self quitWithError:&error]; 70 | [self addError:error]; 71 | } 72 | 73 | -(void)quitWithError:(NSError**)error { 74 | [self.jsonWireClient deleteSessionWithSession:self.session.sessionId error:error]; 75 | } 76 | 77 | -(SESession*) startSessionWithDesiredCapabilities:(SECapabilities*)desiredCapabilities requiredCapabilities:(SECapabilities*)requiredCapabilites 78 | { 79 | // get session 80 | NSError *error; 81 | SESession* session = [self startSessionWithDesiredCapabilities:desiredCapabilities requiredCapabilities:requiredCapabilites error:&error]; 82 | [self addError:error]; 83 | return session; 84 | } 85 | 86 | -(SESession*) startSessionWithDesiredCapabilities:(SECapabilities*)desiredCapabilities requiredCapabilities:(SECapabilities*)requiredCapabilites error:(NSError**)error 87 | { 88 | // get session 89 | [self setSession:[self.jsonWireClient postSessionWithDesiredCapabilities:desiredCapabilities andRequiredCapabilities:requiredCapabilites error:error]]; 90 | if ([*error code] != 0) 91 | return nil; 92 | return [self session]; 93 | } 94 | 95 | -(NSArray*) allSessions 96 | { 97 | NSError *error; 98 | NSArray *sessions = [self allSessionsWithError:&error]; 99 | [self addError:error]; 100 | return sessions; 101 | } 102 | 103 | -(NSArray*) allSessionsWithError:(NSError**)error { 104 | return [self.jsonWireClient getSessionsAndReturnError:error]; 105 | } 106 | 107 | -(NSArray*) allContexts { 108 | NSError *error; 109 | NSArray *contexts = [self allContextsWithError:&error]; 110 | [self addError:error]; 111 | return contexts; 112 | } 113 | 114 | -(NSArray*) allContextsWithError:(NSError**)error 115 | { 116 | return [self.jsonWireClient getContextsForSession:self.session.sessionId error:error]; 117 | } 118 | 119 | -(NSString*) context 120 | { 121 | NSError *error; 122 | NSString* context = [self contextWithError:&error]; 123 | [self addError:error]; 124 | return context; 125 | } 126 | 127 | -(NSString*) contextWithError:(NSError**)error 128 | { 129 | return [self.jsonWireClient getContextForSession:self.session.sessionId error:error]; 130 | } 131 | 132 | -(void) setContext:(NSString*)context 133 | { 134 | NSError *error; 135 | [self setContext:context error:&error]; 136 | [self addError:error]; 137 | } 138 | 139 | -(void) setContext:(NSString*)context error:(NSError**)error 140 | { 141 | [self.jsonWireClient postContext:context session:self.session.sessionId error:error]; 142 | } 143 | 144 | -(void) setTimeout:(NSInteger)timeoutInMilliseconds forType:(SETimeoutType)type 145 | { 146 | NSError *error; 147 | [self setTimeout:timeoutInMilliseconds forType:type error:&error]; 148 | [self addError:error]; 149 | } 150 | 151 | -(void) setTimeout:(NSInteger)timeoutInMilliseconds forType:(SETimeoutType)type error:(NSError**)error 152 | { 153 | 154 | [self.jsonWireClient postTimeout:timeoutInMilliseconds forType:type session:self.session.sessionId error:error]; 155 | } 156 | 157 | -(void) setAsyncScriptTimeout:(NSInteger)timeoutInMilliseconds 158 | { 159 | NSError *error; 160 | [self setAsyncScriptTimeout:timeoutInMilliseconds error:&error]; 161 | [self addError:error]; 162 | } 163 | 164 | -(void) setAsyncScriptTimeout:(NSInteger)timeoutInMilliseconds error:(NSError**)error 165 | { 166 | [self.jsonWireClient postAsyncScriptWaitTimeout:timeoutInMilliseconds session:self.session.sessionId error:error]; 167 | } 168 | 169 | -(void) setImplicitWaitTimeout:(NSInteger)timeoutInMilliseconds 170 | { 171 | NSError *error; 172 | [self setImplicitWaitTimeout:timeoutInMilliseconds error:&error]; 173 | [self addError:error]; 174 | } 175 | 176 | -(void) setImplicitWaitTimeout:(NSInteger)timeoutInMilliseconds error:(NSError**)error 177 | { 178 | [self.jsonWireClient postImplicitWaitTimeout:timeoutInMilliseconds session:self.session.sessionId error:error]; 179 | } 180 | 181 | -(NSString*) window 182 | { 183 | NSError *error; 184 | NSString* window = [self windowWithError:&error]; 185 | [self addError:error]; 186 | return window; 187 | } 188 | 189 | -(NSString*) windowWithError:(NSError**)error 190 | { 191 | return [self.jsonWireClient getWindowHandleWithSession:self.session.sessionId error:error]; 192 | } 193 | 194 | -(NSArray*) allWindows 195 | { 196 | NSError *error; 197 | NSArray * windows = [self allWindowsWithError:&error]; 198 | [self addError:error]; 199 | return windows; 200 | } 201 | 202 | -(NSArray*) allWindowsWithError:(NSError**)error 203 | { 204 | return [self.jsonWireClient getWindowHandlesWithSession:self.session.sessionId error:error]; 205 | } 206 | 207 | -(NSURL*) url 208 | { 209 | NSError *error; 210 | NSURL *url = [self urlWithError:&error]; 211 | return url; 212 | } 213 | 214 | -(NSURL*) urlWithError:(NSError**)error 215 | { 216 | return [self.jsonWireClient getURLWithSession:self.session.sessionId error:error]; 217 | } 218 | 219 | -(void) setUrl:(NSURL*)url 220 | { 221 | NSError *error; 222 | [self setUrl:url error:&error]; 223 | [self addError:error]; 224 | } 225 | 226 | -(void) setUrl:(NSURL*)url error:(NSError**)error 227 | { 228 | [self.jsonWireClient postURL:url session:self.session.sessionId error:error]; 229 | 230 | } 231 | 232 | -(void) forward 233 | { 234 | NSError *error; 235 | [self forwardWithError:&error]; 236 | [self addError:error]; 237 | } 238 | 239 | -(void) forwardWithError:(NSError**)error 240 | { 241 | [self.jsonWireClient postForwardWithSession:self.session.sessionId error:error]; 242 | } 243 | 244 | -(void) back 245 | { 246 | NSError *error; 247 | [self backWithError:&error]; 248 | [self addError:error]; 249 | } 250 | 251 | -(void) backWithError:(NSError**)error 252 | { 253 | [self.jsonWireClient postBackWithSession:self.session.sessionId error:error]; 254 | } 255 | 256 | -(void) refresh 257 | { 258 | NSError *error; 259 | [self refreshWithError:&error]; 260 | [self addError:error]; 261 | } 262 | 263 | -(void) refreshWithError:(NSError**)error 264 | { 265 | [self.jsonWireClient postRefreshWithSession:self.session.sessionId error:error]; 266 | } 267 | 268 | -(NSDictionary*) executeScript:(NSString*)script 269 | { 270 | return [self executeScript:script arguments:nil]; 271 | } 272 | 273 | -(NSDictionary*) executeScript:(NSString*)script arguments:(NSArray*)arguments 274 | { 275 | NSError *error; 276 | NSDictionary *output = [self executeScript:script arguments:arguments error:&error]; 277 | [self addError:error]; 278 | return output; 279 | } 280 | 281 | -(NSDictionary*) executeScript:(NSString*)script arguments:(NSArray*)arguments error:(NSError**)error 282 | { 283 | return [self.jsonWireClient postExecuteScript:script arguments:arguments session:self.session.sessionId error:error]; 284 | } 285 | 286 | -(NSDictionary*) executeAnsynchronousScript:(NSString*)script 287 | { 288 | return [self executeAnsynchronousScript:script arguments:nil]; 289 | } 290 | 291 | -(NSDictionary*) executeAnsynchronousScript:(NSString*)script arguments:(NSArray*)arguments 292 | { 293 | NSError *error; 294 | NSDictionary *output = [self executeAnsynchronousScript:script arguments:arguments error:&error]; 295 | [self addError:error]; 296 | return output; 297 | } 298 | 299 | -(NSDictionary*) executeAnsynchronousScript:(NSString*)script arguments:(NSArray*)arguments error:(NSError**)error 300 | { 301 | 302 | return [self.jsonWireClient postExecuteAsyncScript:script arguments:arguments session:self.session.sessionId error:error]; 303 | } 304 | 305 | -(IMAGE_TYPE*) screenshot 306 | { 307 | NSError *error; 308 | IMAGE_TYPE *image = [self screenshotWithError:&error]; 309 | return image; 310 | } 311 | 312 | -(IMAGE_TYPE*) screenshotWithError:(NSError**)error 313 | { 314 | return [self.jsonWireClient getScreenshotWithSession:self.session.sessionId error:error]; 315 | } 316 | 317 | -(NSArray*) availableInputMethodEngines 318 | { 319 | NSError *error; 320 | NSArray *engines = [self availableInputMethodEnginesWithError:&error]; 321 | [self addError:error]; 322 | return engines; 323 | } 324 | 325 | -(NSArray*) availableInputMethodEnginesWithError:(NSError**)error 326 | { 327 | 328 | return[self.jsonWireClient getAvailableInputMethodEnginesWithSession:self.session.sessionId error:error]; 329 | } 330 | 331 | -(NSString*) activeInputMethodEngine 332 | { 333 | NSError *error; 334 | NSString *engine = [self activeInputMethodEngineWithError:&error]; 335 | [self addError:error]; 336 | return engine; 337 | } 338 | 339 | -(NSString*) activeInputMethodEngineWithError:(NSError**)error 340 | { 341 | return [self.jsonWireClient getActiveInputMethodEngineWithSession:self.session.sessionId error:error]; 342 | } 343 | 344 | -(BOOL) inputMethodEngineIsActive 345 | { 346 | NSError *error; 347 | BOOL isActive = [self inputMethodEngineIsActiveWithError:&error]; 348 | [self addError:error]; 349 | return isActive; 350 | } 351 | 352 | -(BOOL) inputMethodEngineIsActiveWithError:(NSError**)error 353 | { 354 | return [self.jsonWireClient getInputMethodEngineIsActivatedWithSession:self.session.sessionId error:error]; 355 | } 356 | 357 | -(void) deactivateInputMethodEngine 358 | { 359 | NSError *error; 360 | [self deactivateInputMethodEngineWithError:&error]; 361 | [self addError:error]; 362 | } 363 | 364 | -(void) deactivateInputMethodEngineWithError:(NSError**)error 365 | { 366 | [self.jsonWireClient postDeactivateInputMethodEngineWithSession:self.session.sessionId error:error]; 367 | } 368 | 369 | -(void) activateInputMethodEngine:(NSString*)engine 370 | { 371 | NSError *error; 372 | [self activateInputMethodEngine:engine error:&error]; 373 | [self addError:error]; 374 | } 375 | 376 | -(void) activateInputMethodEngine:(NSString*)engine error:(NSError**)error 377 | { 378 | [self.jsonWireClient postActivateInputMethodEngine:engine session:self.session.sessionId error:error]; 379 | } 380 | 381 | -(void) setFrame:(NSString*)name 382 | { 383 | NSError* error; 384 | [self setFrame:name error:&error]; 385 | [self addError:error]; 386 | } 387 | 388 | -(void) setFrame:(NSString*)name error:(NSError**)error 389 | { 390 | [self.jsonWireClient postSetFrame:name session:self.session.sessionId error:error]; 391 | } 392 | 393 | -(void) setWindow:(NSString*)windowHandle 394 | { 395 | NSError* error; 396 | [self setWindow:windowHandle error:&error]; 397 | [self addError:error]; 398 | } 399 | 400 | -(void) setWindow:(NSString*)windowHandle error:(NSError**)error 401 | { 402 | [self.jsonWireClient postSetWindow:windowHandle session:self.session.sessionId error:error]; 403 | } 404 | 405 | -(void) closeWindow:(NSString*)windowHandle 406 | { 407 | NSError* error; 408 | [self closeWindow:windowHandle error:&error]; 409 | [self addError:error]; 410 | } 411 | 412 | -(void) closeWindow:(NSString*)windowHandle error:(NSError**)error 413 | { 414 | [self.jsonWireClient deleteWindowWithSession:self.session.sessionId error:error]; 415 | } 416 | 417 | -(void) setWindowSize:(SIZE_TYPE)size window:(NSString*)windowHandle 418 | { 419 | NSError *error; 420 | [self setWindowSize:size window:windowHandle error:&error]; 421 | [self addError:error]; 422 | } 423 | 424 | -(void) setWindowSize:(SIZE_TYPE)size window:(NSString*)windowHandle error:(NSError**)error 425 | { 426 | [self.jsonWireClient postSetWindowSize:size window:windowHandle session:self.session.sessionId error:error]; 427 | } 428 | 429 | -(SIZE_TYPE) windowSizeForWindow:(NSString*)windowHandle 430 | { 431 | NSError *error; 432 | SIZE_TYPE size = [self windowSizeForWindow:windowHandle error:&error]; 433 | [self addError:error]; 434 | return size; 435 | } 436 | 437 | -(SIZE_TYPE) windowSizeForWindow:(NSString*)windowHandle error:(NSError**)error 438 | { 439 | return [self.jsonWireClient getWindowSizeWithWindow:windowHandle session:self.session.sessionId error:error]; 440 | } 441 | 442 | -(void) setWindowPosition:(POINT_TYPE)position window:(NSString*)windowHandle 443 | { 444 | NSError *error; 445 | [self setWindowPosition:position window:windowHandle error:&error]; 446 | [self addError:error]; 447 | } 448 | 449 | -(void) setWindowPosition:(POINT_TYPE)position window:(NSString*)windowHandle error:(NSError**)error 450 | { 451 | [self.jsonWireClient postSetWindowPosition:position window:windowHandle session:self.session.sessionId error:error]; 452 | } 453 | 454 | -(POINT_TYPE) windowPositionForWindow:(NSString*)windowHandle 455 | { 456 | NSError *error; 457 | POINT_TYPE position = [self windowPositionForWindow:windowHandle error:&error]; 458 | [self addError:error]; 459 | return position; 460 | } 461 | 462 | -(POINT_TYPE) windowPositionForWindow:(NSString*)windowHandle error:(NSError**)error 463 | { 464 | return [self.jsonWireClient getWindowPositionWithWindow:windowHandle session:self.session.sessionId error:error]; 465 | } 466 | 467 | -(void) maximizeWindow:(NSString*)windowHandle 468 | { 469 | NSError *error; 470 | [self maximizeWindow:windowHandle error:&error]; 471 | [self addError:error]; 472 | } 473 | 474 | -(void) maximizeWindow:(NSString*)windowHandle error:(NSError**)error 475 | { 476 | [self.jsonWireClient postMaximizeWindow:windowHandle session:self.session.sessionId error:error]; 477 | } 478 | 479 | -(NSArray*) cookies 480 | { 481 | NSError *error; 482 | NSArray *cookies = [self cookiesWithError:&error]; 483 | [self addError:error]; 484 | return cookies; 485 | } 486 | 487 | -(NSArray*) cookiesWithError:(NSError**)error 488 | { 489 | return [self.jsonWireClient getCookiesWithSession:self.session.sessionId error:error]; 490 | } 491 | 492 | -(void) setCookie:(NSHTTPCookie*)cookie 493 | { 494 | NSError *error; 495 | [self setCookie:cookie error:&error]; 496 | [self addError:error]; 497 | } 498 | 499 | -(void) setCookie:(NSHTTPCookie*)cookie error:(NSError**)error 500 | { 501 | [self.jsonWireClient postCookie:cookie session:self.session.sessionId error:error]; 502 | } 503 | 504 | -(void) deleteCookies 505 | { 506 | NSError *error; 507 | [self deleteCookiesWithError:&error]; 508 | [self addError:error]; 509 | } 510 | 511 | -(void) deleteCookiesWithError:(NSError**)error 512 | { 513 | [self.jsonWireClient deleteCookiesWithSession:self.session.sessionId error:error]; 514 | } 515 | 516 | -(void) deleteCookie:(NSString*)cookieName 517 | { 518 | NSError *error; 519 | [self deleteCookie:cookieName error:&error]; 520 | [self addError:error]; 521 | } 522 | 523 | -(void) deleteCookie:(NSString*)cookieName error:(NSError**)error 524 | { 525 | [self.jsonWireClient deleteCookie:cookieName session:self.session.sessionId error:error]; 526 | } 527 | 528 | -(NSString*) pageSource 529 | { 530 | NSError *error; 531 | NSString *source = [self pageSourceWithError:&error]; 532 | [self addError:error]; 533 | return source; 534 | } 535 | 536 | -(NSString*) pageSourceWithError:(NSError**)error 537 | { 538 | return [self.jsonWireClient getSourceWithSession:self.session.sessionId error:error]; 539 | } 540 | 541 | -(NSString*) title 542 | { 543 | NSError *error; 544 | NSString *title = [self titleWithError:&error]; 545 | return title; 546 | } 547 | 548 | -(NSString*) titleWithError:(NSError**)error 549 | { 550 | return [self.jsonWireClient getTitleWithSession:self.session.sessionId error:error]; 551 | } 552 | 553 | -(SEWebElement*) findElementBy:(SEBy*)by 554 | { 555 | NSError *error; 556 | SEWebElement *element = [self findElementBy:by error:&error]; 557 | [self addError:error]; 558 | return element; 559 | } 560 | 561 | -(SEWebElement*) findElementBy:(SEBy*)by error:(NSError**)error 562 | { 563 | SEWebElement *element = [self.jsonWireClient postElement:by session:self.session.sessionId error:error]; 564 | return element != nil && element.opaqueId != nil ? element : nil; 565 | } 566 | 567 | -(NSArray*) findElementsBy:(SEBy*)by 568 | { 569 | NSError *error; 570 | NSArray *elements = [self findElementsBy:by error:&error]; 571 | [self addError:error]; 572 | return elements; 573 | } 574 | 575 | -(NSArray*) findElementsBy:(SEBy*)by error:(NSError**)error 576 | { 577 | NSArray *elements = [self.jsonWireClient postElements:by session:self.session.sessionId error:error]; 578 | if (elements == nil || elements.count < 1) { 579 | return [NSArray new]; 580 | } 581 | SEWebElement *element = [elements objectAtIndex:0]; 582 | if (element == nil || element.opaqueId == nil) { 583 | return [NSArray new]; 584 | } 585 | return elements; 586 | } 587 | 588 | -(SEWebElement*) activeElement 589 | { 590 | NSError *error; 591 | SEWebElement *element = [self activeElementWithError:&error]; 592 | [self addError:error]; 593 | return element; 594 | } 595 | 596 | -(SEWebElement*) activeElementWithError:(NSError**)error 597 | { 598 | return [self.jsonWireClient postActiveElementWithSession:self.session.sessionId error:error]; 599 | } 600 | 601 | -(void) sendKeys:(NSString*)keyString 602 | { 603 | NSError *error; 604 | [self sendKeys:keyString error:&error]; 605 | [self addError:error]; 606 | } 607 | 608 | -(void) sendKeys:(NSString*)keyString error:(NSError**)error 609 | { 610 | unichar keys[keyString.length+1]; 611 | for(int i=0; i < keyString.length; i++) 612 | keys[i] = [keyString characterAtIndex:i]; 613 | keys[keyString.length] = '\0'; 614 | [self.jsonWireClient postKeys:keys session:self.session.sessionId error:error]; 615 | } 616 | 617 | -(SEScreenOrientation) orientation 618 | { 619 | NSError *error; 620 | SEScreenOrientation orientation = [self orientationWithError:&error]; 621 | [self addError:error]; 622 | return orientation; 623 | } 624 | 625 | -(SEScreenOrientation) orientationWithError:(NSError**)error 626 | { 627 | return [self.jsonWireClient getOrientationWithSession:self.session.sessionId error:error]; 628 | } 629 | 630 | -(void) setOrientation:(SEScreenOrientation)orientation 631 | { 632 | NSError* error; 633 | [self setOrientation:orientation error:&error]; 634 | [self addError:error]; 635 | } 636 | 637 | -(void) setOrientation:(SEScreenOrientation)orientation error:(NSError**)error 638 | { 639 | [self.jsonWireClient postOrientation:orientation session:self.session.sessionId error:error]; 640 | } 641 | 642 | -(NSString*)alertText 643 | { 644 | NSError *error; 645 | NSString *alertText = [self alertTextWithError:&error]; 646 | [self addError:error]; 647 | return alertText; 648 | } 649 | 650 | -(NSString*)alertTextWithError:(NSError**)error 651 | { 652 | return [self.jsonWireClient getAlertTextWithSession:self.session.sessionId error:error]; 653 | } 654 | 655 | -(void) setAlertText:(NSString*)text 656 | { 657 | NSError* error; 658 | [self setAlertText:text error:&error]; 659 | [self addError:error]; 660 | } 661 | 662 | -(void) setAlertText:(NSString*)text error:(NSError**)error 663 | { 664 | [self.jsonWireClient postAlertText:text session:self.session.sessionId error:error]; 665 | } 666 | 667 | -(void) acceptAlert 668 | { 669 | NSError *error; 670 | [self acceptAlertWithError:&error]; 671 | [self addError:error]; 672 | } 673 | 674 | -(void) acceptAlertWithError:(NSError**)error 675 | { 676 | [self.jsonWireClient postAcceptAlertWithSession:self.session.sessionId error:error]; 677 | } 678 | 679 | -(void) dismissAlert 680 | { 681 | NSError *error; 682 | [self dismissAlertWithError:&error]; 683 | [self addError:error]; 684 | } 685 | 686 | -(void) dismissAlertWithError:(NSError**)error 687 | { 688 | [self.jsonWireClient postDismissAlertWithSession:self.session.sessionId error:error]; 689 | } 690 | 691 | -(void) moveMouseWithXOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset 692 | { 693 | [self moveMouseToElement:nil xOffset:xOffset yOffset:yOffset]; 694 | } 695 | 696 | -(void) moveMouseToElement:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset 697 | { 698 | NSError *error; 699 | [self moveMouseToElement:element xOffset:xOffset yOffset:yOffset error:&error]; 700 | [self addError:error]; 701 | } 702 | 703 | -(void) moveMouseToElement:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset 704 | error:(NSError**)error { 705 | [self.jsonWireClient postMoveMouseToElement:element xOffset:xOffset yOffset:yOffset session:self.session.sessionId error:error]; 706 | } 707 | 708 | -(void) clickPrimaryMouseButton 709 | { 710 | [self clickMouseButton:SELENIUM_MOUSE_LEFT_BUTTON]; 711 | } 712 | 713 | -(void) clickMouseButton:(SEMouseButton)button 714 | { 715 | NSError *error; 716 | [self clickMouseButton:button error:&error]; 717 | [self addError:error]; 718 | } 719 | 720 | -(void) clickMouseButton:(SEMouseButton)button error:(NSError**)error 721 | { 722 | [self.jsonWireClient postClickMouseButton:button session:self.session.sessionId error:error]; 723 | } 724 | 725 | -(void) mouseButtonDown:(SEMouseButton)button 726 | { 727 | NSError *error; 728 | [self mouseButtonDown:button error:&error]; 729 | [self addError:error]; 730 | } 731 | 732 | -(void) mouseButtonDown:(SEMouseButton)button error:(NSError**)error 733 | { 734 | [self.jsonWireClient postMouseButtonDown:button session:self.session.sessionId error:error]; 735 | } 736 | 737 | -(void) mouseButtonUp:(SEMouseButton)button 738 | { 739 | NSError *error; 740 | [self mouseButtonUp:button error:&error]; 741 | [self addError:error]; 742 | } 743 | 744 | -(void) mouseButtonUp:(SEMouseButton)button error:(NSError**)error 745 | { 746 | [self.jsonWireClient postMouseButtonUp:button session:self.session.sessionId error:error]; 747 | } 748 | 749 | -(void) doubleclick 750 | { 751 | NSError *error; 752 | [self doubleclickWithError:&error]; 753 | [self addError:error]; 754 | } 755 | 756 | -(void) doubleclickWithError:(NSError**)error 757 | { 758 | [self.jsonWireClient postDoubleClickWithSession:self.session.sessionId error:error]; 759 | } 760 | 761 | -(void) tapElement:(SEWebElement*)element 762 | { 763 | NSError *error; 764 | [self tapElement:element error:&error]; 765 | [self addError:error]; 766 | } 767 | 768 | -(void) tapElement:(SEWebElement*)element error:(NSError**)error 769 | { 770 | [self.jsonWireClient postTapElement:element session:self.session.sessionId error:error]; 771 | } 772 | 773 | -(void) fingerDownAt:(POINT_TYPE)point 774 | { 775 | NSError *error; 776 | [self fingerDownAt:point error:&error]; 777 | [self addError:error]; 778 | } 779 | 780 | -(void) fingerDownAt:(POINT_TYPE)point error:(NSError**)error 781 | { 782 | [self.jsonWireClient postFingerDownAt:point session:self.session.sessionId error:error]; 783 | } 784 | 785 | -(void) fingerUpAt:(POINT_TYPE)point 786 | { 787 | NSError *error; 788 | [self fingerUpAt:point error:&error]; 789 | [self addError:error]; 790 | } 791 | 792 | -(void) fingerUpAt:(POINT_TYPE)point error:(NSError**)error 793 | { 794 | [self.jsonWireClient postFingerUpAt:point session:self.session.sessionId error:error]; 795 | } 796 | 797 | -(void) moveFingerTo:(POINT_TYPE)point 798 | { 799 | NSError *error; 800 | [self moveFingerTo:point error:&error]; 801 | [self addError:error]; 802 | } 803 | 804 | -(void) moveFingerTo:(POINT_TYPE)point error:(NSError**)error 805 | { 806 | [self.jsonWireClient postMoveFingerTo:point session:self.session.sessionId error:error]; 807 | } 808 | 809 | -(void) scrollfromElement:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset 810 | { 811 | NSError *error; 812 | [self scrollfromElement:element xOffset:xOffset yOffset:yOffset error:&error]; 813 | [self addError:error]; 814 | } 815 | 816 | -(void) scrollfromElement:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset error:(NSError**)error 817 | { 818 | [self.jsonWireClient postStartScrollingAtParticularLocation:element xOffset:xOffset yOffset:yOffset session:self.session.sessionId error:error]; 819 | } 820 | 821 | -(void) scrollTo:(POINT_TYPE)position 822 | { 823 | NSError *error; 824 | [self scrollTo:position error:&error]; 825 | [self addError:error]; 826 | } 827 | 828 | -(void) scrollTo:(POINT_TYPE)position error:(NSError**)error 829 | { 830 | [self.jsonWireClient postScrollfromAnywhereOnTheScreenWithSession:position session:self.session.sessionId error:error]; 831 | } 832 | 833 | -(void) doubletapElement:(SEWebElement*)element 834 | { 835 | NSError *error; 836 | [self doubletapElement:element error:&error]; 837 | [self addError:error]; 838 | } 839 | 840 | -(void) doubletapElement:(SEWebElement*)element error:(NSError**)error 841 | { 842 | [self.jsonWireClient postDoubleTapElement:element session:self.session.sessionId error:error]; 843 | } 844 | 845 | -(void) pressElement:(SEWebElement*)element 846 | { 847 | NSError *error; 848 | [self pressElement:element error:&error]; 849 | [self addError:error]; 850 | } 851 | 852 | -(void) pressElement:(SEWebElement*)element error:(NSError**)error 853 | { 854 | [self.jsonWireClient postPressElement:element session:self.session.sessionId error:error]; 855 | } 856 | 857 | -(void) performTouchAction:(SETouchAction *)touchAction 858 | { 859 | NSError *error; 860 | [self performTouchAction:touchAction error:&error]; 861 | [self addError:error]; 862 | } 863 | 864 | - (void) performTouchAction:(SETouchAction *)touchAction error:(NSError **)error { 865 | [self.jsonWireClient postTouchAction:touchAction session:self.session.sessionId error:error]; 866 | } 867 | 868 | 869 | -(void) flickfromElement:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset speed:(NSInteger)speed 870 | { 871 | NSError *error; 872 | [self flickfromElement:element xOffset:xOffset yOffset:yOffset speed:speed error:&error]; 873 | [self addError:error]; 874 | } 875 | 876 | -(void) flickfromElement:(SEWebElement*)element xOffset:(NSInteger)xOffset yOffset:(NSInteger)yOffset speed:(NSInteger)speed error:(NSError**)error 877 | { 878 | [self.jsonWireClient postFlickFromParticularLocation:element xOffset:xOffset yOffset:yOffset speed:speed session:self.session.sessionId error:error]; 879 | } 880 | 881 | -(void) flickWithXSpeed:(NSInteger)xSpeed ySpeed:(NSInteger)ySpeed 882 | { 883 | NSError *error; 884 | [self flickWithXSpeed:xSpeed ySpeed:ySpeed error:&error]; 885 | [self addError:error]; 886 | } 887 | 888 | -(void) flickWithXSpeed:(NSInteger)xSpeed ySpeed:(NSInteger)ySpeed error:(NSError**)error 889 | { 890 | [self.jsonWireClient postFlickFromAnywhere:xSpeed ySpeed:ySpeed session:self.session.sessionId error:error]; 891 | } 892 | 893 | -(SELocation*) location 894 | { 895 | NSError *error; 896 | SELocation *location = [self locationWithError:&error]; 897 | [self addError:error]; 898 | return location; 899 | } 900 | 901 | -(SELocation*) locationWithError:(NSError**)error 902 | { 903 | return [self.jsonWireClient getLocationAndReturnError:self.session.sessionId error:error]; 904 | } 905 | 906 | -(void) setLocation:(SELocation*)location 907 | { 908 | NSError *error; 909 | [self setLocation:location error:&error]; 910 | [self addError:error]; 911 | } 912 | 913 | -(void) setLocation:(SELocation*)location error:(NSError**)error 914 | { 915 | [self.jsonWireClient postLocation:location session:self.session.sessionId error:error]; 916 | } 917 | 918 | -(NSArray*) allLocalStorageKeys 919 | { 920 | NSError *error; 921 | NSArray *allLocalStorageKeys = [self allLocalStorageKeysWithError:&error]; 922 | [self addError:error]; 923 | return allLocalStorageKeys; 924 | 925 | } 926 | 927 | -(NSArray*) allLocalStorageKeysWithError:(NSError**)error 928 | { 929 | return [self.jsonWireClient getAllLocalStorageKeys:self.session.sessionId error:error]; 930 | } 931 | 932 | -(void) setLocalStorageValue:(NSString*)value forKey:(NSString*)key 933 | { 934 | NSError *error; 935 | [self setLocalStorageValue:value forKey:key error:&error]; 936 | [self addError:error]; 937 | } 938 | 939 | -(void) setLocalStorageValue:(NSString*)value forKey:(NSString*)key error:(NSError**)error 940 | { 941 | [self.jsonWireClient postSetLocalStorageItemForKey:key value:value session:self.session.sessionId error:error]; 942 | } 943 | 944 | -(void) clearLocalStorage 945 | { 946 | NSError *error; 947 | [self clearLocalStorageWithError:&error]; 948 | [self addError:error]; 949 | } 950 | 951 | -(void) clearLocalStorageWithError:(NSError**)error 952 | { 953 | [self.jsonWireClient deleteLocalStorage:self.session.sessionId error:error]; 954 | } 955 | 956 | -(void) localStorageItemForKey:(NSString*)key 957 | { 958 | NSError *error; 959 | [self localStorageItemForKey:key error:&error]; 960 | [self addError:error]; 961 | } 962 | 963 | -(void) localStorageItemForKey:(NSString*)key error:(NSError**)error 964 | { 965 | [self.jsonWireClient getLocalStorageItemForKey:key session:self.session.sessionId error:error]; 966 | } 967 | 968 | -(void) deleteLocalStorageItemForKey:(NSString*)key 969 | { 970 | NSError *error; 971 | [self deleteLocalStorageItemForKey:key error:&error]; 972 | [self addError:error]; 973 | } 974 | 975 | -(void) deleteLocalStorageItemForKey:(NSString*)key error:(NSError**)error 976 | { 977 | [self.jsonWireClient deleteLocalStorageItemForGivenKey:key session:self.session.sessionId error:error]; 978 | } 979 | 980 | -(NSInteger) countOfItemsInLocalStorage 981 | { 982 | NSError *error; 983 | NSInteger numItems = [self countOfItemsInLocalStorageWithError:&error]; 984 | [self addError:error]; 985 | return numItems; 986 | } 987 | 988 | -(NSInteger) countOfItemsInLocalStorageWithError:(NSError**)error 989 | { 990 | return [self.jsonWireClient getLocalStorageSize:self.session.sessionId error:error]; 991 | } 992 | 993 | -(NSArray*) allSessionStorageKeys 994 | { 995 | NSError *error; 996 | NSArray *allStorageKeys = [self allLocalStorageKeysWithError:&error]; 997 | return allStorageKeys; 998 | } 999 | 1000 | -(NSArray*) allSessionStorageKeysWithError:(NSError**)error 1001 | { 1002 | return [self.jsonWireClient getAllStorageKeys:self.session.sessionId error:error]; 1003 | } 1004 | 1005 | -(void) setSessionStorageValue:(NSString*)value forKey:(NSString*)key 1006 | { 1007 | NSError *error; 1008 | [self setSessionStorageValue:value forKey:key error:&error]; 1009 | [self addError:error]; 1010 | } 1011 | 1012 | -(void) setSessionStorageValue:(NSString*)value forKey:(NSString*)key error:(NSError**)error 1013 | { 1014 | [self.jsonWireClient postSetStorageItemForKey:key value:value session:self.session.sessionId error:error]; 1015 | } 1016 | 1017 | -(void) clearSessionStorage 1018 | { 1019 | NSError *error; 1020 | [self clearSessionStorageWithError:&error]; 1021 | [self addError:error]; 1022 | } 1023 | 1024 | -(void) clearSessionStorageWithError:(NSError**)error 1025 | { 1026 | [self.jsonWireClient deleteStorage:self.session.sessionId error:error]; 1027 | } 1028 | 1029 | -(void) sessionStorageItemForKey:(NSString*)key 1030 | { 1031 | NSError *error; 1032 | [self sessionStorageItemForKey:key error:&error]; 1033 | [self addError:error]; 1034 | } 1035 | 1036 | -(void) sessionStorageItemForKey:(NSString*)key error:(NSError**)error 1037 | { 1038 | [self.jsonWireClient getStorageItemForKey:key session:self.session.sessionId error:error]; 1039 | } 1040 | 1041 | -(void) deleteStorageItemForKey:(NSString*)key 1042 | { 1043 | NSError *error; 1044 | [self deleteStorageItemForKey:key error:&error]; 1045 | [self addError:error]; 1046 | } 1047 | 1048 | -(void) deleteStorageItemForKey:(NSString*)key error:(NSError**)error 1049 | { 1050 | [self.jsonWireClient deleteStorageItemForGivenKey:key session:self.session.sessionId error:error]; 1051 | } 1052 | 1053 | -(NSInteger) countOfItemsInStorage 1054 | { 1055 | NSError *error; 1056 | NSInteger numItems = [self countOfItemsInStorageWithError:&error]; 1057 | [self addError:error]; 1058 | return numItems; 1059 | } 1060 | 1061 | -(NSInteger) countOfItemsInStorageWithError:(NSError**)error 1062 | { 1063 | return [self.jsonWireClient getStorageSize:self.session.sessionId error:error]; 1064 | } 1065 | 1066 | -(NSArray*) getLogForType:(SELogType)type 1067 | { 1068 | NSError *error; 1069 | NSArray *logsForType = [self getLogForType:type error:&error]; 1070 | [self addError:error]; 1071 | return logsForType; 1072 | } 1073 | 1074 | -(NSArray*) getLogForType:(SELogType)type error:(NSError**)error 1075 | { 1076 | return [self.jsonWireClient getLogForGivenLogType:type session:self.session.sessionId error:error]; 1077 | } 1078 | 1079 | -(NSArray*) allLogTypes 1080 | { 1081 | NSError *error; 1082 | NSArray *logTypes = [self allLogTypesWithError:&error]; 1083 | [self addError:error]; 1084 | return logTypes; 1085 | } 1086 | 1087 | -(NSArray*) allLogTypesWithError:(NSError**)error 1088 | { 1089 | return [self.jsonWireClient getLogTypes:self.session.sessionId error:error]; 1090 | } 1091 | 1092 | -(SEApplicationCacheStatus) applicationCacheStatus 1093 | { 1094 | NSError* error; 1095 | SEApplicationCacheStatus status = [self applicationCacheStatusWithError:&error]; 1096 | [self addError:error]; 1097 | return status; 1098 | } 1099 | 1100 | -(SEApplicationCacheStatus) applicationCacheStatusWithError:(NSError**)error 1101 | { 1102 | return [self.jsonWireClient getApplicationCacheStatusWithSession:self.session.sessionId error:error]; 1103 | } 1104 | 1105 | 1106 | #pragma mark - 3.0 methods 1107 | ///////////////// 1108 | // 3.0 METHODS // 1109 | ///////////////// 1110 | 1111 | -(void) shakeDevice { 1112 | NSError *error; 1113 | [self shakeDeviceWithError:&error]; 1114 | [self addError:error]; 1115 | } 1116 | 1117 | -(void) shakeDeviceWithError:(NSError**)error { 1118 | [self.jsonWireClient postShakeDeviceWithSession:self.session.sessionId error:error]; 1119 | } 1120 | 1121 | -(void) lockDeviceScreen:(NSInteger)seconds { 1122 | NSError *error; 1123 | [self lockDeviceScreen:seconds error:&error]; 1124 | [self addError:error]; 1125 | } 1126 | 1127 | -(void) lockDeviceScreen:(NSInteger)seconds error:(NSError**)error { 1128 | [self.jsonWireClient postLockDeviceWithSession:self.session.sessionId seconds:seconds error:error]; 1129 | } 1130 | 1131 | -(void) unlockDeviceScreen:(NSInteger)seconds { 1132 | NSError *error; 1133 | [self unlockDeviceScreen:seconds error:&error]; 1134 | [self addError:error]; 1135 | } 1136 | 1137 | -(void) unlockDeviceScreen:(NSInteger)seconds error:(NSError**)error { 1138 | [self.jsonWireClient postUnlockDeviceWithSession:self.session.sessionId error:error]; 1139 | } 1140 | 1141 | -(BOOL) isDeviceLocked { 1142 | NSError *error; 1143 | BOOL locked = [self isDeviceLockedWithError:&error]; 1144 | [self addError:error]; 1145 | return locked; 1146 | } 1147 | 1148 | -(BOOL) isDeviceLockedWithError:(NSError**)error { 1149 | return [self.jsonWireClient postIsDeviceLockedWithSession:self.session.sessionId error:error]; 1150 | } 1151 | 1152 | -(void) pressKeycode:(NSInteger)keycode metaState:(NSInteger)metastate error:(NSError**)error { 1153 | [self.jsonWireClient postPressKeycode:keycode metastate:metastate session:self.session.sessionId error:error]; 1154 | } 1155 | 1156 | -(void) longPressKeycode:(NSInteger)keycode metaState:(NSInteger)metastate error:(NSError**)error { 1157 | [self.jsonWireClient postLongPressKeycode:keycode metastate:metastate session:self.session.sessionId error:error]; 1158 | } 1159 | 1160 | -(void) triggerKeyEvent:(NSInteger)keycode metaState:(NSInteger)metastate error:(NSError**)error { 1161 | [self.jsonWireClient postKeyEvent:keycode metastate:metastate session:self.session.sessionId error:error]; 1162 | } 1163 | 1164 | -(void) rotateDevice:(SEScreenOrientation)orientation 1165 | { 1166 | NSError *error; 1167 | [self rotateDevice:orientation error:&error]; 1168 | [self addError:error]; 1169 | } 1170 | 1171 | -(void) rotateDevice:(SEScreenOrientation)orientation error:(NSError**)error { 1172 | [self.jsonWireClient postRotate:orientation session:self.session.sessionId error:error]; 1173 | } 1174 | 1175 | -(NSString*)currentActivity 1176 | { 1177 | NSError *error; 1178 | NSString *currentActivity = [self currentActivityWithError:&error]; 1179 | [self addError:error]; 1180 | return currentActivity; 1181 | } 1182 | 1183 | -(NSString*)currentActivityWithError:(NSError**)error { 1184 | return [self.jsonWireClient getCurrentActivityForDeviceForSession:self.session.sessionId error:error]; 1185 | } 1186 | 1187 | -(void)installAppAtPath:(NSString*)appPath { 1188 | NSError *error; 1189 | [self installAppAtPath:appPath error:&error]; 1190 | [self addError:error]; 1191 | } 1192 | 1193 | -(void)installAppAtPath:(NSString*)appPath error:(NSError**)error { 1194 | [self.jsonWireClient postInstallApp:appPath session:self.session.sessionId error:error]; 1195 | } 1196 | 1197 | -(void)removeApp:(NSString*)bundleId { 1198 | NSError *error; 1199 | [self removeApp:bundleId error:&error]; 1200 | [self addError:error]; 1201 | } 1202 | 1203 | -(void)removeApp:(NSString*)bundleId error:(NSError**)error { 1204 | [self.jsonWireClient postRemoveApp:bundleId session:self.session.sessionId error:error]; 1205 | } 1206 | 1207 | -(BOOL)isAppInstalled:(NSString*)bundleId 1208 | { 1209 | NSError *error; 1210 | BOOL installed = [self isAppInstalled:bundleId error:&error]; 1211 | [self addError:error]; 1212 | return installed; 1213 | } 1214 | 1215 | -(BOOL)isAppInstalled:(NSString*)bundleId error:(NSError**)error { 1216 | return [self.jsonWireClient postIsAppInstalledWithBundleId:bundleId session:self.session.sessionId error:error]; 1217 | } 1218 | 1219 | -(void) hideKeyboard { 1220 | NSError *error; 1221 | [self hideKeyboardWithError:&error]; 1222 | [self addError:error]; 1223 | } 1224 | 1225 | -(void) hideKeyboardWithError:(NSError**)error { 1226 | [self.jsonWireClient postHideKeyboardWithSession:self.session.sessionId error:error]; 1227 | } 1228 | 1229 | -(void) pushFileToPath:(NSString*)filePath data:(NSData*)data { 1230 | NSError *error; 1231 | [self pushFileToPath:filePath data:data error:&error]; 1232 | [self addError:error]; 1233 | } 1234 | 1235 | -(void) pushFileToPath:(NSString*)filePath data:(NSData*)data error:(NSError**) error { 1236 | [self.jsonWireClient postPushFileToPath:filePath data:data session:self.session.sessionId error:error]; 1237 | } 1238 | 1239 | -(NSData*) pullFileAtPath:(NSString*)filePath { 1240 | NSError *error; 1241 | NSData *data = [self pullFileAtPath:filePath error:&error]; 1242 | [self addError:error]; 1243 | return data; 1244 | } 1245 | 1246 | -(NSData*) pullFileAtPath:(NSString*)filePath error:(NSError**) error { 1247 | return [self.jsonWireClient postPullFileAtPath:filePath session:self.session.sessionId error:error]; 1248 | } 1249 | 1250 | 1251 | -(NSData*) pullFolderAtPath:(NSString*)filePath { 1252 | NSError *error; 1253 | NSData *data = [self pullFolderAtPath:filePath error:&error]; 1254 | [self addError:error]; 1255 | return data; 1256 | } 1257 | 1258 | -(NSData*) pullFolderAtPath:(NSString*)filePath error:(NSError**) error { 1259 | return [self.jsonWireClient postPullFolderAtPath:filePath session:self.session.sessionId error:error]; 1260 | } 1261 | 1262 | -(void) toggleAirplaneMode { 1263 | NSError *error; 1264 | [self toggleAirplaneModeWithError:&error]; 1265 | [self addError:error]; 1266 | } 1267 | 1268 | -(void) toggleAirplaneModeWithError:(NSError**)error { 1269 | [self.jsonWireClient postToggleAirplaneModeWithSession:self.session.sessionId error:error]; 1270 | } 1271 | 1272 | -(void) toggleCellularData { 1273 | NSError *error; 1274 | [self toggleCellularDataWithError:&error]; 1275 | [self addError:error]; 1276 | } 1277 | 1278 | -(void) toggleCellularDataWithError:(NSError**)error { 1279 | [self.jsonWireClient postToggleDataWithSession:self.session.sessionId error:error]; 1280 | } 1281 | 1282 | -(void) toggleWifi { 1283 | NSError *error; 1284 | [self toggleWifiWithError:&error]; 1285 | [self addError:error]; 1286 | } 1287 | 1288 | -(void) toggleWifiWithError:(NSError**)error { 1289 | [self.jsonWireClient postToggleWifiWithSession:self.session.sessionId error:error]; 1290 | } 1291 | 1292 | -(void) toggleLocationServices { 1293 | NSError *error; 1294 | [self toggleLocationServicesWithError:&error]; 1295 | [self addError:error]; 1296 | } 1297 | 1298 | -(void) toggleLocationServicesWithError:(NSError**)error { 1299 | [self.jsonWireClient postToggleLocationServicesWithSession:self.session.sessionId error:error]; 1300 | } 1301 | 1302 | -(void) openNotifications { 1303 | NSError *error; 1304 | [self openNotificationsWithError:&error]; 1305 | [self addError:error]; 1306 | } 1307 | 1308 | -(void) openNotificationsWithError:(NSError**)error { 1309 | [self.jsonWireClient postOpenNotificationsWithSession:self.session.sessionId error:error]; 1310 | } 1311 | 1312 | -(void) startActivity:(NSString*)activity package:(NSString*)package { 1313 | [self startActivity:activity package:package waitActivity:nil waitPackage:nil]; 1314 | } 1315 | 1316 | -(void) startActivity:(NSString*)activity package:(NSString*)package waitActivity:(NSString*)waitActivity waitPackage:(NSString*)waitPackage { 1317 | NSError *error; 1318 | [self startActivity:activity package:package waitActivity:waitActivity waitPackage:waitPackage error:&error]; 1319 | [self addError:error]; 1320 | } 1321 | 1322 | -(void) startActivity:(NSString*)activity package:(NSString*)package waitActivity:(NSString*)waitActivity waitPackage:(NSString*)waitPackage error:(NSError**)error { 1323 | [self.jsonWireClient postStartActivity:activity package:package waitActivity:waitActivity waitPackage:waitPackage session:self.session.sessionId error:error]; 1324 | } 1325 | 1326 | -(void) launchApp 1327 | { 1328 | NSError *error; 1329 | [self launchAppWithError:&error]; 1330 | [self addError:error]; 1331 | } 1332 | 1333 | -(void) launchAppWithError:(NSError**)error 1334 | { 1335 | [self.jsonWireClient postLaunchAppWithSession:self.session.sessionId error:error]; 1336 | } 1337 | 1338 | -(void) closeApp 1339 | { 1340 | NSError *error; 1341 | [self closeAppWithError:&error]; 1342 | [self addError:error]; 1343 | } 1344 | 1345 | -(void) closeAppWithError:(NSError**)error 1346 | { 1347 | [self.jsonWireClient postCloseAppWithSession:self.session.sessionId error:error]; 1348 | } 1349 | 1350 | -(void) resetApp 1351 | { 1352 | NSError *error; 1353 | [self resetAppWithError:&error]; 1354 | [self addError:error]; 1355 | } 1356 | 1357 | -(void) resetAppWithError:(NSError**)error 1358 | { 1359 | [self.jsonWireClient postResetAppWithSession:self.session.sessionId error:error]; 1360 | } 1361 | 1362 | -(void) runAppInBackground:(NSInteger)seconds 1363 | { 1364 | NSError *error; 1365 | [self runAppInBackground:seconds error:&error]; 1366 | [self addError:error]; 1367 | } 1368 | 1369 | -(void) runAppInBackground:(NSInteger)seconds error:(NSError**)error 1370 | { 1371 | [self.jsonWireClient postRunAppInBackground:seconds session:self.session.sessionId error:error]; 1372 | } 1373 | 1374 | -(void) endTestCodeCoverage 1375 | { 1376 | NSError *error; 1377 | [self endTestCodeCoverageWithError:&error]; 1378 | [self addError:error]; 1379 | } 1380 | 1381 | -(void) endTestCodeCoverageWithError:(NSError**)error 1382 | { 1383 | [self.jsonWireClient postEndTestCoverageWithSession:self.session.sessionId error:error]; 1384 | } 1385 | 1386 | -(NSString*)appStrings { 1387 | return [self appStringsForLanguage:nil]; 1388 | } 1389 | 1390 | -(NSString*)appStringsForLanguage:(NSString *)languageCode 1391 | { 1392 | NSError *error; 1393 | NSString *strings = [self appStringsForLanguage:languageCode error:&error]; 1394 | [self addError:error]; 1395 | return strings; 1396 | } 1397 | 1398 | -(NSString*)appStringsForLanguage:(NSString*)languageCode error:(NSError**)error { 1399 | return [self.jsonWireClient getAppStringsForLanguage:languageCode session:self.session.sessionId error:error]; 1400 | } 1401 | 1402 | -(void) setAppiumSettings:(NSDictionary*)settings { 1403 | NSError *error; 1404 | [self setAppiumSettings:settings error:&error]; 1405 | [self addError:error]; 1406 | } 1407 | 1408 | -(void) setAppiumSettings:(NSDictionary*)settings error:(NSError**)error { 1409 | [self.jsonWireClient postSetAppiumSettings:settings session:self.session.sessionId error:error]; 1410 | } 1411 | 1412 | -(NSDictionary*) appiumSettings { 1413 | NSError *error; 1414 | NSDictionary *settings = [self appiumSettingsWithError:&error]; 1415 | [self addError:error]; 1416 | return settings; 1417 | } 1418 | 1419 | -(NSDictionary*) appiumSettingsWithError:(NSError**)error { 1420 | return [self.jsonWireClient getAppiumSettingsWithSession:self.session.sessionId error:error]; 1421 | } 1422 | 1423 | @end 1424 | -------------------------------------------------------------------------------- /Selenium/Selenium.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3306C04E47AD5DFE0B556AE1 /* SETouchAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 3306CF39008C00178B67B5F0 /* SETouchAction.h */; }; 11 | 3306C1B353B30C0B4774A7C2 /* SETouchActionCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 3306C85130394E2A870D3523 /* SETouchActionCommand.m */; }; 12 | 3306C2207766F6F5641E1139 /* SETouchActionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 3306CEC56CDA44DE1E180E56 /* SETouchActionCommand.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 3306C25385EBB6FB712F89AC /* SETouchActionCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 3306C85130394E2A870D3523 /* SETouchActionCommand.m */; }; 14 | 3306C2C2D1FBC84E7CA81F0B /* SETouchActionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 3306CEC56CDA44DE1E180E56 /* SETouchActionCommand.h */; }; 15 | 3306C7298F878854FC02FF25 /* SETouchActionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 3306CEC56CDA44DE1E180E56 /* SETouchActionCommand.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16 | 3306C8ECD336D7F85965A2B8 /* SETouchAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 3306CF39008C00178B67B5F0 /* SETouchAction.h */; settings = {ATTRIBUTES = (Public, ); }; }; 17 | 3306C91EBB90E1044C1A5BEC /* SETouchAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 3306CF33E2A88D2218E6D0AB /* SETouchAction.m */; }; 18 | 3306CB27EB13953DC52AFB08 /* SETouchAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 3306CF33E2A88D2218E6D0AB /* SETouchAction.m */; }; 19 | 3306CC5CC19595180868C882 /* SETouchAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 3306CF33E2A88D2218E6D0AB /* SETouchAction.m */; }; 20 | 3306CCD4AF5152CD586E8334 /* SETouchAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 3306CF39008C00178B67B5F0 /* SETouchAction.h */; settings = {ATTRIBUTES = (Public, ); }; }; 21 | 3306CE10F8694DF632AFE416 /* SETouchActionCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 3306C85130394E2A870D3523 /* SETouchActionCommand.m */; }; 22 | 360486EF16F7C15100D968D8 /* SEUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = 360486ED16F7C15100D968D8 /* SEUtility.h */; }; 23 | 360486F016F7C15100D968D8 /* SEUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 360486EE16F7C15100D968D8 /* SEUtility.m */; }; 24 | 360609C316F5657600BADCDE /* SEError.h in Headers */ = {isa = PBXBuildFile; fileRef = 360609C116F5657600BADCDE /* SEError.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25 | 360609C416F5657600BADCDE /* SEError.m in Sources */ = {isa = PBXBuildFile; fileRef = 360609C216F5657600BADCDE /* SEError.m */; }; 26 | 36A03F9116FA0F2A00F61F08 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 36A03F8F16FA0F2A00F61F08 /* NSData+Base64.h */; }; 27 | 36A03F9216FA0F2A00F61F08 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 36A03F9016FA0F2A00F61F08 /* NSData+Base64.m */; }; 28 | 36A5B25C16F8EFAE00AB30AF /* SEJsonWireClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 36A5B25A16F8EFAE00AB30AF /* SEJsonWireClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; 29 | 36A5B25D16F8EFAE00AB30AF /* SEJsonWireClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 36A5B25B16F8EFAE00AB30AF /* SEJsonWireClient.m */; }; 30 | 36BB380516F268C2003A46FD /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 36BB380416F268C2003A46FD /* Cocoa.framework */; }; 31 | 36BB380F16F268C2003A46FD /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 36BB380D16F268C2003A46FD /* InfoPlist.strings */; }; 32 | 36BB381C16F268C2003A46FD /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 36BB380416F268C2003A46FD /* Cocoa.framework */; }; 33 | 36BB381F16F268C2003A46FD /* Selenium.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 36BB380116F268C2003A46FD /* Selenium.framework */; }; 34 | 36BB382516F268C2003A46FD /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 36BB382316F268C2003A46FD /* InfoPlist.strings */; }; 35 | 36BB382816F268C2003A46FD /* SeleniumTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 36BB382716F268C2003A46FD /* SeleniumTests.m */; }; 36 | 36BB383516F26907003A46FD /* SERemoteWebDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 36BB383316F26907003A46FD /* SERemoteWebDriver.h */; settings = {ATTRIBUTES = (Public, ); }; }; 37 | 36BB383616F26907003A46FD /* SERemoteWebDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 36BB383416F26907003A46FD /* SERemoteWebDriver.m */; }; 38 | 36BB383916F26926003A46FD /* SECapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 36BB383716F26926003A46FD /* SECapabilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; 39 | 36BB383A16F26926003A46FD /* SECapabilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 36BB383816F26926003A46FD /* SECapabilities.m */; }; 40 | 36BB383D16F26945003A46FD /* SESession.h in Headers */ = {isa = PBXBuildFile; fileRef = 36BB383B16F26945003A46FD /* SESession.h */; settings = {ATTRIBUTES = (Public, ); }; }; 41 | 36BB383E16F26945003A46FD /* SESession.m in Sources */ = {isa = PBXBuildFile; fileRef = 36BB383C16F26945003A46FD /* SESession.m */; }; 42 | 36BB384116F26951003A46FD /* SEStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 36BB383F16F26951003A46FD /* SEStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; 43 | 36BB384216F26951003A46FD /* SEStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 36BB384016F26951003A46FD /* SEStatus.m */; }; 44 | 36C3AFA216F9379C000E73C6 /* SEEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = 36C3AFA016F9379C000E73C6 /* SEEnums.h */; settings = {ATTRIBUTES = (Public, ); }; }; 45 | 36C3AFA316F9379C000E73C6 /* SEEnums.m in Sources */ = {isa = PBXBuildFile; fileRef = 36C3AFA116F9379C000E73C6 /* SEEnums.m */; }; 46 | 36F3D75216F7DFE700A5DD70 /* SEBy.h in Headers */ = {isa = PBXBuildFile; fileRef = 36F3D75016F7DFE700A5DD70 /* SEBy.h */; settings = {ATTRIBUTES = (Public, ); }; }; 47 | 36F3D75316F7DFE700A5DD70 /* SEBy.m in Sources */ = {isa = PBXBuildFile; fileRef = 36F3D75116F7DFE700A5DD70 /* SEBy.m */; }; 48 | 36F3D75616F7E39100A5DD70 /* SEWebElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 36F3D75416F7E39100A5DD70 /* SEWebElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 49 | 36F3D75716F7E39100A5DD70 /* SEWebElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 36F3D75516F7E39100A5DD70 /* SEWebElement.m */; }; 50 | 6B93026317011246003F4CFF /* SELocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B93026217011246003F4CFF /* SELocation.h */; settings = {ATTRIBUTES = (Public, ); }; }; 51 | 6B93026517011418003F4CFF /* SELocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B93026417011418003F4CFF /* SELocation.m */; }; 52 | C77BC83219FFC16B008979E5 /* SeleniumForiOS.h in Headers */ = {isa = PBXBuildFile; fileRef = C77BC83119FFC16B008979E5 /* SeleniumForiOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; 53 | C77BC83819FFC16B008979E5 /* SeleniumForiOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C77BC82D19FFC16B008979E5 /* SeleniumForiOS.framework */; }; 54 | C77BC83F19FFC16B008979E5 /* SeleniumForiOSTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C77BC83E19FFC16B008979E5 /* SeleniumForiOSTests.m */; }; 55 | C77BC84619FFC196008979E5 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 36A03F9016FA0F2A00F61F08 /* NSData+Base64.m */; }; 56 | C77BC84719FFC196008979E5 /* SEBy.m in Sources */ = {isa = PBXBuildFile; fileRef = 36F3D75116F7DFE700A5DD70 /* SEBy.m */; }; 57 | C77BC84819FFC196008979E5 /* SESession.m in Sources */ = {isa = PBXBuildFile; fileRef = 36BB383C16F26945003A46FD /* SESession.m */; }; 58 | C77BC84919FFC196008979E5 /* SELocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B93026417011418003F4CFF /* SELocation.m */; }; 59 | C77BC84A19FFC196008979E5 /* SEStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 36BB384016F26951003A46FD /* SEStatus.m */; }; 60 | C77BC84B19FFC196008979E5 /* SECapabilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 36BB383816F26926003A46FD /* SECapabilities.m */; }; 61 | C77BC84C19FFC196008979E5 /* SEEnums.m in Sources */ = {isa = PBXBuildFile; fileRef = 36C3AFA116F9379C000E73C6 /* SEEnums.m */; }; 62 | C77BC84D19FFC196008979E5 /* SEError.m in Sources */ = {isa = PBXBuildFile; fileRef = 360609C216F5657600BADCDE /* SEError.m */; }; 63 | C77BC84E19FFC196008979E5 /* SEWebElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 36F3D75516F7E39100A5DD70 /* SEWebElement.m */; }; 64 | C77BC84F19FFC196008979E5 /* SEUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 360486EE16F7C15100D968D8 /* SEUtility.m */; }; 65 | C77BC85019FFC196008979E5 /* SEJsonWireClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 36A5B25B16F8EFAE00AB30AF /* SEJsonWireClient.m */; }; 66 | C77BC85119FFC196008979E5 /* SERemoteWebDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 36BB383416F26907003A46FD /* SERemoteWebDriver.m */; }; 67 | C77BC85219FFC1A5008979E5 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 36A03F8F16FA0F2A00F61F08 /* NSData+Base64.h */; }; 68 | C77BC85319FFC1A5008979E5 /* SEUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = 360486ED16F7C15100D968D8 /* SEUtility.h */; }; 69 | C77BC85419FFC1B6008979E5 /* SEBy.h in Headers */ = {isa = PBXBuildFile; fileRef = 36F3D75016F7DFE700A5DD70 /* SEBy.h */; settings = {ATTRIBUTES = (Public, ); }; }; 70 | C77BC85519FFC1B6008979E5 /* SESession.h in Headers */ = {isa = PBXBuildFile; fileRef = 36BB383B16F26945003A46FD /* SESession.h */; settings = {ATTRIBUTES = (Public, ); }; }; 71 | C77BC85619FFC1B6008979E5 /* SELocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B93026217011246003F4CFF /* SELocation.h */; settings = {ATTRIBUTES = (Public, ); }; }; 72 | C77BC85719FFC1B6008979E5 /* SEStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 36BB383F16F26951003A46FD /* SEStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; 73 | C77BC85819FFC1B6008979E5 /* SECapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 36BB383716F26926003A46FD /* SECapabilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; 74 | C77BC85919FFC1B6008979E5 /* SEEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = 36C3AFA016F9379C000E73C6 /* SEEnums.h */; settings = {ATTRIBUTES = (Public, ); }; }; 75 | C77BC85A19FFC1B6008979E5 /* SEError.h in Headers */ = {isa = PBXBuildFile; fileRef = 360609C116F5657600BADCDE /* SEError.h */; settings = {ATTRIBUTES = (Public, ); }; }; 76 | C77BC85B19FFC1B6008979E5 /* SEWebElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 36F3D75416F7E39100A5DD70 /* SEWebElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 77 | C77BC85C19FFC1B6008979E5 /* SEJsonWireClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 36A5B25A16F8EFAE00AB30AF /* SEJsonWireClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; 78 | C77BC85D19FFC1B6008979E5 /* SERemoteWebDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 36BB383316F26907003A46FD /* SERemoteWebDriver.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79 | C7BF1A551A72BAE200016840 /* Selenium.h in Headers */ = {isa = PBXBuildFile; fileRef = C7BF1A541A72BAE200016840 /* Selenium.h */; settings = {ATTRIBUTES = (Public, ); }; }; 80 | C7BF1A561A72BAE200016840 /* Selenium.h in Headers */ = {isa = PBXBuildFile; fileRef = C7BF1A541A72BAE200016840 /* Selenium.h */; }; 81 | DB922EB318BC803C005C2F1E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 36BB380416F268C2003A46FD /* Cocoa.framework */; }; 82 | DB922ED318BC8075005C2F1E /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 36A03F9016FA0F2A00F61F08 /* NSData+Base64.m */; }; 83 | DB922ED418BC8075005C2F1E /* SEBy.m in Sources */ = {isa = PBXBuildFile; fileRef = 36F3D75116F7DFE700A5DD70 /* SEBy.m */; }; 84 | DB922ED518BC8075005C2F1E /* SESession.m in Sources */ = {isa = PBXBuildFile; fileRef = 36BB383C16F26945003A46FD /* SESession.m */; }; 85 | DB922ED618BC8075005C2F1E /* SELocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B93026417011418003F4CFF /* SELocation.m */; }; 86 | DB922ED718BC8075005C2F1E /* SEStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 36BB384016F26951003A46FD /* SEStatus.m */; }; 87 | DB922ED818BC8075005C2F1E /* SECapabilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 36BB383816F26926003A46FD /* SECapabilities.m */; }; 88 | DB922ED918BC8075005C2F1E /* SEEnums.m in Sources */ = {isa = PBXBuildFile; fileRef = 36C3AFA116F9379C000E73C6 /* SEEnums.m */; }; 89 | DB922EDA18BC8075005C2F1E /* SEError.m in Sources */ = {isa = PBXBuildFile; fileRef = 360609C216F5657600BADCDE /* SEError.m */; }; 90 | DB922EDB18BC8075005C2F1E /* SEWebElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 36F3D75516F7E39100A5DD70 /* SEWebElement.m */; }; 91 | DB922EDC18BC8075005C2F1E /* SEUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 360486EE16F7C15100D968D8 /* SEUtility.m */; }; 92 | DB922EDD18BC8075005C2F1E /* SEJsonWireClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 36A5B25B16F8EFAE00AB30AF /* SEJsonWireClient.m */; }; 93 | DB922EDE18BC8075005C2F1E /* SERemoteWebDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 36BB383416F26907003A46FD /* SERemoteWebDriver.m */; }; 94 | DB922EDF18BC807D005C2F1E /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 36A03F8F16FA0F2A00F61F08 /* NSData+Base64.h */; }; 95 | DB922EE018BC807D005C2F1E /* SEBy.h in Headers */ = {isa = PBXBuildFile; fileRef = 36F3D75016F7DFE700A5DD70 /* SEBy.h */; }; 96 | DB922EE118BC807D005C2F1E /* SESession.h in Headers */ = {isa = PBXBuildFile; fileRef = 36BB383B16F26945003A46FD /* SESession.h */; }; 97 | DB922EE218BC807D005C2F1E /* SELocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B93026217011246003F4CFF /* SELocation.h */; }; 98 | DB922EE318BC807D005C2F1E /* SEStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 36BB383F16F26951003A46FD /* SEStatus.h */; }; 99 | DB922EE418BC807D005C2F1E /* SECapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 36BB383716F26926003A46FD /* SECapabilities.h */; }; 100 | DB922EE518BC807D005C2F1E /* SEEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = 36C3AFA016F9379C000E73C6 /* SEEnums.h */; }; 101 | DB922EE618BC807D005C2F1E /* SEError.h in Headers */ = {isa = PBXBuildFile; fileRef = 360609C116F5657600BADCDE /* SEError.h */; }; 102 | DB922EE718BC807D005C2F1E /* SEWebElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 36F3D75416F7E39100A5DD70 /* SEWebElement.h */; }; 103 | DB922EE818BC807D005C2F1E /* SEUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = 360486ED16F7C15100D968D8 /* SEUtility.h */; }; 104 | DB922EE918BC807D005C2F1E /* SEJsonWireClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 36A5B25A16F8EFAE00AB30AF /* SEJsonWireClient.h */; }; 105 | DB922EEA18BC807D005C2F1E /* SERemoteWebDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 36BB383316F26907003A46FD /* SERemoteWebDriver.h */; }; 106 | /* End PBXBuildFile section */ 107 | 108 | /* Begin PBXContainerItemProxy section */ 109 | 36BB381D16F268C2003A46FD /* PBXContainerItemProxy */ = { 110 | isa = PBXContainerItemProxy; 111 | containerPortal = 36BB37F816F268C2003A46FD /* Project object */; 112 | proxyType = 1; 113 | remoteGlobalIDString = 36BB380016F268C2003A46FD; 114 | remoteInfo = Selenium; 115 | }; 116 | C77BC83919FFC16B008979E5 /* PBXContainerItemProxy */ = { 117 | isa = PBXContainerItemProxy; 118 | containerPortal = 36BB37F816F268C2003A46FD /* Project object */; 119 | proxyType = 1; 120 | remoteGlobalIDString = C77BC82C19FFC16B008979E5; 121 | remoteInfo = SeleniumForiOS; 122 | }; 123 | /* End PBXContainerItemProxy section */ 124 | 125 | /* Begin PBXFileReference section */ 126 | 3306C85130394E2A870D3523 /* SETouchActionCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SETouchActionCommand.m; sourceTree = ""; }; 127 | 3306CEC56CDA44DE1E180E56 /* SETouchActionCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SETouchActionCommand.h; sourceTree = ""; }; 128 | 3306CF33E2A88D2218E6D0AB /* SETouchAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SETouchAction.m; sourceTree = ""; }; 129 | 3306CF39008C00178B67B5F0 /* SETouchAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SETouchAction.h; sourceTree = ""; }; 130 | 360486ED16F7C15100D968D8 /* SEUtility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SEUtility.h; sourceTree = ""; }; 131 | 360486EE16F7C15100D968D8 /* SEUtility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SEUtility.m; sourceTree = ""; }; 132 | 360609C116F5657600BADCDE /* SEError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SEError.h; sourceTree = ""; }; 133 | 360609C216F5657600BADCDE /* SEError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SEError.m; sourceTree = ""; }; 134 | 36A03F8F16FA0F2A00F61F08 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Base64.h"; sourceTree = ""; }; 135 | 36A03F9016FA0F2A00F61F08 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Base64.m"; sourceTree = ""; }; 136 | 36A5B25A16F8EFAE00AB30AF /* SEJsonWireClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SEJsonWireClient.h; sourceTree = ""; }; 137 | 36A5B25B16F8EFAE00AB30AF /* SEJsonWireClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SEJsonWireClient.m; sourceTree = ""; }; 138 | 36BB380116F268C2003A46FD /* Selenium.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Selenium.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 139 | 36BB380416F268C2003A46FD /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 140 | 36BB380716F268C2003A46FD /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 141 | 36BB380816F268C2003A46FD /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 142 | 36BB380916F268C2003A46FD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 143 | 36BB380C16F268C2003A46FD /* Selenium-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Selenium-Info.plist"; sourceTree = ""; }; 144 | 36BB380E16F268C2003A46FD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 145 | 36BB381016F268C2003A46FD /* Selenium-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Selenium-Prefix.pch"; sourceTree = ""; }; 146 | 36BB381916F268C2003A46FD /* SeleniumTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SeleniumTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 147 | 36BB382216F268C2003A46FD /* SeleniumTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SeleniumTests-Info.plist"; sourceTree = ""; }; 148 | 36BB382416F268C2003A46FD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 149 | 36BB382616F268C2003A46FD /* SeleniumTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SeleniumTests.h; sourceTree = ""; }; 150 | 36BB382716F268C2003A46FD /* SeleniumTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SeleniumTests.m; sourceTree = ""; }; 151 | 36BB383316F26907003A46FD /* SERemoteWebDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SERemoteWebDriver.h; sourceTree = ""; }; 152 | 36BB383416F26907003A46FD /* SERemoteWebDriver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SERemoteWebDriver.m; sourceTree = ""; }; 153 | 36BB383716F26926003A46FD /* SECapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SECapabilities.h; sourceTree = ""; }; 154 | 36BB383816F26926003A46FD /* SECapabilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SECapabilities.m; sourceTree = ""; }; 155 | 36BB383B16F26945003A46FD /* SESession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SESession.h; sourceTree = ""; }; 156 | 36BB383C16F26945003A46FD /* SESession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SESession.m; sourceTree = ""; }; 157 | 36BB383F16F26951003A46FD /* SEStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SEStatus.h; sourceTree = ""; }; 158 | 36BB384016F26951003A46FD /* SEStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SEStatus.m; sourceTree = ""; }; 159 | 36C3AFA016F9379C000E73C6 /* SEEnums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SEEnums.h; sourceTree = ""; }; 160 | 36C3AFA116F9379C000E73C6 /* SEEnums.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SEEnums.m; sourceTree = ""; }; 161 | 36F3D75016F7DFE700A5DD70 /* SEBy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SEBy.h; sourceTree = ""; }; 162 | 36F3D75116F7DFE700A5DD70 /* SEBy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SEBy.m; sourceTree = ""; }; 163 | 36F3D75416F7E39100A5DD70 /* SEWebElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SEWebElement.h; sourceTree = ""; }; 164 | 36F3D75516F7E39100A5DD70 /* SEWebElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SEWebElement.m; sourceTree = ""; }; 165 | 6B93026217011246003F4CFF /* SELocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SELocation.h; sourceTree = ""; }; 166 | 6B93026417011418003F4CFF /* SELocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SELocation.m; sourceTree = ""; }; 167 | C77BC82D19FFC16B008979E5 /* SeleniumForiOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SeleniumForiOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 168 | C77BC83019FFC16B008979E5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 169 | C77BC83119FFC16B008979E5 /* SeleniumForiOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SeleniumForiOS.h; sourceTree = ""; }; 170 | C77BC83719FFC16B008979E5 /* SeleniumForiOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SeleniumForiOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 171 | C77BC83D19FFC16B008979E5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 172 | C77BC83E19FFC16B008979E5 /* SeleniumForiOSTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SeleniumForiOSTests.m; sourceTree = ""; }; 173 | C7BF1A541A72BAE200016840 /* Selenium.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Selenium.h; sourceTree = ""; }; 174 | DB922EB218BC803C005C2F1E /* liblibSelenium.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = liblibSelenium.a; sourceTree = BUILT_PRODUCTS_DIR; }; 175 | DB922EBF18BC803C005C2F1E /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 176 | /* End PBXFileReference section */ 177 | 178 | /* Begin PBXFrameworksBuildPhase section */ 179 | 36BB37FD16F268C2003A46FD /* Frameworks */ = { 180 | isa = PBXFrameworksBuildPhase; 181 | buildActionMask = 2147483647; 182 | files = ( 183 | 36BB380516F268C2003A46FD /* Cocoa.framework in Frameworks */, 184 | ); 185 | runOnlyForDeploymentPostprocessing = 0; 186 | }; 187 | 36BB381516F268C2003A46FD /* Frameworks */ = { 188 | isa = PBXFrameworksBuildPhase; 189 | buildActionMask = 2147483647; 190 | files = ( 191 | 36BB381C16F268C2003A46FD /* Cocoa.framework in Frameworks */, 192 | 36BB381F16F268C2003A46FD /* Selenium.framework in Frameworks */, 193 | ); 194 | runOnlyForDeploymentPostprocessing = 0; 195 | }; 196 | C77BC82919FFC16B008979E5 /* Frameworks */ = { 197 | isa = PBXFrameworksBuildPhase; 198 | buildActionMask = 2147483647; 199 | files = ( 200 | ); 201 | runOnlyForDeploymentPostprocessing = 0; 202 | }; 203 | C77BC83419FFC16B008979E5 /* Frameworks */ = { 204 | isa = PBXFrameworksBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | C77BC83819FFC16B008979E5 /* SeleniumForiOS.framework in Frameworks */, 208 | ); 209 | runOnlyForDeploymentPostprocessing = 0; 210 | }; 211 | DB922EAF18BC803C005C2F1E /* Frameworks */ = { 212 | isa = PBXFrameworksBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | DB922EB318BC803C005C2F1E /* Cocoa.framework in Frameworks */, 216 | ); 217 | runOnlyForDeploymentPostprocessing = 0; 218 | }; 219 | /* End PBXFrameworksBuildPhase section */ 220 | 221 | /* Begin PBXGroup section */ 222 | 36A03F8E16FA0F1A00F61F08 /* External */ = { 223 | isa = PBXGroup; 224 | children = ( 225 | 36A03F8F16FA0F2A00F61F08 /* NSData+Base64.h */, 226 | 36A03F9016FA0F2A00F61F08 /* NSData+Base64.m */, 227 | ); 228 | name = External; 229 | sourceTree = ""; 230 | }; 231 | 36A5B25916F8EF8F00AB30AF /* WebDriver */ = { 232 | isa = PBXGroup; 233 | children = ( 234 | 36A5B25A16F8EFAE00AB30AF /* SEJsonWireClient.h */, 235 | 36A5B25B16F8EFAE00AB30AF /* SEJsonWireClient.m */, 236 | 36BB383316F26907003A46FD /* SERemoteWebDriver.h */, 237 | 36BB383416F26907003A46FD /* SERemoteWebDriver.m */, 238 | ); 239 | name = WebDriver; 240 | sourceTree = ""; 241 | }; 242 | 36BB37F716F268C2003A46FD = { 243 | isa = PBXGroup; 244 | children = ( 245 | 36BB380A16F268C2003A46FD /* Selenium */, 246 | 36BB382016F268C2003A46FD /* SeleniumTests */, 247 | C77BC82E19FFC16B008979E5 /* SeleniumForiOS */, 248 | C77BC83B19FFC16B008979E5 /* SeleniumForiOSTests */, 249 | 36BB380316F268C2003A46FD /* Frameworks */, 250 | 36BB380216F268C2003A46FD /* Products */, 251 | ); 252 | sourceTree = ""; 253 | }; 254 | 36BB380216F268C2003A46FD /* Products */ = { 255 | isa = PBXGroup; 256 | children = ( 257 | 36BB380116F268C2003A46FD /* Selenium.framework */, 258 | 36BB381916F268C2003A46FD /* SeleniumTests.xctest */, 259 | DB922EB218BC803C005C2F1E /* liblibSelenium.a */, 260 | C77BC82D19FFC16B008979E5 /* SeleniumForiOS.framework */, 261 | C77BC83719FFC16B008979E5 /* SeleniumForiOSTests.xctest */, 262 | ); 263 | name = Products; 264 | sourceTree = ""; 265 | }; 266 | 36BB380316F268C2003A46FD /* Frameworks */ = { 267 | isa = PBXGroup; 268 | children = ( 269 | 36BB380416F268C2003A46FD /* Cocoa.framework */, 270 | DB922EBF18BC803C005C2F1E /* XCTest.framework */, 271 | 36BB380616F268C2003A46FD /* Other Frameworks */, 272 | ); 273 | name = Frameworks; 274 | sourceTree = ""; 275 | }; 276 | 36BB380616F268C2003A46FD /* Other Frameworks */ = { 277 | isa = PBXGroup; 278 | children = ( 279 | 36BB380716F268C2003A46FD /* AppKit.framework */, 280 | 36BB380816F268C2003A46FD /* CoreData.framework */, 281 | 36BB380916F268C2003A46FD /* Foundation.framework */, 282 | ); 283 | name = "Other Frameworks"; 284 | sourceTree = ""; 285 | }; 286 | 36BB380A16F268C2003A46FD /* Selenium */ = { 287 | isa = PBXGroup; 288 | children = ( 289 | 36A03F8E16FA0F1A00F61F08 /* External */, 290 | 36BB383116F268EF003A46FD /* Types */, 291 | 36BB384316F2695D003A46FD /* Utility */, 292 | 36A5B25916F8EF8F00AB30AF /* WebDriver */, 293 | 36BB380B16F268C2003A46FD /* Supporting Files */, 294 | C7BF1A541A72BAE200016840 /* Selenium.h */, 295 | ); 296 | path = Selenium; 297 | sourceTree = ""; 298 | }; 299 | 36BB380B16F268C2003A46FD /* Supporting Files */ = { 300 | isa = PBXGroup; 301 | children = ( 302 | 36BB380C16F268C2003A46FD /* Selenium-Info.plist */, 303 | 36BB380D16F268C2003A46FD /* InfoPlist.strings */, 304 | 36BB381016F268C2003A46FD /* Selenium-Prefix.pch */, 305 | ); 306 | name = "Supporting Files"; 307 | sourceTree = ""; 308 | }; 309 | 36BB382016F268C2003A46FD /* SeleniumTests */ = { 310 | isa = PBXGroup; 311 | children = ( 312 | 36BB382616F268C2003A46FD /* SeleniumTests.h */, 313 | 36BB382716F268C2003A46FD /* SeleniumTests.m */, 314 | 36BB382116F268C2003A46FD /* Supporting Files */, 315 | ); 316 | path = SeleniumTests; 317 | sourceTree = ""; 318 | }; 319 | 36BB382116F268C2003A46FD /* Supporting Files */ = { 320 | isa = PBXGroup; 321 | children = ( 322 | 36BB382216F268C2003A46FD /* SeleniumTests-Info.plist */, 323 | 36BB382316F268C2003A46FD /* InfoPlist.strings */, 324 | ); 325 | name = "Supporting Files"; 326 | sourceTree = ""; 327 | }; 328 | 36BB383116F268EF003A46FD /* Types */ = { 329 | isa = PBXGroup; 330 | children = ( 331 | 36F3D75016F7DFE700A5DD70 /* SEBy.h */, 332 | 36F3D75116F7DFE700A5DD70 /* SEBy.m */, 333 | 36BB383B16F26945003A46FD /* SESession.h */, 334 | 36BB383C16F26945003A46FD /* SESession.m */, 335 | 6B93026217011246003F4CFF /* SELocation.h */, 336 | 6B93026417011418003F4CFF /* SELocation.m */, 337 | 36BB383F16F26951003A46FD /* SEStatus.h */, 338 | 36BB384016F26951003A46FD /* SEStatus.m */, 339 | 36BB383716F26926003A46FD /* SECapabilities.h */, 340 | 36BB383816F26926003A46FD /* SECapabilities.m */, 341 | 36C3AFA016F9379C000E73C6 /* SEEnums.h */, 342 | 36C3AFA116F9379C000E73C6 /* SEEnums.m */, 343 | 360609C116F5657600BADCDE /* SEError.h */, 344 | 360609C216F5657600BADCDE /* SEError.m */, 345 | 36F3D75416F7E39100A5DD70 /* SEWebElement.h */, 346 | 36F3D75516F7E39100A5DD70 /* SEWebElement.m */, 347 | 3306CF33E2A88D2218E6D0AB /* SETouchAction.m */, 348 | 3306CF39008C00178B67B5F0 /* SETouchAction.h */, 349 | 3306C85130394E2A870D3523 /* SETouchActionCommand.m */, 350 | 3306CEC56CDA44DE1E180E56 /* SETouchActionCommand.h */, 351 | ); 352 | name = Types; 353 | sourceTree = ""; 354 | }; 355 | 36BB384316F2695D003A46FD /* Utility */ = { 356 | isa = PBXGroup; 357 | children = ( 358 | 360486ED16F7C15100D968D8 /* SEUtility.h */, 359 | 360486EE16F7C15100D968D8 /* SEUtility.m */, 360 | ); 361 | name = Utility; 362 | sourceTree = ""; 363 | }; 364 | C77BC82E19FFC16B008979E5 /* SeleniumForiOS */ = { 365 | isa = PBXGroup; 366 | children = ( 367 | C77BC83119FFC16B008979E5 /* SeleniumForiOS.h */, 368 | C77BC82F19FFC16B008979E5 /* Supporting Files */, 369 | ); 370 | path = SeleniumForiOS; 371 | sourceTree = ""; 372 | }; 373 | C77BC82F19FFC16B008979E5 /* Supporting Files */ = { 374 | isa = PBXGroup; 375 | children = ( 376 | C77BC83019FFC16B008979E5 /* Info.plist */, 377 | ); 378 | name = "Supporting Files"; 379 | sourceTree = ""; 380 | }; 381 | C77BC83B19FFC16B008979E5 /* SeleniumForiOSTests */ = { 382 | isa = PBXGroup; 383 | children = ( 384 | C77BC83E19FFC16B008979E5 /* SeleniumForiOSTests.m */, 385 | C77BC83C19FFC16B008979E5 /* Supporting Files */, 386 | ); 387 | path = SeleniumForiOSTests; 388 | sourceTree = ""; 389 | }; 390 | C77BC83C19FFC16B008979E5 /* Supporting Files */ = { 391 | isa = PBXGroup; 392 | children = ( 393 | C77BC83D19FFC16B008979E5 /* Info.plist */, 394 | ); 395 | name = "Supporting Files"; 396 | sourceTree = ""; 397 | }; 398 | /* End PBXGroup section */ 399 | 400 | /* Begin PBXHeadersBuildPhase section */ 401 | 36BB37FE16F268C2003A46FD /* Headers */ = { 402 | isa = PBXHeadersBuildPhase; 403 | buildActionMask = 2147483647; 404 | files = ( 405 | 36BB383516F26907003A46FD /* SERemoteWebDriver.h in Headers */, 406 | 36BB383916F26926003A46FD /* SECapabilities.h in Headers */, 407 | 36BB383D16F26945003A46FD /* SESession.h in Headers */, 408 | 36BB384116F26951003A46FD /* SEStatus.h in Headers */, 409 | 360609C316F5657600BADCDE /* SEError.h in Headers */, 410 | 36F3D75216F7DFE700A5DD70 /* SEBy.h in Headers */, 411 | C7BF1A551A72BAE200016840 /* Selenium.h in Headers */, 412 | 36F3D75616F7E39100A5DD70 /* SEWebElement.h in Headers */, 413 | 36C3AFA216F9379C000E73C6 /* SEEnums.h in Headers */, 414 | 36A5B25C16F8EFAE00AB30AF /* SEJsonWireClient.h in Headers */, 415 | 6B93026317011246003F4CFF /* SELocation.h in Headers */, 416 | 3306C7298F878854FC02FF25 /* SETouchActionCommand.h in Headers */, 417 | 3306C8ECD336D7F85965A2B8 /* SETouchAction.h in Headers */, 418 | 360486EF16F7C15100D968D8 /* SEUtility.h in Headers */, 419 | 36A03F9116FA0F2A00F61F08 /* NSData+Base64.h in Headers */, 420 | ); 421 | runOnlyForDeploymentPostprocessing = 0; 422 | }; 423 | C77BC82A19FFC16B008979E5 /* Headers */ = { 424 | isa = PBXHeadersBuildPhase; 425 | buildActionMask = 2147483647; 426 | files = ( 427 | C77BC83219FFC16B008979E5 /* SeleniumForiOS.h in Headers */, 428 | C77BC85419FFC1B6008979E5 /* SEBy.h in Headers */, 429 | C77BC85519FFC1B6008979E5 /* SESession.h in Headers */, 430 | C77BC85619FFC1B6008979E5 /* SELocation.h in Headers */, 431 | C77BC85719FFC1B6008979E5 /* SEStatus.h in Headers */, 432 | C77BC85819FFC1B6008979E5 /* SECapabilities.h in Headers */, 433 | C77BC85919FFC1B6008979E5 /* SEEnums.h in Headers */, 434 | C77BC85A19FFC1B6008979E5 /* SEError.h in Headers */, 435 | C77BC85B19FFC1B6008979E5 /* SEWebElement.h in Headers */, 436 | 3306C2207766F6F5641E1139 /* SETouchActionCommand.h in Headers */, 437 | 3306CCD4AF5152CD586E8334 /* SETouchAction.h in Headers */, 438 | C77BC85C19FFC1B6008979E5 /* SEJsonWireClient.h in Headers */, 439 | C77BC85D19FFC1B6008979E5 /* SERemoteWebDriver.h in Headers */, 440 | C77BC85219FFC1A5008979E5 /* NSData+Base64.h in Headers */, 441 | C77BC85319FFC1A5008979E5 /* SEUtility.h in Headers */, 442 | ); 443 | runOnlyForDeploymentPostprocessing = 0; 444 | }; 445 | DB922EB018BC803C005C2F1E /* Headers */ = { 446 | isa = PBXHeadersBuildPhase; 447 | buildActionMask = 2147483647; 448 | files = ( 449 | DB922EDF18BC807D005C2F1E /* NSData+Base64.h in Headers */, 450 | DB922EE018BC807D005C2F1E /* SEBy.h in Headers */, 451 | DB922EE118BC807D005C2F1E /* SESession.h in Headers */, 452 | DB922EE218BC807D005C2F1E /* SELocation.h in Headers */, 453 | DB922EE318BC807D005C2F1E /* SEStatus.h in Headers */, 454 | DB922EE418BC807D005C2F1E /* SECapabilities.h in Headers */, 455 | DB922EE518BC807D005C2F1E /* SEEnums.h in Headers */, 456 | C7BF1A561A72BAE200016840 /* Selenium.h in Headers */, 457 | DB922EE618BC807D005C2F1E /* SEError.h in Headers */, 458 | DB922EE718BC807D005C2F1E /* SEWebElement.h in Headers */, 459 | DB922EE818BC807D005C2F1E /* SEUtility.h in Headers */, 460 | DB922EE918BC807D005C2F1E /* SEJsonWireClient.h in Headers */, 461 | DB922EEA18BC807D005C2F1E /* SERemoteWebDriver.h in Headers */, 462 | 3306C04E47AD5DFE0B556AE1 /* SETouchAction.h in Headers */, 463 | 3306C2C2D1FBC84E7CA81F0B /* SETouchActionCommand.h in Headers */, 464 | ); 465 | runOnlyForDeploymentPostprocessing = 0; 466 | }; 467 | /* End PBXHeadersBuildPhase section */ 468 | 469 | /* Begin PBXNativeTarget section */ 470 | 36BB380016F268C2003A46FD /* Selenium */ = { 471 | isa = PBXNativeTarget; 472 | buildConfigurationList = 36BB382B16F268C2003A46FD /* Build configuration list for PBXNativeTarget "Selenium" */; 473 | buildPhases = ( 474 | 36BB37FC16F268C2003A46FD /* Sources */, 475 | 36BB37FD16F268C2003A46FD /* Frameworks */, 476 | 36BB37FE16F268C2003A46FD /* Headers */, 477 | 36BB37FF16F268C2003A46FD /* Resources */, 478 | ); 479 | buildRules = ( 480 | ); 481 | dependencies = ( 482 | ); 483 | name = Selenium; 484 | productName = Selenium; 485 | productReference = 36BB380116F268C2003A46FD /* Selenium.framework */; 486 | productType = "com.apple.product-type.framework"; 487 | }; 488 | 36BB381816F268C2003A46FD /* SeleniumTests */ = { 489 | isa = PBXNativeTarget; 490 | buildConfigurationList = 36BB382E16F268C2003A46FD /* Build configuration list for PBXNativeTarget "SeleniumTests" */; 491 | buildPhases = ( 492 | 36BB381416F268C2003A46FD /* Sources */, 493 | 36BB381516F268C2003A46FD /* Frameworks */, 494 | 36BB381616F268C2003A46FD /* Resources */, 495 | 36BB381716F268C2003A46FD /* ShellScript */, 496 | ); 497 | buildRules = ( 498 | ); 499 | dependencies = ( 500 | 36BB381E16F268C2003A46FD /* PBXTargetDependency */, 501 | ); 502 | name = SeleniumTests; 503 | productName = SeleniumTests; 504 | productReference = 36BB381916F268C2003A46FD /* SeleniumTests.xctest */; 505 | productType = "com.apple.product-type.bundle.unit-test"; 506 | }; 507 | C77BC82C19FFC16B008979E5 /* SeleniumForiOS */ = { 508 | isa = PBXNativeTarget; 509 | buildConfigurationList = C77BC84419FFC16B008979E5 /* Build configuration list for PBXNativeTarget "SeleniumForiOS" */; 510 | buildPhases = ( 511 | C77BC82819FFC16B008979E5 /* Sources */, 512 | C77BC82919FFC16B008979E5 /* Frameworks */, 513 | C77BC82A19FFC16B008979E5 /* Headers */, 514 | C77BC82B19FFC16B008979E5 /* Resources */, 515 | ); 516 | buildRules = ( 517 | ); 518 | dependencies = ( 519 | ); 520 | name = SeleniumForiOS; 521 | productName = SeleniumForiOS; 522 | productReference = C77BC82D19FFC16B008979E5 /* SeleniumForiOS.framework */; 523 | productType = "com.apple.product-type.framework"; 524 | }; 525 | C77BC83619FFC16B008979E5 /* SeleniumForiOSTests */ = { 526 | isa = PBXNativeTarget; 527 | buildConfigurationList = C77BC84519FFC16B008979E5 /* Build configuration list for PBXNativeTarget "SeleniumForiOSTests" */; 528 | buildPhases = ( 529 | C77BC83319FFC16B008979E5 /* Sources */, 530 | C77BC83419FFC16B008979E5 /* Frameworks */, 531 | C77BC83519FFC16B008979E5 /* Resources */, 532 | ); 533 | buildRules = ( 534 | ); 535 | dependencies = ( 536 | C77BC83A19FFC16B008979E5 /* PBXTargetDependency */, 537 | ); 538 | name = SeleniumForiOSTests; 539 | productName = SeleniumForiOSTests; 540 | productReference = C77BC83719FFC16B008979E5 /* SeleniumForiOSTests.xctest */; 541 | productType = "com.apple.product-type.bundle.unit-test"; 542 | }; 543 | DB922EB118BC803C005C2F1E /* libSelenium */ = { 544 | isa = PBXNativeTarget; 545 | buildConfigurationList = DB922ED118BC803C005C2F1E /* Build configuration list for PBXNativeTarget "libSelenium" */; 546 | buildPhases = ( 547 | DB922EAE18BC803C005C2F1E /* Sources */, 548 | DB922EAF18BC803C005C2F1E /* Frameworks */, 549 | DB922EB018BC803C005C2F1E /* Headers */, 550 | ); 551 | buildRules = ( 552 | ); 553 | dependencies = ( 554 | ); 555 | name = libSelenium; 556 | productName = libSelenium; 557 | productReference = DB922EB218BC803C005C2F1E /* liblibSelenium.a */; 558 | productType = "com.apple.product-type.library.static"; 559 | }; 560 | /* End PBXNativeTarget section */ 561 | 562 | /* Begin PBXProject section */ 563 | 36BB37F816F268C2003A46FD /* Project object */ = { 564 | isa = PBXProject; 565 | attributes = { 566 | LastTestingUpgradeCheck = 0600; 567 | LastUpgradeCheck = 0600; 568 | ORGANIZATIONNAME = Appium; 569 | TargetAttributes = { 570 | C77BC82C19FFC16B008979E5 = { 571 | CreatedOnToolsVersion = 6.1; 572 | }; 573 | C77BC83619FFC16B008979E5 = { 574 | CreatedOnToolsVersion = 6.1; 575 | }; 576 | }; 577 | }; 578 | buildConfigurationList = 36BB37FB16F268C2003A46FD /* Build configuration list for PBXProject "Selenium" */; 579 | compatibilityVersion = "Xcode 3.2"; 580 | developmentRegion = English; 581 | hasScannedForEncodings = 0; 582 | knownRegions = ( 583 | en, 584 | ); 585 | mainGroup = 36BB37F716F268C2003A46FD; 586 | productRefGroup = 36BB380216F268C2003A46FD /* Products */; 587 | projectDirPath = ""; 588 | projectRoot = ""; 589 | targets = ( 590 | 36BB380016F268C2003A46FD /* Selenium */, 591 | 36BB381816F268C2003A46FD /* SeleniumTests */, 592 | DB922EB118BC803C005C2F1E /* libSelenium */, 593 | C77BC82C19FFC16B008979E5 /* SeleniumForiOS */, 594 | C77BC83619FFC16B008979E5 /* SeleniumForiOSTests */, 595 | ); 596 | }; 597 | /* End PBXProject section */ 598 | 599 | /* Begin PBXResourcesBuildPhase section */ 600 | 36BB37FF16F268C2003A46FD /* Resources */ = { 601 | isa = PBXResourcesBuildPhase; 602 | buildActionMask = 2147483647; 603 | files = ( 604 | 36BB380F16F268C2003A46FD /* InfoPlist.strings in Resources */, 605 | ); 606 | runOnlyForDeploymentPostprocessing = 0; 607 | }; 608 | 36BB381616F268C2003A46FD /* Resources */ = { 609 | isa = PBXResourcesBuildPhase; 610 | buildActionMask = 2147483647; 611 | files = ( 612 | 36BB382516F268C2003A46FD /* InfoPlist.strings in Resources */, 613 | ); 614 | runOnlyForDeploymentPostprocessing = 0; 615 | }; 616 | C77BC82B19FFC16B008979E5 /* Resources */ = { 617 | isa = PBXResourcesBuildPhase; 618 | buildActionMask = 2147483647; 619 | files = ( 620 | ); 621 | runOnlyForDeploymentPostprocessing = 0; 622 | }; 623 | C77BC83519FFC16B008979E5 /* Resources */ = { 624 | isa = PBXResourcesBuildPhase; 625 | buildActionMask = 2147483647; 626 | files = ( 627 | ); 628 | runOnlyForDeploymentPostprocessing = 0; 629 | }; 630 | /* End PBXResourcesBuildPhase section */ 631 | 632 | /* Begin PBXShellScriptBuildPhase section */ 633 | 36BB381716F268C2003A46FD /* ShellScript */ = { 634 | isa = PBXShellScriptBuildPhase; 635 | buildActionMask = 2147483647; 636 | files = ( 637 | ); 638 | inputPaths = ( 639 | ); 640 | outputPaths = ( 641 | ); 642 | runOnlyForDeploymentPostprocessing = 0; 643 | shellPath = /bin/sh; 644 | shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; 645 | }; 646 | /* End PBXShellScriptBuildPhase section */ 647 | 648 | /* Begin PBXSourcesBuildPhase section */ 649 | 36BB37FC16F268C2003A46FD /* Sources */ = { 650 | isa = PBXSourcesBuildPhase; 651 | buildActionMask = 2147483647; 652 | files = ( 653 | 36BB383616F26907003A46FD /* SERemoteWebDriver.m in Sources */, 654 | 36BB383A16F26926003A46FD /* SECapabilities.m in Sources */, 655 | 36BB383E16F26945003A46FD /* SESession.m in Sources */, 656 | 36BB384216F26951003A46FD /* SEStatus.m in Sources */, 657 | 360609C416F5657600BADCDE /* SEError.m in Sources */, 658 | 360486F016F7C15100D968D8 /* SEUtility.m in Sources */, 659 | 36F3D75316F7DFE700A5DD70 /* SEBy.m in Sources */, 660 | 36F3D75716F7E39100A5DD70 /* SEWebElement.m in Sources */, 661 | 36A5B25D16F8EFAE00AB30AF /* SEJsonWireClient.m in Sources */, 662 | 36C3AFA316F9379C000E73C6 /* SEEnums.m in Sources */, 663 | 36A03F9216FA0F2A00F61F08 /* NSData+Base64.m in Sources */, 664 | 6B93026517011418003F4CFF /* SELocation.m in Sources */, 665 | 3306CB27EB13953DC52AFB08 /* SETouchAction.m in Sources */, 666 | 3306C1B353B30C0B4774A7C2 /* SETouchActionCommand.m in Sources */, 667 | ); 668 | runOnlyForDeploymentPostprocessing = 0; 669 | }; 670 | 36BB381416F268C2003A46FD /* Sources */ = { 671 | isa = PBXSourcesBuildPhase; 672 | buildActionMask = 2147483647; 673 | files = ( 674 | 36BB382816F268C2003A46FD /* SeleniumTests.m in Sources */, 675 | ); 676 | runOnlyForDeploymentPostprocessing = 0; 677 | }; 678 | C77BC82819FFC16B008979E5 /* Sources */ = { 679 | isa = PBXSourcesBuildPhase; 680 | buildActionMask = 2147483647; 681 | files = ( 682 | C77BC84619FFC196008979E5 /* NSData+Base64.m in Sources */, 683 | C77BC84719FFC196008979E5 /* SEBy.m in Sources */, 684 | C77BC84819FFC196008979E5 /* SESession.m in Sources */, 685 | C77BC84919FFC196008979E5 /* SELocation.m in Sources */, 686 | C77BC84A19FFC196008979E5 /* SEStatus.m in Sources */, 687 | C77BC84B19FFC196008979E5 /* SECapabilities.m in Sources */, 688 | C77BC84C19FFC196008979E5 /* SEEnums.m in Sources */, 689 | C77BC84D19FFC196008979E5 /* SEError.m in Sources */, 690 | C77BC84E19FFC196008979E5 /* SEWebElement.m in Sources */, 691 | C77BC84F19FFC196008979E5 /* SEUtility.m in Sources */, 692 | C77BC85019FFC196008979E5 /* SEJsonWireClient.m in Sources */, 693 | C77BC85119FFC196008979E5 /* SERemoteWebDriver.m in Sources */, 694 | 3306C91EBB90E1044C1A5BEC /* SETouchAction.m in Sources */, 695 | 3306CE10F8694DF632AFE416 /* SETouchActionCommand.m in Sources */, 696 | ); 697 | runOnlyForDeploymentPostprocessing = 0; 698 | }; 699 | C77BC83319FFC16B008979E5 /* Sources */ = { 700 | isa = PBXSourcesBuildPhase; 701 | buildActionMask = 2147483647; 702 | files = ( 703 | C77BC83F19FFC16B008979E5 /* SeleniumForiOSTests.m in Sources */, 704 | ); 705 | runOnlyForDeploymentPostprocessing = 0; 706 | }; 707 | DB922EAE18BC803C005C2F1E /* Sources */ = { 708 | isa = PBXSourcesBuildPhase; 709 | buildActionMask = 2147483647; 710 | files = ( 711 | DB922ED318BC8075005C2F1E /* NSData+Base64.m in Sources */, 712 | DB922ED418BC8075005C2F1E /* SEBy.m in Sources */, 713 | DB922ED518BC8075005C2F1E /* SESession.m in Sources */, 714 | DB922ED618BC8075005C2F1E /* SELocation.m in Sources */, 715 | DB922ED718BC8075005C2F1E /* SEStatus.m in Sources */, 716 | DB922ED818BC8075005C2F1E /* SECapabilities.m in Sources */, 717 | DB922ED918BC8075005C2F1E /* SEEnums.m in Sources */, 718 | DB922EDA18BC8075005C2F1E /* SEError.m in Sources */, 719 | DB922EDB18BC8075005C2F1E /* SEWebElement.m in Sources */, 720 | DB922EDC18BC8075005C2F1E /* SEUtility.m in Sources */, 721 | DB922EDD18BC8075005C2F1E /* SEJsonWireClient.m in Sources */, 722 | DB922EDE18BC8075005C2F1E /* SERemoteWebDriver.m in Sources */, 723 | 3306CC5CC19595180868C882 /* SETouchAction.m in Sources */, 724 | 3306C25385EBB6FB712F89AC /* SETouchActionCommand.m in Sources */, 725 | ); 726 | runOnlyForDeploymentPostprocessing = 0; 727 | }; 728 | /* End PBXSourcesBuildPhase section */ 729 | 730 | /* Begin PBXTargetDependency section */ 731 | 36BB381E16F268C2003A46FD /* PBXTargetDependency */ = { 732 | isa = PBXTargetDependency; 733 | target = 36BB380016F268C2003A46FD /* Selenium */; 734 | targetProxy = 36BB381D16F268C2003A46FD /* PBXContainerItemProxy */; 735 | }; 736 | C77BC83A19FFC16B008979E5 /* PBXTargetDependency */ = { 737 | isa = PBXTargetDependency; 738 | target = C77BC82C19FFC16B008979E5 /* SeleniumForiOS */; 739 | targetProxy = C77BC83919FFC16B008979E5 /* PBXContainerItemProxy */; 740 | }; 741 | /* End PBXTargetDependency section */ 742 | 743 | /* Begin PBXVariantGroup section */ 744 | 36BB380D16F268C2003A46FD /* InfoPlist.strings */ = { 745 | isa = PBXVariantGroup; 746 | children = ( 747 | 36BB380E16F268C2003A46FD /* en */, 748 | ); 749 | name = InfoPlist.strings; 750 | sourceTree = ""; 751 | }; 752 | 36BB382316F268C2003A46FD /* InfoPlist.strings */ = { 753 | isa = PBXVariantGroup; 754 | children = ( 755 | 36BB382416F268C2003A46FD /* en */, 756 | ); 757 | name = InfoPlist.strings; 758 | sourceTree = ""; 759 | }; 760 | /* End PBXVariantGroup section */ 761 | 762 | /* Begin XCBuildConfiguration section */ 763 | 36BB382916F268C2003A46FD /* Debug */ = { 764 | isa = XCBuildConfiguration; 765 | buildSettings = { 766 | ALWAYS_SEARCH_USER_PATHS = NO; 767 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 768 | CLANG_CXX_LIBRARY = "libc++"; 769 | CLANG_ENABLE_OBJC_ARC = YES; 770 | CLANG_WARN_CONSTANT_CONVERSION = YES; 771 | CLANG_WARN_EMPTY_BODY = YES; 772 | CLANG_WARN_ENUM_CONVERSION = YES; 773 | CLANG_WARN_INT_CONVERSION = YES; 774 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 775 | COPY_PHASE_STRIP = NO; 776 | GCC_C_LANGUAGE_STANDARD = gnu99; 777 | GCC_DYNAMIC_NO_PIC = NO; 778 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 779 | GCC_OPTIMIZATION_LEVEL = 0; 780 | GCC_PREPROCESSOR_DEFINITIONS = ( 781 | "DEBUG=1", 782 | "$(inherited)", 783 | ); 784 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 785 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 786 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 787 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 788 | GCC_WARN_UNUSED_VARIABLE = YES; 789 | MACOSX_DEPLOYMENT_TARGET = 10.8; 790 | ONLY_ACTIVE_ARCH = YES; 791 | SDKROOT = macosx; 792 | }; 793 | name = Debug; 794 | }; 795 | 36BB382A16F268C2003A46FD /* Release */ = { 796 | isa = XCBuildConfiguration; 797 | buildSettings = { 798 | ALWAYS_SEARCH_USER_PATHS = NO; 799 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 800 | CLANG_CXX_LIBRARY = "libc++"; 801 | CLANG_ENABLE_OBJC_ARC = YES; 802 | CLANG_WARN_CONSTANT_CONVERSION = YES; 803 | CLANG_WARN_EMPTY_BODY = YES; 804 | CLANG_WARN_ENUM_CONVERSION = YES; 805 | CLANG_WARN_INT_CONVERSION = YES; 806 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 807 | COPY_PHASE_STRIP = YES; 808 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 809 | GCC_C_LANGUAGE_STANDARD = gnu99; 810 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 811 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 812 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 813 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 814 | GCC_WARN_UNUSED_VARIABLE = YES; 815 | MACOSX_DEPLOYMENT_TARGET = 10.8; 816 | SDKROOT = macosx; 817 | }; 818 | name = Release; 819 | }; 820 | 36BB382C16F268C2003A46FD /* Debug */ = { 821 | isa = XCBuildConfiguration; 822 | buildSettings = { 823 | COMBINE_HIDPI_IMAGES = YES; 824 | DYLIB_COMPATIBILITY_VERSION = 1; 825 | DYLIB_CURRENT_VERSION = 1; 826 | FRAMEWORK_VERSION = A; 827 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 828 | GCC_PREFIX_HEADER = "Selenium/Selenium-Prefix.pch"; 829 | INFOPLIST_FILE = "Selenium/Selenium-Info.plist"; 830 | INSTALL_PATH = "@loader_path/../Frameworks"; 831 | MACOSX_DEPLOYMENT_TARGET = 10.8; 832 | PRODUCT_NAME = "$(TARGET_NAME)"; 833 | SDKROOT = macosx; 834 | WRAPPER_EXTENSION = framework; 835 | }; 836 | name = Debug; 837 | }; 838 | 36BB382D16F268C2003A46FD /* Release */ = { 839 | isa = XCBuildConfiguration; 840 | buildSettings = { 841 | COMBINE_HIDPI_IMAGES = YES; 842 | DYLIB_COMPATIBILITY_VERSION = 1; 843 | DYLIB_CURRENT_VERSION = 1; 844 | FRAMEWORK_VERSION = A; 845 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 846 | GCC_PREFIX_HEADER = "Selenium/Selenium-Prefix.pch"; 847 | INFOPLIST_FILE = "Selenium/Selenium-Info.plist"; 848 | INSTALL_PATH = "@loader_path/../Frameworks"; 849 | MACOSX_DEPLOYMENT_TARGET = 10.8; 850 | PRODUCT_NAME = "$(TARGET_NAME)"; 851 | SDKROOT = macosx; 852 | WRAPPER_EXTENSION = framework; 853 | }; 854 | name = Release; 855 | }; 856 | 36BB382F16F268C2003A46FD /* Debug */ = { 857 | isa = XCBuildConfiguration; 858 | buildSettings = { 859 | COMBINE_HIDPI_IMAGES = YES; 860 | FRAMEWORK_SEARCH_PATHS = ( 861 | "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", 862 | "$(inherited)", 863 | ); 864 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 865 | GCC_PREFIX_HEADER = "Selenium/Selenium-Prefix.pch"; 866 | INFOPLIST_FILE = "SeleniumTests/SeleniumTests-Info.plist"; 867 | PRODUCT_NAME = "$(TARGET_NAME)"; 868 | }; 869 | name = Debug; 870 | }; 871 | 36BB383016F268C2003A46FD /* Release */ = { 872 | isa = XCBuildConfiguration; 873 | buildSettings = { 874 | COMBINE_HIDPI_IMAGES = YES; 875 | FRAMEWORK_SEARCH_PATHS = ( 876 | "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", 877 | "$(inherited)", 878 | ); 879 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 880 | GCC_PREFIX_HEADER = "Selenium/Selenium-Prefix.pch"; 881 | INFOPLIST_FILE = "SeleniumTests/SeleniumTests-Info.plist"; 882 | PRODUCT_NAME = "$(TARGET_NAME)"; 883 | }; 884 | name = Release; 885 | }; 886 | C77BC84019FFC16B008979E5 /* Debug */ = { 887 | isa = XCBuildConfiguration; 888 | buildSettings = { 889 | CLANG_ENABLE_MODULES = YES; 890 | CLANG_WARN_BOOL_CONVERSION = YES; 891 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 892 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 893 | CLANG_WARN_UNREACHABLE_CODE = YES; 894 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 895 | CURRENT_PROJECT_VERSION = 1; 896 | DEFINES_MODULE = YES; 897 | DYLIB_COMPATIBILITY_VERSION = 1; 898 | DYLIB_CURRENT_VERSION = 1; 899 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 900 | ENABLE_STRICT_OBJC_MSGSEND = YES; 901 | GCC_PREPROCESSOR_DEFINITIONS = ( 902 | "DEBUG=1", 903 | "$(inherited)", 904 | ); 905 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 906 | GCC_WARN_UNDECLARED_SELECTOR = YES; 907 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 908 | GCC_WARN_UNUSED_FUNCTION = YES; 909 | INFOPLIST_FILE = SeleniumForiOS/Info.plist; 910 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 911 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 912 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 913 | MTL_ENABLE_DEBUG_INFO = YES; 914 | PRODUCT_NAME = "$(TARGET_NAME)"; 915 | SDKROOT = iphoneos; 916 | SKIP_INSTALL = YES; 917 | TARGETED_DEVICE_FAMILY = "1,2"; 918 | VERSIONING_SYSTEM = "apple-generic"; 919 | VERSION_INFO_PREFIX = ""; 920 | }; 921 | name = Debug; 922 | }; 923 | C77BC84119FFC16B008979E5 /* Release */ = { 924 | isa = XCBuildConfiguration; 925 | buildSettings = { 926 | CLANG_ENABLE_MODULES = YES; 927 | CLANG_WARN_BOOL_CONVERSION = YES; 928 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 929 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 930 | CLANG_WARN_UNREACHABLE_CODE = YES; 931 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 932 | CURRENT_PROJECT_VERSION = 1; 933 | DEFINES_MODULE = YES; 934 | DYLIB_COMPATIBILITY_VERSION = 1; 935 | DYLIB_CURRENT_VERSION = 1; 936 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 937 | ENABLE_NS_ASSERTIONS = NO; 938 | ENABLE_STRICT_OBJC_MSGSEND = YES; 939 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 940 | GCC_WARN_UNDECLARED_SELECTOR = YES; 941 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 942 | GCC_WARN_UNUSED_FUNCTION = YES; 943 | INFOPLIST_FILE = SeleniumForiOS/Info.plist; 944 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 945 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 946 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 947 | MTL_ENABLE_DEBUG_INFO = NO; 948 | PRODUCT_NAME = "$(TARGET_NAME)"; 949 | SDKROOT = iphoneos; 950 | SKIP_INSTALL = YES; 951 | TARGETED_DEVICE_FAMILY = "1,2"; 952 | VALIDATE_PRODUCT = YES; 953 | VERSIONING_SYSTEM = "apple-generic"; 954 | VERSION_INFO_PREFIX = ""; 955 | }; 956 | name = Release; 957 | }; 958 | C77BC84219FFC16B008979E5 /* Debug */ = { 959 | isa = XCBuildConfiguration; 960 | buildSettings = { 961 | CLANG_ENABLE_MODULES = YES; 962 | CLANG_WARN_BOOL_CONVERSION = YES; 963 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 964 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 965 | CLANG_WARN_UNREACHABLE_CODE = YES; 966 | ENABLE_STRICT_OBJC_MSGSEND = YES; 967 | FRAMEWORK_SEARCH_PATHS = ( 968 | "$(SDKROOT)/Developer/Library/Frameworks", 969 | "$(inherited)", 970 | ); 971 | GCC_PREPROCESSOR_DEFINITIONS = ( 972 | "DEBUG=1", 973 | "$(inherited)", 974 | ); 975 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 976 | GCC_WARN_UNDECLARED_SELECTOR = YES; 977 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 978 | GCC_WARN_UNUSED_FUNCTION = YES; 979 | INFOPLIST_FILE = SeleniumForiOSTests/Info.plist; 980 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 981 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 982 | MTL_ENABLE_DEBUG_INFO = YES; 983 | PRODUCT_NAME = "$(TARGET_NAME)"; 984 | SDKROOT = iphoneos; 985 | }; 986 | name = Debug; 987 | }; 988 | C77BC84319FFC16B008979E5 /* Release */ = { 989 | isa = XCBuildConfiguration; 990 | buildSettings = { 991 | CLANG_ENABLE_MODULES = YES; 992 | CLANG_WARN_BOOL_CONVERSION = YES; 993 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 994 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 995 | CLANG_WARN_UNREACHABLE_CODE = YES; 996 | ENABLE_NS_ASSERTIONS = NO; 997 | ENABLE_STRICT_OBJC_MSGSEND = YES; 998 | FRAMEWORK_SEARCH_PATHS = ( 999 | "$(SDKROOT)/Developer/Library/Frameworks", 1000 | "$(inherited)", 1001 | ); 1002 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1003 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1004 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1005 | GCC_WARN_UNUSED_FUNCTION = YES; 1006 | INFOPLIST_FILE = SeleniumForiOSTests/Info.plist; 1007 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 1008 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1009 | MTL_ENABLE_DEBUG_INFO = NO; 1010 | PRODUCT_NAME = "$(TARGET_NAME)"; 1011 | SDKROOT = iphoneos; 1012 | VALIDATE_PRODUCT = YES; 1013 | }; 1014 | name = Release; 1015 | }; 1016 | DB922ECD18BC803C005C2F1E /* Debug */ = { 1017 | isa = XCBuildConfiguration; 1018 | buildSettings = { 1019 | COMBINE_HIDPI_IMAGES = YES; 1020 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 1021 | GCC_PREFIX_HEADER = "Selenium/Selenium-Prefix.pch"; 1022 | PRODUCT_NAME = "$(TARGET_NAME)"; 1023 | }; 1024 | name = Debug; 1025 | }; 1026 | DB922ECE18BC803C005C2F1E /* Release */ = { 1027 | isa = XCBuildConfiguration; 1028 | buildSettings = { 1029 | COMBINE_HIDPI_IMAGES = YES; 1030 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 1031 | GCC_PREFIX_HEADER = "Selenium/Selenium-Prefix.pch"; 1032 | PRODUCT_NAME = "$(TARGET_NAME)"; 1033 | }; 1034 | name = Release; 1035 | }; 1036 | /* End XCBuildConfiguration section */ 1037 | 1038 | /* Begin XCConfigurationList section */ 1039 | 36BB37FB16F268C2003A46FD /* Build configuration list for PBXProject "Selenium" */ = { 1040 | isa = XCConfigurationList; 1041 | buildConfigurations = ( 1042 | 36BB382916F268C2003A46FD /* Debug */, 1043 | 36BB382A16F268C2003A46FD /* Release */, 1044 | ); 1045 | defaultConfigurationIsVisible = 0; 1046 | defaultConfigurationName = Release; 1047 | }; 1048 | 36BB382B16F268C2003A46FD /* Build configuration list for PBXNativeTarget "Selenium" */ = { 1049 | isa = XCConfigurationList; 1050 | buildConfigurations = ( 1051 | 36BB382C16F268C2003A46FD /* Debug */, 1052 | 36BB382D16F268C2003A46FD /* Release */, 1053 | ); 1054 | defaultConfigurationIsVisible = 0; 1055 | defaultConfigurationName = Release; 1056 | }; 1057 | 36BB382E16F268C2003A46FD /* Build configuration list for PBXNativeTarget "SeleniumTests" */ = { 1058 | isa = XCConfigurationList; 1059 | buildConfigurations = ( 1060 | 36BB382F16F268C2003A46FD /* Debug */, 1061 | 36BB383016F268C2003A46FD /* Release */, 1062 | ); 1063 | defaultConfigurationIsVisible = 0; 1064 | defaultConfigurationName = Release; 1065 | }; 1066 | C77BC84419FFC16B008979E5 /* Build configuration list for PBXNativeTarget "SeleniumForiOS" */ = { 1067 | isa = XCConfigurationList; 1068 | buildConfigurations = ( 1069 | C77BC84019FFC16B008979E5 /* Debug */, 1070 | C77BC84119FFC16B008979E5 /* Release */, 1071 | ); 1072 | defaultConfigurationIsVisible = 0; 1073 | defaultConfigurationName = Release; 1074 | }; 1075 | C77BC84519FFC16B008979E5 /* Build configuration list for PBXNativeTarget "SeleniumForiOSTests" */ = { 1076 | isa = XCConfigurationList; 1077 | buildConfigurations = ( 1078 | C77BC84219FFC16B008979E5 /* Debug */, 1079 | C77BC84319FFC16B008979E5 /* Release */, 1080 | ); 1081 | defaultConfigurationIsVisible = 0; 1082 | defaultConfigurationName = Release; 1083 | }; 1084 | DB922ED118BC803C005C2F1E /* Build configuration list for PBXNativeTarget "libSelenium" */ = { 1085 | isa = XCConfigurationList; 1086 | buildConfigurations = ( 1087 | DB922ECD18BC803C005C2F1E /* Debug */, 1088 | DB922ECE18BC803C005C2F1E /* Release */, 1089 | ); 1090 | defaultConfigurationIsVisible = 0; 1091 | defaultConfigurationName = Release; 1092 | }; 1093 | /* End XCConfigurationList section */ 1094 | }; 1095 | rootObject = 36BB37F816F268C2003A46FD /* Project object */; 1096 | } 1097 | --------------------------------------------------------------------------------