├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md └── SeleniumSwift ├── SeleniumSwift.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── SeleniumSwift ├── By.swift ├── Capabilities.swift ├── Enums.swift ├── Info.plist ├── SeleniumSwift.h └── Status.swift └── SeleniumSwiftTests ├── Info.plist └── SeleniumSwiftTests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | # Pods/ 27 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "submodules/selenium-objective-c"] 2 | path = submodules/selenium-objective-c 3 | url = https://github.com/appium/selenium-objective-c 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # selenium-swift 2 | selenium bindings for the swift programming language 3 | -------------------------------------------------------------------------------- /SeleniumSwift/SeleniumSwift.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C7189C831A6D7AA400FB7481 /* Selenium.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7189C781A6D7A8E00FB7481 /* Selenium.framework */; }; 11 | C7ABBE5B1A8D1E71005F0EB7 /* Enums.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7ABBE5A1A8D1E71005F0EB7 /* Enums.swift */; }; 12 | C7EF6E8C1A6D76BA00692A96 /* SeleniumSwift.h in Headers */ = {isa = PBXBuildFile; fileRef = C7EF6E8B1A6D76BA00692A96 /* SeleniumSwift.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | C7EF6E921A6D76BA00692A96 /* SeleniumSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7EF6E861A6D76BA00692A96 /* SeleniumSwift.framework */; }; 14 | C7EF6E991A6D76BA00692A96 /* SeleniumSwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7EF6E981A6D76BA00692A96 /* SeleniumSwiftTests.swift */; }; 15 | C7EF6EA81A6D76EC00692A96 /* Status.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7EF6EA71A6D76EC00692A96 /* Status.swift */; }; 16 | C7F10FCA1A85680A0030F026 /* By.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7F10FC91A85680A0030F026 /* By.swift */; }; 17 | C7F10FCC1A856BC30030F026 /* Capabilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7F10FCB1A856BC30030F026 /* Capabilities.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | C7189C771A6D7A8E00FB7481 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = C7EF6EAC1A6D79DF00692A96 /* Selenium.xcodeproj */; 24 | proxyType = 2; 25 | remoteGlobalIDString = 36BB380116F268C2003A46FD; 26 | remoteInfo = Selenium; 27 | }; 28 | C7189C791A6D7A8E00FB7481 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = C7EF6EAC1A6D79DF00692A96 /* Selenium.xcodeproj */; 31 | proxyType = 2; 32 | remoteGlobalIDString = 36BB381916F268C2003A46FD; 33 | remoteInfo = SeleniumTests; 34 | }; 35 | C7189C7B1A6D7A8E00FB7481 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = C7EF6EAC1A6D79DF00692A96 /* Selenium.xcodeproj */; 38 | proxyType = 2; 39 | remoteGlobalIDString = DB922EB218BC803C005C2F1E; 40 | remoteInfo = libSelenium; 41 | }; 42 | C7189C7D1A6D7A8E00FB7481 /* PBXContainerItemProxy */ = { 43 | isa = PBXContainerItemProxy; 44 | containerPortal = C7EF6EAC1A6D79DF00692A96 /* Selenium.xcodeproj */; 45 | proxyType = 2; 46 | remoteGlobalIDString = C77BC82D19FFC16B008979E5; 47 | remoteInfo = SeleniumForiOS; 48 | }; 49 | C7189C7F1A6D7A8E00FB7481 /* PBXContainerItemProxy */ = { 50 | isa = PBXContainerItemProxy; 51 | containerPortal = C7EF6EAC1A6D79DF00692A96 /* Selenium.xcodeproj */; 52 | proxyType = 2; 53 | remoteGlobalIDString = C77BC83719FFC16B008979E5; 54 | remoteInfo = SeleniumForiOSTests; 55 | }; 56 | C7189C811A6D7A9300FB7481 /* PBXContainerItemProxy */ = { 57 | isa = PBXContainerItemProxy; 58 | containerPortal = C7EF6EAC1A6D79DF00692A96 /* Selenium.xcodeproj */; 59 | proxyType = 1; 60 | remoteGlobalIDString = 36BB380016F268C2003A46FD; 61 | remoteInfo = Selenium; 62 | }; 63 | C7EF6E931A6D76BA00692A96 /* PBXContainerItemProxy */ = { 64 | isa = PBXContainerItemProxy; 65 | containerPortal = C7EF6E7D1A6D76BA00692A96 /* Project object */; 66 | proxyType = 1; 67 | remoteGlobalIDString = C7EF6E851A6D76BA00692A96; 68 | remoteInfo = SeleniumSwift; 69 | }; 70 | /* End PBXContainerItemProxy section */ 71 | 72 | /* Begin PBXFileReference section */ 73 | C7ABBE5A1A8D1E71005F0EB7 /* Enums.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Enums.swift; sourceTree = ""; }; 74 | C7EF6E861A6D76BA00692A96 /* SeleniumSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SeleniumSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | C7EF6E8A1A6D76BA00692A96 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 76 | C7EF6E8B1A6D76BA00692A96 /* SeleniumSwift.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SeleniumSwift.h; sourceTree = ""; }; 77 | C7EF6E911A6D76BA00692A96 /* SeleniumSwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SeleniumSwiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 78 | C7EF6E971A6D76BA00692A96 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 79 | C7EF6E981A6D76BA00692A96 /* SeleniumSwiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SeleniumSwiftTests.swift; sourceTree = ""; }; 80 | C7EF6EA71A6D76EC00692A96 /* Status.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Status.swift; sourceTree = ""; }; 81 | C7EF6EAC1A6D79DF00692A96 /* Selenium.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Selenium.xcodeproj; path = "../submodules/selenium-objective-c/Selenium/Selenium.xcodeproj"; sourceTree = ""; }; 82 | C7F10FC91A85680A0030F026 /* By.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = By.swift; sourceTree = ""; }; 83 | C7F10FCB1A856BC30030F026 /* Capabilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Capabilities.swift; sourceTree = ""; }; 84 | /* End PBXFileReference section */ 85 | 86 | /* Begin PBXFrameworksBuildPhase section */ 87 | C7EF6E821A6D76BA00692A96 /* Frameworks */ = { 88 | isa = PBXFrameworksBuildPhase; 89 | buildActionMask = 2147483647; 90 | files = ( 91 | C7189C831A6D7AA400FB7481 /* Selenium.framework in Frameworks */, 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | C7EF6E8E1A6D76BA00692A96 /* Frameworks */ = { 96 | isa = PBXFrameworksBuildPhase; 97 | buildActionMask = 2147483647; 98 | files = ( 99 | C7EF6E921A6D76BA00692A96 /* SeleniumSwift.framework in Frameworks */, 100 | ); 101 | runOnlyForDeploymentPostprocessing = 0; 102 | }; 103 | /* End PBXFrameworksBuildPhase section */ 104 | 105 | /* Begin PBXGroup section */ 106 | C7189C701A6D7A8E00FB7481 /* Products */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | C7189C781A6D7A8E00FB7481 /* Selenium.framework */, 110 | C7189C7A1A6D7A8E00FB7481 /* SeleniumTests.xctest */, 111 | C7189C7C1A6D7A8E00FB7481 /* liblibSelenium.a */, 112 | C7189C7E1A6D7A8E00FB7481 /* SeleniumForiOS.framework */, 113 | C7189C801A6D7A8E00FB7481 /* SeleniumForiOSTests.xctest */, 114 | ); 115 | name = Products; 116 | sourceTree = ""; 117 | }; 118 | C7EF6E7C1A6D76BA00692A96 = { 119 | isa = PBXGroup; 120 | children = ( 121 | C7EF6E881A6D76BA00692A96 /* SeleniumSwift */, 122 | C7EF6E951A6D76BA00692A96 /* SeleniumSwiftTests */, 123 | C7EF6E871A6D76BA00692A96 /* Products */, 124 | C7EF6EAC1A6D79DF00692A96 /* Selenium.xcodeproj */, 125 | ); 126 | sourceTree = ""; 127 | }; 128 | C7EF6E871A6D76BA00692A96 /* Products */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | C7EF6E861A6D76BA00692A96 /* SeleniumSwift.framework */, 132 | C7EF6E911A6D76BA00692A96 /* SeleniumSwiftTests.xctest */, 133 | ); 134 | name = Products; 135 | sourceTree = ""; 136 | }; 137 | C7EF6E881A6D76BA00692A96 /* SeleniumSwift */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | C7F10FC41A8567C00030F026 /* Types */, 141 | C7EF6E8B1A6D76BA00692A96 /* SeleniumSwift.h */, 142 | C7EF6E891A6D76BA00692A96 /* Supporting Files */, 143 | ); 144 | path = SeleniumSwift; 145 | sourceTree = ""; 146 | }; 147 | C7EF6E891A6D76BA00692A96 /* Supporting Files */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | C7EF6E8A1A6D76BA00692A96 /* Info.plist */, 151 | ); 152 | name = "Supporting Files"; 153 | sourceTree = ""; 154 | }; 155 | C7EF6E951A6D76BA00692A96 /* SeleniumSwiftTests */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | C7EF6E981A6D76BA00692A96 /* SeleniumSwiftTests.swift */, 159 | C7EF6E961A6D76BA00692A96 /* Supporting Files */, 160 | ); 161 | path = SeleniumSwiftTests; 162 | sourceTree = ""; 163 | }; 164 | C7EF6E961A6D76BA00692A96 /* Supporting Files */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | C7EF6E971A6D76BA00692A96 /* Info.plist */, 168 | ); 169 | name = "Supporting Files"; 170 | sourceTree = ""; 171 | }; 172 | C7F10FC41A8567C00030F026 /* Types */ = { 173 | isa = PBXGroup; 174 | children = ( 175 | C7F10FC91A85680A0030F026 /* By.swift */, 176 | C7F10FCB1A856BC30030F026 /* Capabilities.swift */, 177 | C7ABBE5A1A8D1E71005F0EB7 /* Enums.swift */, 178 | C7EF6EA71A6D76EC00692A96 /* Status.swift */, 179 | ); 180 | name = Types; 181 | sourceTree = ""; 182 | }; 183 | /* End PBXGroup section */ 184 | 185 | /* Begin PBXHeadersBuildPhase section */ 186 | C7EF6E831A6D76BA00692A96 /* Headers */ = { 187 | isa = PBXHeadersBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | C7EF6E8C1A6D76BA00692A96 /* SeleniumSwift.h in Headers */, 191 | ); 192 | runOnlyForDeploymentPostprocessing = 0; 193 | }; 194 | /* End PBXHeadersBuildPhase section */ 195 | 196 | /* Begin PBXNativeTarget section */ 197 | C7EF6E851A6D76BA00692A96 /* SeleniumSwift */ = { 198 | isa = PBXNativeTarget; 199 | buildConfigurationList = C7EF6E9C1A6D76BA00692A96 /* Build configuration list for PBXNativeTarget "SeleniumSwift" */; 200 | buildPhases = ( 201 | C7EF6E811A6D76BA00692A96 /* Sources */, 202 | C7EF6E821A6D76BA00692A96 /* Frameworks */, 203 | C7EF6E831A6D76BA00692A96 /* Headers */, 204 | C7EF6E841A6D76BA00692A96 /* Resources */, 205 | ); 206 | buildRules = ( 207 | ); 208 | dependencies = ( 209 | C7189C821A6D7A9300FB7481 /* PBXTargetDependency */, 210 | ); 211 | name = SeleniumSwift; 212 | productName = SeleniumSwift; 213 | productReference = C7EF6E861A6D76BA00692A96 /* SeleniumSwift.framework */; 214 | productType = "com.apple.product-type.framework"; 215 | }; 216 | C7EF6E901A6D76BA00692A96 /* SeleniumSwiftTests */ = { 217 | isa = PBXNativeTarget; 218 | buildConfigurationList = C7EF6E9F1A6D76BA00692A96 /* Build configuration list for PBXNativeTarget "SeleniumSwiftTests" */; 219 | buildPhases = ( 220 | C7EF6E8D1A6D76BA00692A96 /* Sources */, 221 | C7EF6E8E1A6D76BA00692A96 /* Frameworks */, 222 | C7EF6E8F1A6D76BA00692A96 /* Resources */, 223 | ); 224 | buildRules = ( 225 | ); 226 | dependencies = ( 227 | C7EF6E941A6D76BA00692A96 /* PBXTargetDependency */, 228 | ); 229 | name = SeleniumSwiftTests; 230 | productName = SeleniumSwiftTests; 231 | productReference = C7EF6E911A6D76BA00692A96 /* SeleniumSwiftTests.xctest */; 232 | productType = "com.apple.product-type.bundle.unit-test"; 233 | }; 234 | /* End PBXNativeTarget section */ 235 | 236 | /* Begin PBXProject section */ 237 | C7EF6E7D1A6D76BA00692A96 /* Project object */ = { 238 | isa = PBXProject; 239 | attributes = { 240 | LastUpgradeCheck = 0620; 241 | ORGANIZATIONNAME = Appium; 242 | TargetAttributes = { 243 | C7EF6E851A6D76BA00692A96 = { 244 | CreatedOnToolsVersion = 6.2; 245 | }; 246 | C7EF6E901A6D76BA00692A96 = { 247 | CreatedOnToolsVersion = 6.2; 248 | }; 249 | }; 250 | }; 251 | buildConfigurationList = C7EF6E801A6D76BA00692A96 /* Build configuration list for PBXProject "SeleniumSwift" */; 252 | compatibilityVersion = "Xcode 3.2"; 253 | developmentRegion = English; 254 | hasScannedForEncodings = 0; 255 | knownRegions = ( 256 | en, 257 | ); 258 | mainGroup = C7EF6E7C1A6D76BA00692A96; 259 | productRefGroup = C7EF6E871A6D76BA00692A96 /* Products */; 260 | projectDirPath = ""; 261 | projectReferences = ( 262 | { 263 | ProductGroup = C7189C701A6D7A8E00FB7481 /* Products */; 264 | ProjectRef = C7EF6EAC1A6D79DF00692A96 /* Selenium.xcodeproj */; 265 | }, 266 | ); 267 | projectRoot = ""; 268 | targets = ( 269 | C7EF6E851A6D76BA00692A96 /* SeleniumSwift */, 270 | C7EF6E901A6D76BA00692A96 /* SeleniumSwiftTests */, 271 | ); 272 | }; 273 | /* End PBXProject section */ 274 | 275 | /* Begin PBXReferenceProxy section */ 276 | C7189C781A6D7A8E00FB7481 /* Selenium.framework */ = { 277 | isa = PBXReferenceProxy; 278 | fileType = wrapper.framework; 279 | path = Selenium.framework; 280 | remoteRef = C7189C771A6D7A8E00FB7481 /* PBXContainerItemProxy */; 281 | sourceTree = BUILT_PRODUCTS_DIR; 282 | }; 283 | C7189C7A1A6D7A8E00FB7481 /* SeleniumTests.xctest */ = { 284 | isa = PBXReferenceProxy; 285 | fileType = wrapper.cfbundle; 286 | path = SeleniumTests.xctest; 287 | remoteRef = C7189C791A6D7A8E00FB7481 /* PBXContainerItemProxy */; 288 | sourceTree = BUILT_PRODUCTS_DIR; 289 | }; 290 | C7189C7C1A6D7A8E00FB7481 /* liblibSelenium.a */ = { 291 | isa = PBXReferenceProxy; 292 | fileType = archive.ar; 293 | path = liblibSelenium.a; 294 | remoteRef = C7189C7B1A6D7A8E00FB7481 /* PBXContainerItemProxy */; 295 | sourceTree = BUILT_PRODUCTS_DIR; 296 | }; 297 | C7189C7E1A6D7A8E00FB7481 /* SeleniumForiOS.framework */ = { 298 | isa = PBXReferenceProxy; 299 | fileType = wrapper.framework; 300 | path = SeleniumForiOS.framework; 301 | remoteRef = C7189C7D1A6D7A8E00FB7481 /* PBXContainerItemProxy */; 302 | sourceTree = BUILT_PRODUCTS_DIR; 303 | }; 304 | C7189C801A6D7A8E00FB7481 /* SeleniumForiOSTests.xctest */ = { 305 | isa = PBXReferenceProxy; 306 | fileType = wrapper.cfbundle; 307 | path = SeleniumForiOSTests.xctest; 308 | remoteRef = C7189C7F1A6D7A8E00FB7481 /* PBXContainerItemProxy */; 309 | sourceTree = BUILT_PRODUCTS_DIR; 310 | }; 311 | /* End PBXReferenceProxy section */ 312 | 313 | /* Begin PBXResourcesBuildPhase section */ 314 | C7EF6E841A6D76BA00692A96 /* Resources */ = { 315 | isa = PBXResourcesBuildPhase; 316 | buildActionMask = 2147483647; 317 | files = ( 318 | ); 319 | runOnlyForDeploymentPostprocessing = 0; 320 | }; 321 | C7EF6E8F1A6D76BA00692A96 /* Resources */ = { 322 | isa = PBXResourcesBuildPhase; 323 | buildActionMask = 2147483647; 324 | files = ( 325 | ); 326 | runOnlyForDeploymentPostprocessing = 0; 327 | }; 328 | /* End PBXResourcesBuildPhase section */ 329 | 330 | /* Begin PBXSourcesBuildPhase section */ 331 | C7EF6E811A6D76BA00692A96 /* Sources */ = { 332 | isa = PBXSourcesBuildPhase; 333 | buildActionMask = 2147483647; 334 | files = ( 335 | C7F10FCA1A85680A0030F026 /* By.swift in Sources */, 336 | C7EF6EA81A6D76EC00692A96 /* Status.swift in Sources */, 337 | C7ABBE5B1A8D1E71005F0EB7 /* Enums.swift in Sources */, 338 | C7F10FCC1A856BC30030F026 /* Capabilities.swift in Sources */, 339 | ); 340 | runOnlyForDeploymentPostprocessing = 0; 341 | }; 342 | C7EF6E8D1A6D76BA00692A96 /* Sources */ = { 343 | isa = PBXSourcesBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | C7EF6E991A6D76BA00692A96 /* SeleniumSwiftTests.swift in Sources */, 347 | ); 348 | runOnlyForDeploymentPostprocessing = 0; 349 | }; 350 | /* End PBXSourcesBuildPhase section */ 351 | 352 | /* Begin PBXTargetDependency section */ 353 | C7189C821A6D7A9300FB7481 /* PBXTargetDependency */ = { 354 | isa = PBXTargetDependency; 355 | name = Selenium; 356 | targetProxy = C7189C811A6D7A9300FB7481 /* PBXContainerItemProxy */; 357 | }; 358 | C7EF6E941A6D76BA00692A96 /* PBXTargetDependency */ = { 359 | isa = PBXTargetDependency; 360 | target = C7EF6E851A6D76BA00692A96 /* SeleniumSwift */; 361 | targetProxy = C7EF6E931A6D76BA00692A96 /* PBXContainerItemProxy */; 362 | }; 363 | /* End PBXTargetDependency section */ 364 | 365 | /* Begin XCBuildConfiguration section */ 366 | C7EF6E9A1A6D76BA00692A96 /* Debug */ = { 367 | isa = XCBuildConfiguration; 368 | buildSettings = { 369 | ALWAYS_SEARCH_USER_PATHS = NO; 370 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 371 | CLANG_CXX_LIBRARY = "libc++"; 372 | CLANG_ENABLE_MODULES = YES; 373 | CLANG_ENABLE_OBJC_ARC = YES; 374 | CLANG_WARN_BOOL_CONVERSION = YES; 375 | CLANG_WARN_CONSTANT_CONVERSION = YES; 376 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 377 | CLANG_WARN_EMPTY_BODY = YES; 378 | CLANG_WARN_ENUM_CONVERSION = YES; 379 | CLANG_WARN_INT_CONVERSION = YES; 380 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 381 | CLANG_WARN_UNREACHABLE_CODE = YES; 382 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 383 | COPY_PHASE_STRIP = NO; 384 | CURRENT_PROJECT_VERSION = 1; 385 | ENABLE_STRICT_OBJC_MSGSEND = YES; 386 | GCC_C_LANGUAGE_STANDARD = gnu99; 387 | GCC_DYNAMIC_NO_PIC = NO; 388 | GCC_OPTIMIZATION_LEVEL = 0; 389 | GCC_PREPROCESSOR_DEFINITIONS = ( 390 | "DEBUG=1", 391 | "$(inherited)", 392 | ); 393 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 394 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 395 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 396 | GCC_WARN_UNDECLARED_SELECTOR = YES; 397 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 398 | GCC_WARN_UNUSED_FUNCTION = YES; 399 | GCC_WARN_UNUSED_VARIABLE = YES; 400 | MACOSX_DEPLOYMENT_TARGET = 10.10; 401 | MTL_ENABLE_DEBUG_INFO = YES; 402 | ONLY_ACTIVE_ARCH = YES; 403 | SDKROOT = macosx; 404 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 405 | VERSIONING_SYSTEM = "apple-generic"; 406 | VERSION_INFO_PREFIX = ""; 407 | }; 408 | name = Debug; 409 | }; 410 | C7EF6E9B1A6D76BA00692A96 /* Release */ = { 411 | isa = XCBuildConfiguration; 412 | buildSettings = { 413 | ALWAYS_SEARCH_USER_PATHS = NO; 414 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 415 | CLANG_CXX_LIBRARY = "libc++"; 416 | CLANG_ENABLE_MODULES = YES; 417 | CLANG_ENABLE_OBJC_ARC = YES; 418 | CLANG_WARN_BOOL_CONVERSION = YES; 419 | CLANG_WARN_CONSTANT_CONVERSION = YES; 420 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 421 | CLANG_WARN_EMPTY_BODY = YES; 422 | CLANG_WARN_ENUM_CONVERSION = YES; 423 | CLANG_WARN_INT_CONVERSION = YES; 424 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 425 | CLANG_WARN_UNREACHABLE_CODE = YES; 426 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 427 | COPY_PHASE_STRIP = NO; 428 | CURRENT_PROJECT_VERSION = 1; 429 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 430 | ENABLE_NS_ASSERTIONS = NO; 431 | ENABLE_STRICT_OBJC_MSGSEND = YES; 432 | GCC_C_LANGUAGE_STANDARD = gnu99; 433 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 434 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 435 | GCC_WARN_UNDECLARED_SELECTOR = YES; 436 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 437 | GCC_WARN_UNUSED_FUNCTION = YES; 438 | GCC_WARN_UNUSED_VARIABLE = YES; 439 | MACOSX_DEPLOYMENT_TARGET = 10.10; 440 | MTL_ENABLE_DEBUG_INFO = NO; 441 | SDKROOT = macosx; 442 | VERSIONING_SYSTEM = "apple-generic"; 443 | VERSION_INFO_PREFIX = ""; 444 | }; 445 | name = Release; 446 | }; 447 | C7EF6E9D1A6D76BA00692A96 /* Debug */ = { 448 | isa = XCBuildConfiguration; 449 | buildSettings = { 450 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; 451 | CLANG_ENABLE_MODULES = YES; 452 | COMBINE_HIDPI_IMAGES = YES; 453 | DEFINES_MODULE = YES; 454 | DYLIB_COMPATIBILITY_VERSION = 1; 455 | DYLIB_CURRENT_VERSION = 1; 456 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 457 | FRAMEWORK_SEARCH_PATHS = ( 458 | "$(inherited)", 459 | "$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/SeleniumSwift-blrnzinzjwxterebxqrrmuboyejy/Build/Products/Debug", 460 | ); 461 | FRAMEWORK_VERSION = A; 462 | INFOPLIST_FILE = SeleniumSwift/Info.plist; 463 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 464 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 465 | MODULE_NAME = Selenium; 466 | MODULE_VERSION = 1.0; 467 | PRODUCT_NAME = "$(TARGET_NAME)"; 468 | SKIP_INSTALL = YES; 469 | SWIFT_INSTALL_OBJC_HEADER = NO; 470 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 471 | }; 472 | name = Debug; 473 | }; 474 | C7EF6E9E1A6D76BA00692A96 /* Release */ = { 475 | isa = XCBuildConfiguration; 476 | buildSettings = { 477 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; 478 | CLANG_ENABLE_MODULES = YES; 479 | COMBINE_HIDPI_IMAGES = YES; 480 | DEFINES_MODULE = YES; 481 | DYLIB_COMPATIBILITY_VERSION = 1; 482 | DYLIB_CURRENT_VERSION = 1; 483 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 484 | FRAMEWORK_SEARCH_PATHS = ( 485 | "$(inherited)", 486 | "$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/SeleniumSwift-blrnzinzjwxterebxqrrmuboyejy/Build/Products/Debug", 487 | ); 488 | FRAMEWORK_VERSION = A; 489 | INFOPLIST_FILE = SeleniumSwift/Info.plist; 490 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 491 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 492 | MODULE_NAME = Selenium; 493 | MODULE_VERSION = 1.0; 494 | PRODUCT_NAME = "$(TARGET_NAME)"; 495 | SKIP_INSTALL = YES; 496 | SWIFT_INSTALL_OBJC_HEADER = NO; 497 | }; 498 | name = Release; 499 | }; 500 | C7EF6EA01A6D76BA00692A96 /* Debug */ = { 501 | isa = XCBuildConfiguration; 502 | buildSettings = { 503 | COMBINE_HIDPI_IMAGES = YES; 504 | FRAMEWORK_SEARCH_PATHS = ( 505 | "$(DEVELOPER_FRAMEWORKS_DIR)", 506 | "$(inherited)", 507 | ); 508 | GCC_PREPROCESSOR_DEFINITIONS = ( 509 | "DEBUG=1", 510 | "$(inherited)", 511 | ); 512 | INFOPLIST_FILE = SeleniumSwiftTests/Info.plist; 513 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 514 | PRODUCT_NAME = "$(TARGET_NAME)"; 515 | }; 516 | name = Debug; 517 | }; 518 | C7EF6EA11A6D76BA00692A96 /* Release */ = { 519 | isa = XCBuildConfiguration; 520 | buildSettings = { 521 | COMBINE_HIDPI_IMAGES = YES; 522 | FRAMEWORK_SEARCH_PATHS = ( 523 | "$(DEVELOPER_FRAMEWORKS_DIR)", 524 | "$(inherited)", 525 | ); 526 | INFOPLIST_FILE = SeleniumSwiftTests/Info.plist; 527 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 528 | PRODUCT_NAME = "$(TARGET_NAME)"; 529 | }; 530 | name = Release; 531 | }; 532 | /* End XCBuildConfiguration section */ 533 | 534 | /* Begin XCConfigurationList section */ 535 | C7EF6E801A6D76BA00692A96 /* Build configuration list for PBXProject "SeleniumSwift" */ = { 536 | isa = XCConfigurationList; 537 | buildConfigurations = ( 538 | C7EF6E9A1A6D76BA00692A96 /* Debug */, 539 | C7EF6E9B1A6D76BA00692A96 /* Release */, 540 | ); 541 | defaultConfigurationIsVisible = 0; 542 | defaultConfigurationName = Release; 543 | }; 544 | C7EF6E9C1A6D76BA00692A96 /* Build configuration list for PBXNativeTarget "SeleniumSwift" */ = { 545 | isa = XCConfigurationList; 546 | buildConfigurations = ( 547 | C7EF6E9D1A6D76BA00692A96 /* Debug */, 548 | C7EF6E9E1A6D76BA00692A96 /* Release */, 549 | ); 550 | defaultConfigurationIsVisible = 0; 551 | defaultConfigurationName = Release; 552 | }; 553 | C7EF6E9F1A6D76BA00692A96 /* Build configuration list for PBXNativeTarget "SeleniumSwiftTests" */ = { 554 | isa = XCConfigurationList; 555 | buildConfigurations = ( 556 | C7EF6EA01A6D76BA00692A96 /* Debug */, 557 | C7EF6EA11A6D76BA00692A96 /* Release */, 558 | ); 559 | defaultConfigurationIsVisible = 0; 560 | defaultConfigurationName = Release; 561 | }; 562 | /* End XCConfigurationList section */ 563 | }; 564 | rootObject = C7EF6E7D1A6D76BA00692A96 /* Project object */; 565 | } 566 | -------------------------------------------------------------------------------- /SeleniumSwift/SeleniumSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SeleniumSwift/SeleniumSwift/By.swift: -------------------------------------------------------------------------------- 1 | class By { 2 | var locationStrategy: String? 3 | var value: String? 4 | 5 | init() { 6 | 7 | } 8 | 9 | init(locationStrategy:String, value:String) { 10 | self.locationStrategy = locationStrategy; 11 | self.value = value; 12 | } 13 | 14 | class func accessibilityId (accessibilityId:String) -> By { 15 | return By(locationStrategy: "accessibility id", value: accessibilityId); 16 | } 17 | 18 | class func androidUIAutomator (androidUIAutomator:String) -> By { 19 | return By(locationStrategy: "-android uiautomator", value: androidUIAutomator); 20 | } 21 | 22 | class func className (className:String) -> By { 23 | return By(locationStrategy: "class name", value: className); 24 | } 25 | 26 | class func cssSelector (cssSelector:String) -> By { 27 | return By(locationStrategy: "css selector", value: cssSelector); 28 | } 29 | 30 | class func id (id:String) -> By { 31 | return By(locationStrategy: "id", value: id); 32 | } 33 | 34 | class func iOSUIAutomation (iOSUIAutomation:String) -> By { 35 | return By(locationStrategy: "-ios uiautomation", value: iOSUIAutomation); 36 | } 37 | 38 | class func linkText (linkText:String) -> By { 39 | return By(locationStrategy: "link text", value: linkText); 40 | } 41 | 42 | class func name (name:String) -> By { 43 | return By(locationStrategy: "name", value: name); 44 | } 45 | 46 | class func partialLinkText (partialLinkText:String) -> By { 47 | return By(locationStrategy: "partial link text", value: partialLinkText); 48 | } 49 | 50 | class func tagName (tagName:String) -> By { 51 | return By(locationStrategy: "tag name", value: tagName); 52 | } 53 | 54 | class func xPath (xPath:String) -> By { 55 | return By(locationStrategy: "xpath", value: xPath); 56 | } 57 | 58 | } -------------------------------------------------------------------------------- /SeleniumSwift/SeleniumSwift/Capabilities.swift: -------------------------------------------------------------------------------- 1 | class Capabilities { 2 | var browserName : String?; 3 | var version : String?; 4 | var platform : String?; 5 | var javaScriptEnabled : Bool?; 6 | var takesScreenShot : Bool?; 7 | var handlesAlerts : Bool?; 8 | var databaseEnabled : Bool?; 9 | var locationContextEnabled : Bool?; 10 | var applicationCacheEnabled : Bool?; 11 | var browserConnectionEnabled : Bool?; 12 | var cssSelectorsEnabled : Bool?; 13 | var webStorageEnabled : Bool?; 14 | var rotatable : Bool?; 15 | var acceptsSslCerts : Bool?; 16 | var nativeEvents : Bool?; 17 | 18 | var app : String?; 19 | var automationName : String?; 20 | var deviceName : String?; 21 | var platformName : String?; 22 | var platformVersion : String?; 23 | 24 | init() { 25 | 26 | } 27 | } -------------------------------------------------------------------------------- /SeleniumSwift/SeleniumSwift/Enums.swift: -------------------------------------------------------------------------------- 1 | enum ScreenOrientation 2 | { 3 | case Portrait 4 | case Landscape 5 | case Unknown 6 | } 7 | 8 | enum TimeoutType 9 | { 10 | case Implicit 11 | case Script 12 | case PageLoad 13 | } 14 | 15 | 16 | enum ApplicationCacheStatus 17 | { 18 | case Uncached 19 | case Idle 20 | case Checking 21 | case Downloading 22 | case UpdateReady 23 | case Obsolete 24 | } 25 | 26 | enum MouseButton 27 | { 28 | case Left 29 | case Middle 30 | case Right 31 | } 32 | 33 | 34 | enum LogType 35 | { 36 | case Browser 37 | case Client 38 | case Driver 39 | case Server 40 | } 41 | 42 | func stringForTimeout (timeoutType:TimeoutType) -> String { 43 | switch timeoutType { 44 | case .Implicit: 45 | return "implicit" 46 | case .PageLoad: 47 | return "page load" 48 | case .Script: 49 | return "script" 50 | } 51 | } 52 | 53 | func applicationCacheStatusForInt (statusInt:Int) -> ApplicationCacheStatus { 54 | switch (statusInt) { 55 | case 0: 56 | return ApplicationCacheStatus.Uncached; 57 | case 1: 58 | return ApplicationCacheStatus.Idle; 59 | case 2: 60 | return ApplicationCacheStatus.Checking; 61 | case 3: 62 | return ApplicationCacheStatus.Downloading; 63 | case 4: 64 | return ApplicationCacheStatus.UpdateReady; 65 | case 5: 66 | return ApplicationCacheStatus.Obsolete; 67 | default: 68 | return ApplicationCacheStatus.Uncached; 69 | } 70 | } 71 | 72 | func intForMouseButton (mouseButton:MouseButton) -> Int { 73 | switch mouseButton { 74 | case .Left: 75 | return 0; 76 | case .Middle: 77 | return 1; 78 | case .Right: 79 | return 2; 80 | } 81 | } 82 | 83 | func stringForLogType (logType:LogType) -> String { 84 | switch logType { 85 | case .Browser: 86 | return "browser"; 87 | case .Client: 88 | return "client"; 89 | case .Driver: 90 | return "driver"; 91 | case .Server: 92 | return "server"; 93 | } 94 | } -------------------------------------------------------------------------------- /SeleniumSwift/SeleniumSwift/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 | NSHumanReadableCopyright 24 | Copyright © 2015 Appium. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /SeleniumSwift/SeleniumSwift/SeleniumSwift.h: -------------------------------------------------------------------------------- 1 | // 2 | // SeleniumSwift.h 3 | // SeleniumSwift 4 | // 5 | // Created by Dan Cuellar on 19/01/2015. 6 | // Copyright (c) 2015 Appium. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | //! Project version number for SeleniumSwift. 13 | FOUNDATION_EXPORT double SeleniumSwiftVersionNumber; 14 | 15 | //! Project version string for SeleniumSwift. 16 | FOUNDATION_EXPORT const unsigned char SeleniumSwiftVersionString[]; 17 | 18 | // In this header, you should import all the public headers of your framework using statements like #import 19 | 20 | 21 | -------------------------------------------------------------------------------- /SeleniumSwift/SeleniumSwift/Status.swift: -------------------------------------------------------------------------------- 1 | class Status { 2 | var buildVersion: String? 3 | var buildRevision: String? 4 | var buildTime: String? 5 | var osArchitecture: String? 6 | var osName: String? 7 | var osVersion: String? 8 | 9 | init() { 10 | } 11 | 12 | init(props: Dictionary) { 13 | let value = props["value"] as Dictionary; 14 | 15 | let build = value["build"] as Dictionary; 16 | self.buildVersion = build["version"]; 17 | self.buildRevision = build["revision"]; 18 | self.buildTime = build["time"]; 19 | 20 | let os = value["os"] as Dictionary; 21 | self.osArchitecture = build["arch"]; 22 | self.osName = build["name"]; 23 | self.osVersion = build["version"]; 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /SeleniumSwift/SeleniumSwiftTests/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 | -------------------------------------------------------------------------------- /SeleniumSwift/SeleniumSwiftTests/SeleniumSwiftTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SeleniumSwiftTests.swift 3 | // SeleniumSwiftTests 4 | // 5 | // Created by Dan Cuellar on 19/01/2015. 6 | // Copyright (c) 2015 Appium. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import XCTest 11 | 12 | class SeleniumSwiftTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------