appium-webdriveragent 11.0.2 → 11.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/WebDriverAgent.xcodeproj/project.pbxproj +15 -3
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.m +1 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBCustomActions.h +27 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBCustomActions.m +127 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBWebDriverAttributes.m +6 -0
- package/WebDriverAgentLib/Commands/FBSessionCommands.m +4 -0
- package/WebDriverAgentLib/Info.plist +2 -2
- package/WebDriverAgentLib/Routing/FBElement.h +3 -0
- package/WebDriverAgentLib/Utilities/FBConfiguration.h +11 -0
- package/WebDriverAgentLib/Utilities/FBConfiguration.m +11 -0
- package/WebDriverAgentLib/Utilities/FBSettings.h +1 -0
- package/WebDriverAgentLib/Utilities/FBSettings.m +1 -0
- package/WebDriverAgentLib/Utilities/FBXPath.m +23 -0
- package/WebDriverAgentLib/Utilities/XCTestPrivateSymbols.h +4 -0
- package/WebDriverAgentLib/Utilities/XCTestPrivateSymbols.m +15 -4
- package/WebDriverAgentTests/IntegrationApp/Classes/ViewController.m +22 -0
- package/WebDriverAgentTests/IntegrationApp/Resources/Base.lproj/Main.storyboard +43 -40
- package/WebDriverAgentTests/IntegrationTests/FBElementAttributeTests.m +10 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCElementSnapshotDouble.h +1 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCElementSnapshotDouble.m +1 -5
- package/WebDriverAgentTests/UnitTests/Doubles/XCUIElementDouble.h +1 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCUIElementDouble.m +1 -0
- package/WebDriverAgentTests/UnitTests/FBXPathTests.m +6 -3
- package/WebDriverAgentTests/UnitTests_tvOS/Doubles/XCUIElementDouble.h +1 -0
- package/WebDriverAgentTests/UnitTests_tvOS/Doubles/XCUIElementDouble.m +1 -0
- package/build/lib/utils.d.ts +0 -12
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +0 -51
- package/build/lib/utils.js.map +1 -1
- package/build/lib/webdriveragent.d.ts.map +1 -1
- package/build/lib/webdriveragent.js +0 -1
- package/build/lib/webdriveragent.js.map +1 -1
- package/build/lib/xcodebuild.d.ts +1 -6
- package/build/lib/xcodebuild.d.ts.map +1 -1
- package/build/lib/xcodebuild.js +5 -24
- package/build/lib/xcodebuild.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/utils.ts +1 -52
- package/lib/webdriveragent.ts +0 -1
- package/lib/xcodebuild.ts +6 -28
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="
|
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="nJd-IZ-bfU">
|
|
3
3
|
<device id="retina6_5" orientation="portrait" appearance="light"/>
|
|
4
4
|
<dependencies>
|
|
5
5
|
<deployment identifier="iOS"/>
|
|
6
|
-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="
|
|
6
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
|
|
7
7
|
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
|
8
8
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
|
9
9
|
</dependencies>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
22
22
|
<subviews>
|
|
23
23
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nbp-zX-Om1">
|
|
24
|
-
<rect key="frame" x="186.66666666666666" y="
|
|
24
|
+
<rect key="frame" x="186.66666666666666" y="161" width="41" height="30"/>
|
|
25
25
|
<constraints>
|
|
26
26
|
<constraint firstAttribute="height" constant="30" id="GzF-4f-MaH"/>
|
|
27
27
|
</constraints>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</connections>
|
|
32
32
|
</button>
|
|
33
33
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YgP-SF-TkS">
|
|
34
|
-
<rect key="frame" x="159.66666666666666" y="
|
|
34
|
+
<rect key="frame" x="159.66666666666666" y="199" width="95" height="30"/>
|
|
35
35
|
<constraints>
|
|
36
36
|
<constraint firstAttribute="height" constant="30" id="wTu-YB-p22"/>
|
|
37
37
|
</constraints>
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</connections>
|
|
43
43
|
</button>
|
|
44
44
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="M2N-Yn-ytb">
|
|
45
|
-
<rect key="frame" x="173" y="
|
|
45
|
+
<rect key="frame" x="173" y="237" width="68" height="30"/>
|
|
46
46
|
<constraints>
|
|
47
47
|
<constraint firstAttribute="height" constant="30" id="Sf6-pE-ROp"/>
|
|
48
48
|
</constraints>
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
</connections>
|
|
53
53
|
</button>
|
|
54
54
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="S56-6U-3gG">
|
|
55
|
-
<rect key="frame" x="177" y="
|
|
55
|
+
<rect key="frame" x="177" y="275" width="60" height="30"/>
|
|
56
56
|
<constraints>
|
|
57
57
|
<constraint firstAttribute="height" constant="30" id="7sH-TN-BNa"/>
|
|
58
58
|
</constraints>
|
|
@@ -62,13 +62,13 @@
|
|
|
62
62
|
</connections>
|
|
63
63
|
</button>
|
|
64
64
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Orientation" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uiD-R4-b34">
|
|
65
|
-
<rect key="frame" x="164.66666666666666" y="
|
|
65
|
+
<rect key="frame" x="164.66666666666666" y="313" width="85" height="21"/>
|
|
66
66
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
|
67
67
|
<nil key="textColor"/>
|
|
68
68
|
<nil key="highlightedColor"/>
|
|
69
69
|
</label>
|
|
70
70
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1Ht-AF-MGW">
|
|
71
|
-
<rect key="frame" x="186" y="
|
|
71
|
+
<rect key="frame" x="186" y="342" width="42" height="30"/>
|
|
72
72
|
<state key="normal" title="Touch"/>
|
|
73
73
|
<connections>
|
|
74
74
|
<segue destination="XaE-eF-eIt" kind="show" id="q3u-B9-6R6"/>
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
115
115
|
<subviews>
|
|
116
116
|
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="C6B-Wo-jWm" customClass="TouchableView">
|
|
117
|
-
<rect key="frame" x="16" y="
|
|
117
|
+
<rect key="frame" x="16" y="140.00000000000003" width="382" height="356.66666666666674"/>
|
|
118
118
|
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
119
119
|
<accessibility key="accessibilityConfiguration" identifier="touchableView"/>
|
|
120
120
|
<constraints>
|
|
@@ -122,14 +122,14 @@
|
|
|
122
122
|
</constraints>
|
|
123
123
|
</view>
|
|
124
124
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Taps" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IV8-Ak-Z8e">
|
|
125
|
-
<rect key="frame" x="139" y="
|
|
125
|
+
<rect key="frame" x="139" y="502.66666666666674" width="131" height="21"/>
|
|
126
126
|
<accessibility key="accessibilityConfiguration" identifier="numberOfTapsLabel"/>
|
|
127
127
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
|
128
128
|
<nil key="textColor"/>
|
|
129
129
|
<nil key="highlightedColor"/>
|
|
130
130
|
</label>
|
|
131
131
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Touches" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q4X-EY-aSL">
|
|
132
|
-
<rect key="frame" x="125" y="
|
|
132
|
+
<rect key="frame" x="125" y="531.33333333333337" width="159" height="21"/>
|
|
133
133
|
<accessibility key="accessibilityConfiguration" identifier="numberOfTouchesLabel"/>
|
|
134
134
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
|
135
135
|
<nil key="textColor"/>
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
<objects>
|
|
166
166
|
<navigationController id="nJd-IZ-bfU" customClass="FBNavigationController" sceneMemberID="viewController">
|
|
167
167
|
<navigationBar key="navigationBar" contentMode="scaleToFill" id="hZx-8U-FDw">
|
|
168
|
-
<rect key="frame" x="0.0" y="
|
|
168
|
+
<rect key="frame" x="0.0" y="88" width="414" height="44"/>
|
|
169
169
|
<autoresizingMask key="autoresizingMask"/>
|
|
170
170
|
</navigationBar>
|
|
171
171
|
<connections>
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
190
190
|
<subviews>
|
|
191
191
|
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Value" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="mxs-lj-ChP">
|
|
192
|
-
<rect key="frame" x="20" y="
|
|
192
|
+
<rect key="frame" x="20" y="143" width="374" height="34"/>
|
|
193
193
|
<accessibility key="accessibilityConfiguration" identifier="" label=""/>
|
|
194
194
|
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
|
195
195
|
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no"/>
|
|
@@ -199,19 +199,19 @@
|
|
|
199
199
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
200
200
|
</pageControl>
|
|
201
201
|
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" horizontalCompressionResistancePriority="749" verticalCompressionResistancePriority="749" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="LZF-72-rfb">
|
|
202
|
-
<rect key="frame" x="20" y="
|
|
203
|
-
<
|
|
202
|
+
<rect key="frame" x="20" y="543" width="374" height="249"/>
|
|
203
|
+
<string key="text">1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901</string>
|
|
204
204
|
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
|
205
205
|
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
|
206
206
|
</textView>
|
|
207
207
|
<datePicker contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" datePickerMode="dateAndTime" minuteInterval="1" style="wheels" translatesAutoresizingMaskIntoConstraints="NO" id="dxw-sJ-Dkr">
|
|
208
|
-
<rect key="frame" x="20" y="
|
|
208
|
+
<rect key="frame" x="20" y="409" width="374" height="126"/>
|
|
209
209
|
<constraints>
|
|
210
210
|
<constraint firstAttribute="height" constant="126" id="QRU-5e-MQt"/>
|
|
211
211
|
</constraints>
|
|
212
212
|
</datePicker>
|
|
213
213
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Exq-MB-zeu">
|
|
214
|
-
<rect key="frame" x="103.66666666666667" y="
|
|
214
|
+
<rect key="frame" x="103.66666666666667" y="245" width="46.000000000000014" height="30"/>
|
|
215
215
|
<constraints>
|
|
216
216
|
<constraint firstAttribute="height" constant="30" id="Otl-5O-2Nq"/>
|
|
217
217
|
</constraints>
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
</connections>
|
|
222
222
|
</button>
|
|
223
223
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NJh-8E-4En">
|
|
224
|
-
<rect key="frame" x="106.66666666666667" y="
|
|
224
|
+
<rect key="frame" x="106.66666666666667" y="286" width="42.000000000000014" height="21"/>
|
|
225
225
|
<constraints>
|
|
226
226
|
<constraint firstAttribute="height" constant="21" id="VBZ-ac-GvI"/>
|
|
227
227
|
</constraints>
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
<nil key="highlightedColor"/>
|
|
231
231
|
</label>
|
|
232
232
|
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="Wim-fT-xNl">
|
|
233
|
-
<rect key="frame" x="64" y="
|
|
233
|
+
<rect key="frame" x="64" y="311" width="131" height="29"/>
|
|
234
234
|
<constraints>
|
|
235
235
|
<constraint firstAttribute="height" constant="28" id="IoK-dx-Y4W"/>
|
|
236
236
|
</constraints>
|
|
@@ -240,32 +240,32 @@
|
|
|
240
240
|
</segments>
|
|
241
241
|
</segmentedControl>
|
|
242
242
|
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="U7D-NR-20N">
|
|
243
|
-
<rect key="frame" x="207" y="
|
|
243
|
+
<rect key="frame" x="207" y="320" width="118" height="31"/>
|
|
244
244
|
<constraints>
|
|
245
245
|
<constraint firstAttribute="width" constant="114" id="vy6-tS-yHd"/>
|
|
246
246
|
</constraints>
|
|
247
247
|
</slider>
|
|
248
248
|
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="SjL-dx-Zsi">
|
|
249
|
-
<rect key="frame" x="235" y="
|
|
249
|
+
<rect key="frame" x="235" y="358" width="51" height="31"/>
|
|
250
250
|
<constraints>
|
|
251
251
|
<constraint firstAttribute="width" constant="49" id="dRJ-Hb-qNW"/>
|
|
252
252
|
</constraints>
|
|
253
253
|
</switch>
|
|
254
254
|
<progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="w6h-ic-qpa">
|
|
255
|
-
<rect key="frame" x="134" y="
|
|
255
|
+
<rect key="frame" x="134" y="397" width="150" height="4"/>
|
|
256
256
|
<constraints>
|
|
257
257
|
<constraint firstAttribute="width" constant="150" id="7Tf-hh-LKX"/>
|
|
258
258
|
</constraints>
|
|
259
259
|
</progressView>
|
|
260
260
|
<stepper opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" maximumValue="100" translatesAutoresizingMaskIntoConstraints="NO" id="u8X-Wb-Od3">
|
|
261
|
-
<rect key="frame" x="69" y="
|
|
261
|
+
<rect key="frame" x="69" y="355" width="94" height="29"/>
|
|
262
262
|
<constraints>
|
|
263
263
|
<constraint firstAttribute="width" constant="94" id="bNi-xp-G14"/>
|
|
264
264
|
<constraint firstAttribute="height" constant="29" id="f0s-Rr-QTt"/>
|
|
265
265
|
</constraints>
|
|
266
266
|
</stepper>
|
|
267
267
|
<label opaque="NO" userInteractionEnabled="NO" alpha="0.0" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="alpha_invisible" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ucg-0s-c50">
|
|
268
|
-
<rect key="frame" x="224.33333333333334" y="
|
|
268
|
+
<rect key="frame" x="224.33333333333334" y="241" width="111.66666666666666" height="21"/>
|
|
269
269
|
<color key="backgroundColor" red="1" green="0.0" blue="0.041046944598614132" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
270
270
|
<constraints>
|
|
271
271
|
<constraint firstAttribute="height" constant="21" id="664-Z3-V7W"/>
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
<nil key="highlightedColor"/>
|
|
276
276
|
</label>
|
|
277
277
|
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="hidden_invisible" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vt6-b1-U0h">
|
|
278
|
-
<rect key="frame" x="221.66666666666666" y="
|
|
278
|
+
<rect key="frame" x="221.66666666666666" y="270" width="122.66666666666666" height="21"/>
|
|
279
279
|
<constraints>
|
|
280
280
|
<constraint firstAttribute="height" constant="21" id="51j-sl-XYd"/>
|
|
281
281
|
</constraints>
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
<nil key="highlightedColor"/>
|
|
285
285
|
</label>
|
|
286
286
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GsS-jO-scK">
|
|
287
|
-
<rect key="frame" x="174" y="
|
|
287
|
+
<rect key="frame" x="174" y="292" width="103" height="30"/>
|
|
288
288
|
<accessibility key="accessibilityConfiguration">
|
|
289
289
|
<bool key="isElement" value="NO"/>
|
|
290
290
|
</accessibility>
|
|
@@ -299,10 +299,10 @@
|
|
|
299
299
|
</userDefinedRuntimeAttributes>
|
|
300
300
|
</button>
|
|
301
301
|
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="bQv-RY-wkj">
|
|
302
|
-
<rect key="frame" x="171" y="
|
|
302
|
+
<rect key="frame" x="171" y="364" width="20" height="20"/>
|
|
303
303
|
</activityIndicatorView>
|
|
304
304
|
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Value2" borderStyle="roundedRect" textAlignment="natural" clearsOnBeginEditing="YES" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Rab-I8-2aU">
|
|
305
|
-
<rect key="frame" x="20" y="
|
|
305
|
+
<rect key="frame" x="20" y="185" width="374" height="34"/>
|
|
306
306
|
<accessibility key="accessibilityConfiguration" identifier="aIdentifier" label="aLabel"/>
|
|
307
307
|
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
|
308
308
|
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no"/>
|
|
@@ -349,6 +349,9 @@
|
|
|
349
349
|
</constraints>
|
|
350
350
|
</view>
|
|
351
351
|
<navigationItem key="navigationItem" id="Hk7-AH-JlS"/>
|
|
352
|
+
<connections>
|
|
353
|
+
<outlet property="button" destination="Exq-MB-zeu" id="G1n-jg-1hY"/>
|
|
354
|
+
</connections>
|
|
352
355
|
</viewController>
|
|
353
356
|
<placeholder placeholderIdentifier="IBFirstResponder" id="0f2-qL-RU6" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
|
354
357
|
</objects>
|
|
@@ -367,7 +370,7 @@
|
|
|
367
370
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
368
371
|
<subviews>
|
|
369
372
|
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="y1x-J5-Nkw">
|
|
370
|
-
<rect key="frame" x="101.66666666666669" y="
|
|
373
|
+
<rect key="frame" x="101.66666666666669" y="157" width="211" height="30"/>
|
|
371
374
|
<accessibility key="accessibilityConfiguration" identifier="textField"/>
|
|
372
375
|
<constraints>
|
|
373
376
|
<constraint firstAttribute="height" constant="30" id="B7B-wI-RFc"/>
|
|
@@ -377,7 +380,7 @@
|
|
|
377
380
|
<textInputTraits key="textInputTraits"/>
|
|
378
381
|
</textField>
|
|
379
382
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4VK-4B-FEF">
|
|
380
|
-
<rect key="frame" x="149.66666666666666" y="
|
|
383
|
+
<rect key="frame" x="149.66666666666666" y="238" width="113.99999999999997" height="30"/>
|
|
381
384
|
<constraints>
|
|
382
385
|
<constraint firstAttribute="height" constant="30" id="xsL-Fq-mly"/>
|
|
383
386
|
</constraints>
|
|
@@ -387,7 +390,7 @@
|
|
|
387
390
|
</connections>
|
|
388
391
|
</button>
|
|
389
392
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OQt-5y-Tft">
|
|
390
|
-
<rect key="frame" x="124" y="
|
|
393
|
+
<rect key="frame" x="124" y="276" width="166" height="30"/>
|
|
391
394
|
<constraints>
|
|
392
395
|
<constraint firstAttribute="height" constant="30" id="Y5y-Th-63a"/>
|
|
393
396
|
</constraints>
|
|
@@ -397,7 +400,7 @@
|
|
|
397
400
|
</connections>
|
|
398
401
|
</button>
|
|
399
402
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rG5-3k-LFe">
|
|
400
|
-
<rect key="frame" x="122" y="
|
|
403
|
+
<rect key="frame" x="122" y="314" width="169" height="30"/>
|
|
401
404
|
<constraints>
|
|
402
405
|
<constraint firstAttribute="height" constant="30" id="im5-w3-Pgi"/>
|
|
403
406
|
</constraints>
|
|
@@ -407,7 +410,7 @@
|
|
|
407
410
|
</connections>
|
|
408
411
|
</button>
|
|
409
412
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ntr-45-Ycd">
|
|
410
|
-
<rect key="frame" x="123" y="
|
|
413
|
+
<rect key="frame" x="123" y="352" width="168" height="30"/>
|
|
411
414
|
<constraints>
|
|
412
415
|
<constraint firstAttribute="height" constant="30" id="4B7-LM-UwV"/>
|
|
413
416
|
</constraints>
|
|
@@ -417,7 +420,7 @@
|
|
|
417
420
|
</connections>
|
|
418
421
|
</button>
|
|
419
422
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CZ1-7J-OGl">
|
|
420
|
-
<rect key="frame" x="66.666666666666671" y="
|
|
423
|
+
<rect key="frame" x="66.666666666666671" y="220" width="46" height="30"/>
|
|
421
424
|
<accessibility key="accessibilityConfiguration" identifier="button"/>
|
|
422
425
|
<constraints>
|
|
423
426
|
<constraint firstAttribute="height" constant="30" id="tJH-wr-O3J"/>
|
|
@@ -425,7 +428,7 @@
|
|
|
425
428
|
<state key="normal" title="Button"/>
|
|
426
429
|
</button>
|
|
427
430
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="plO-2e-XmX">
|
|
428
|
-
<rect key="frame" x="304.66666666666669" y="
|
|
431
|
+
<rect key="frame" x="304.66666666666669" y="224" width="42" height="21"/>
|
|
429
432
|
<accessibility key="accessibilityConfiguration" identifier="label"/>
|
|
430
433
|
<constraints>
|
|
431
434
|
<constraint firstAttribute="height" constant="21" id="2qA-NT-ddc"/>
|
|
@@ -435,7 +438,7 @@
|
|
|
435
438
|
<nil key="highlightedColor"/>
|
|
436
439
|
</label>
|
|
437
440
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3Zk-wE-jwj">
|
|
438
|
-
<rect key="frame" x="144" y="
|
|
441
|
+
<rect key="frame" x="144" y="390" width="126" height="30"/>
|
|
439
442
|
<constraints>
|
|
440
443
|
<constraint firstAttribute="height" constant="30" id="Mk4-bk-Y0L"/>
|
|
441
444
|
</constraints>
|
|
@@ -445,7 +448,7 @@
|
|
|
445
448
|
</connections>
|
|
446
449
|
</button>
|
|
447
450
|
<button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="D7g-22-s49">
|
|
448
|
-
<rect key="frame" x="116" y="
|
|
451
|
+
<rect key="frame" x="116" y="428" width="182" height="30"/>
|
|
449
452
|
<constraints>
|
|
450
453
|
<constraint firstAttribute="height" constant="30" id="TzV-CY-64y"/>
|
|
451
454
|
</constraints>
|
|
@@ -493,7 +496,7 @@
|
|
|
493
496
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
494
497
|
<subviews>
|
|
495
498
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vYb-QB-vwU">
|
|
496
|
-
<rect key="frame" x="172.66666666666666" y="
|
|
499
|
+
<rect key="frame" x="172.66666666666666" y="152" width="69" height="30"/>
|
|
497
500
|
<constraints>
|
|
498
501
|
<constraint firstAttribute="height" constant="30" id="ymh-D3-SCA"/>
|
|
499
502
|
</constraints>
|
|
@@ -503,7 +506,7 @@
|
|
|
503
506
|
</connections>
|
|
504
507
|
</button>
|
|
505
508
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FdB-fa-0bl">
|
|
506
|
-
<rect key="frame" x="171" y="
|
|
509
|
+
<rect key="frame" x="171" y="190" width="72" height="30"/>
|
|
507
510
|
<constraints>
|
|
508
511
|
<constraint firstAttribute="height" constant="30" id="Xas-AZ-Nyw"/>
|
|
509
512
|
</constraints>
|
|
@@ -583,7 +586,7 @@
|
|
|
583
586
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
584
587
|
<subviews>
|
|
585
588
|
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xEQ-MI-a2g">
|
|
586
|
-
<rect key="frame" x="0.0" y="0.0" width="414" height="
|
|
589
|
+
<rect key="frame" x="0.0" y="0.0" width="414" height="828"/>
|
|
587
590
|
<userDefinedRuntimeAttributes>
|
|
588
591
|
<userDefinedRuntimeAttribute type="string" keyPath="accessibilityIdentifier" value="scrollView"/>
|
|
589
592
|
</userDefinedRuntimeAttributes>
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
#import "FBTestMacros.h"
|
|
14
14
|
#import "FBXCodeCompatibility.h"
|
|
15
15
|
#import "XCUIElement+FBAccessibility.h"
|
|
16
|
+
#import "XCUIElement+FBCustomActions.h"
|
|
16
17
|
#import "XCUIElement+FBIsVisible.h"
|
|
17
18
|
#import "XCUIElement+FBWebDriverAttributes.h"
|
|
18
19
|
|
|
@@ -251,4 +252,13 @@
|
|
|
251
252
|
XCTAssertEqualObjects(element.wdValue, @"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901");
|
|
252
253
|
}
|
|
253
254
|
|
|
255
|
+
- (void)testCustomActionsAttributes
|
|
256
|
+
{
|
|
257
|
+
XCUIElement *buttonElement = self.testedApplication.buttons[@"Button"];
|
|
258
|
+
XCTAssertTrue(buttonElement.exists);
|
|
259
|
+
NSString *customActions = buttonElement.wdCustomActions;
|
|
260
|
+
XCTAssertNotNil(customActions, @"Button should have custom actions");
|
|
261
|
+
XCTAssertEqualObjects(customActions, @"Custom Action 1,Custom Action 2");
|
|
262
|
+
}
|
|
263
|
+
|
|
254
264
|
@end
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
self = [super init];
|
|
20
20
|
self->_value = @"magicValue";
|
|
21
21
|
self->_label = @"testLabel";
|
|
22
|
+
self->_additionalAttributes = [NSMutableDictionary dictionary];
|
|
22
23
|
return self;
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -72,11 +73,6 @@
|
|
|
72
73
|
return YES;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
- (NSDictionary *)additionalAttributes
|
|
76
|
-
{
|
|
77
|
-
return @{};
|
|
78
|
-
}
|
|
79
|
-
|
|
80
76
|
- (id<FBXCAccessibilityElement>)accessibilityElement
|
|
81
77
|
{
|
|
82
78
|
return nil;
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
@property (nonatomic, readwrite, assign) XCUIElementType elementType;
|
|
39
39
|
@property (nonatomic, readwrite, getter=isWDAccessibilityContainer) BOOL wdAccessibilityContainer;
|
|
40
40
|
@property (nonatomic, copy, readwrite, nullable) NSString *wdTraits;
|
|
41
|
+
@property (nonatomic, strong, readwrite, nullable) NSString *wdCustomActions;
|
|
41
42
|
|
|
42
43
|
- (void)resolve;
|
|
43
44
|
- (id _Nonnull)fb_standardSnapshot;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
#import "XCUIElementDouble.h"
|
|
15
15
|
#import "XCElementSnapshotDouble.h"
|
|
16
16
|
#import "FBXCElementSnapshotWrapper+Helpers.h"
|
|
17
|
+
#import "XCTestPrivateSymbols.h"
|
|
17
18
|
|
|
18
19
|
@interface FBXPathTests : XCTestCase
|
|
19
20
|
@end
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
XCTAssertTrue([resultXml isEqualToString: expectedXml]);
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
- (void)
|
|
72
|
+
- (void)testXPathPresentationWithSomeAttributesExcluded
|
|
72
73
|
{
|
|
73
74
|
XCElementSnapshotDouble *snapshot = [XCElementSnapshotDouble new];
|
|
74
75
|
id<FBElement> element = (id<FBElement>)[FBXCElementSnapshotWrapper ensureWrapped:(id)snapshot];
|
|
@@ -85,12 +86,14 @@
|
|
|
85
86
|
XCElementSnapshotDouble *snapshot = [XCElementSnapshotDouble new];
|
|
86
87
|
snapshot.value = @"йоло<>&\"";
|
|
87
88
|
snapshot.label = @"a\nb";
|
|
89
|
+
NSString *testCustomActions = @"Custom Action 1, Custom Action 2";
|
|
90
|
+
snapshot.additionalAttributes[FB_XCAXACustomActionsAttribute] = testCustomActions;
|
|
88
91
|
id<FBElement> element = (id<FBElement>)[FBXCElementSnapshotWrapper ensureWrapped:(id)snapshot];
|
|
89
92
|
NSString *resultXml = [self xmlStringWithElement:(id<FBXCElementSnapshot>)element
|
|
90
93
|
xpathQuery:[NSString stringWithFormat:@"//%@[@*]", element.wdType]
|
|
91
94
|
excludingAttributes:@[@"visible"]];
|
|
92
|
-
NSString *expectedXml = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<%@ type=\"%@\" value=\"%@\" name=\"%@\" label=\"%@\" enabled=\"%@\" visible=\"%@\" accessible=\"%@\" x=\"%@\" y=\"%@\" width=\"%@\" height=\"%@\" index=\"%lu\" hittable=\"%@\" traits=\"%@\" nativeFrame=\"%@\" private_indexPath=\"top\"/>\n",
|
|
93
|
-
element.wdType, element.wdType, @"йоло<>&"", element.wdName, @"a b", FBBoolToString(element.wdEnabled), FBBoolToString(element.wdVisible), FBBoolToString(element.wdAccessible), element.wdRect[@"x"], element.wdRect[@"y"], element.wdRect[@"width"], element.wdRect[@"height"], element.wdIndex, FBBoolToString(element.wdHittable), element.wdTraits, NSStringFromCGRect(element.wdNativeFrame)];
|
|
95
|
+
NSString *expectedXml = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<%@ type=\"%@\" value=\"%@\" name=\"%@\" label=\"%@\" enabled=\"%@\" visible=\"%@\" accessible=\"%@\" x=\"%@\" y=\"%@\" width=\"%@\" height=\"%@\" index=\"%lu\" hittable=\"%@\" traits=\"%@\" nativeFrame=\"%@\" customActions=\"%@\" private_indexPath=\"top\"/>\n",
|
|
96
|
+
element.wdType, element.wdType, @"йоло<>&"", element.wdName, @"a b", FBBoolToString(element.wdEnabled), FBBoolToString(element.wdVisible), FBBoolToString(element.wdAccessible), element.wdRect[@"x"], element.wdRect[@"y"], element.wdRect[@"width"], element.wdRect[@"height"], element.wdIndex, FBBoolToString(element.wdHittable), element.wdTraits, NSStringFromCGRect(element.wdNativeFrame), element.wdCustomActions];
|
|
94
97
|
XCTAssertEqualObjects(expectedXml, resultXml);
|
|
95
98
|
}
|
|
96
99
|
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
@property (copy, nonnull) NSArray *children;
|
|
35
35
|
@property (nonatomic, readwrite, assign) XCUIElementType elementType;
|
|
36
36
|
@property (nonatomic, readwrite, getter=isWDAccessibilityContainer) BOOL wdAccessibilityContainer;
|
|
37
|
+
@property (nonatomic, strong, readwrite, nullable) NSString *wdCustomActions;
|
|
37
38
|
|
|
38
39
|
- (void)resolve;
|
|
39
40
|
- (id _Nonnull)fb_standardSnapshot;
|
package/build/lib/utils.d.ts
CHANGED
|
@@ -8,18 +8,6 @@ export declare function killAppUsingPattern(pgrepPattern: string): Promise<void>
|
|
|
8
8
|
* @returns Return true if the platformName is tvOS
|
|
9
9
|
*/
|
|
10
10
|
export declare function isTvOS(platformName: string): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Update WebDriverAgentRunner project bundle ID with newBundleId.
|
|
13
|
-
* This method assumes project file is in the correct state.
|
|
14
|
-
* @param agentPath - Path to the .xcodeproj directory.
|
|
15
|
-
* @param newBundleId the new bundle ID used to update.
|
|
16
|
-
*/
|
|
17
|
-
export declare function updateProjectFile(agentPath: string, newBundleId: string): Promise<void>;
|
|
18
|
-
/**
|
|
19
|
-
* Reset WebDriverAgentRunner project bundle ID to correct state.
|
|
20
|
-
* @param agentPath - Path to the .xcodeproj directory.
|
|
21
|
-
*/
|
|
22
|
-
export declare function resetProjectFile(agentPath: string): Promise<void>;
|
|
23
11
|
export declare function setRealDeviceSecurity(keychainPath: string, keychainPassword: string): Promise<void>;
|
|
24
12
|
/**
|
|
25
13
|
* Arguments for setting xctestrun file
|
package/build/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,UAAU,EAAE,MAAM,cAAc,CAAC;AAUhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,UAAU,EAAE,MAAM,cAAc,CAAC;AAUhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAiC1C,eAAO,MAAM,cAAc,QAAkB,CAAC;AAE9C,wBAAsB,mBAAmB,CAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqC9E;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,wBAAsB,qBAAqB,CAAE,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK1G;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAShF;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAWzI;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAgC9H;AAGD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAKrF;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BnG;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;GAEG;AACH,wBAAsB,sBAAsB,IAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOtE;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAS3F;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,aAAa,GAAE,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,IAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA8BtK"}
|
package/build/lib/utils.js
CHANGED
|
@@ -39,8 +39,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.BOOTSTRAP_PATH = void 0;
|
|
40
40
|
exports.killAppUsingPattern = killAppUsingPattern;
|
|
41
41
|
exports.isTvOS = isTvOS;
|
|
42
|
-
exports.updateProjectFile = updateProjectFile;
|
|
43
|
-
exports.resetProjectFile = resetProjectFile;
|
|
44
42
|
exports.setRealDeviceSecurity = setRealDeviceSecurity;
|
|
45
43
|
exports.setXctestrunFile = setXctestrunFile;
|
|
46
44
|
exports.getAdditionalRunContent = getAdditionalRunContent;
|
|
@@ -62,7 +60,6 @@ const bluebird_1 = __importDefault(require("bluebird"));
|
|
|
62
60
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
63
61
|
const asyncbox_1 = require("asyncbox");
|
|
64
62
|
const node_os_1 = require("node:os");
|
|
65
|
-
const PROJECT_FILE = 'project.pbxproj';
|
|
66
63
|
// Get current filename - works in both CommonJS and ESM
|
|
67
64
|
const currentFilename = typeof __filename !== 'undefined'
|
|
68
65
|
? __filename
|
|
@@ -139,47 +136,6 @@ async function killAppUsingPattern(pgrepPattern) {
|
|
|
139
136
|
function isTvOS(platformName) {
|
|
140
137
|
return lodash_1.default.toLower(platformName) === lodash_1.default.toLower(constants_1.PLATFORM_NAME_TVOS);
|
|
141
138
|
}
|
|
142
|
-
/**
|
|
143
|
-
* Update WebDriverAgentRunner project bundle ID with newBundleId.
|
|
144
|
-
* This method assumes project file is in the correct state.
|
|
145
|
-
* @param agentPath - Path to the .xcodeproj directory.
|
|
146
|
-
* @param newBundleId the new bundle ID used to update.
|
|
147
|
-
*/
|
|
148
|
-
async function updateProjectFile(agentPath, newBundleId) {
|
|
149
|
-
const projectFilePath = node_path_1.default.resolve(agentPath, PROJECT_FILE);
|
|
150
|
-
try {
|
|
151
|
-
// Assuming projectFilePath is in the correct state, create .old from projectFilePath
|
|
152
|
-
await support_1.fs.copyFile(projectFilePath, `${projectFilePath}.old`);
|
|
153
|
-
await replaceInFile(projectFilePath, new RegExp(lodash_1.default.escapeRegExp(constants_1.WDA_RUNNER_BUNDLE_ID), 'g'), newBundleId);
|
|
154
|
-
logger_1.log.debug(`Successfully updated '${projectFilePath}' with bundle id '${newBundleId}'`);
|
|
155
|
-
}
|
|
156
|
-
catch (err) {
|
|
157
|
-
logger_1.log.debug(`Error updating project file: ${err.message}`);
|
|
158
|
-
logger_1.log.warn(`Unable to update project file '${projectFilePath}' with ` +
|
|
159
|
-
`bundle id '${newBundleId}'. WebDriverAgent may not start`);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Reset WebDriverAgentRunner project bundle ID to correct state.
|
|
164
|
-
* @param agentPath - Path to the .xcodeproj directory.
|
|
165
|
-
*/
|
|
166
|
-
async function resetProjectFile(agentPath) {
|
|
167
|
-
const projectFilePath = node_path_1.default.join(agentPath, PROJECT_FILE);
|
|
168
|
-
try {
|
|
169
|
-
// restore projectFilePath from .old file
|
|
170
|
-
if (!await support_1.fs.exists(`${projectFilePath}.old`)) {
|
|
171
|
-
return; // no need to reset
|
|
172
|
-
}
|
|
173
|
-
await support_1.fs.mv(`${projectFilePath}.old`, projectFilePath);
|
|
174
|
-
logger_1.log.debug(`Successfully reset '${projectFilePath}' with bundle id '${constants_1.WDA_RUNNER_BUNDLE_ID}'`);
|
|
175
|
-
}
|
|
176
|
-
catch (err) {
|
|
177
|
-
logger_1.log.debug(`Error resetting project file: ${err.message}`);
|
|
178
|
-
logger_1.log.warn(`Unable to reset project file '${projectFilePath}' with ` +
|
|
179
|
-
`bundle id '${constants_1.WDA_RUNNER_BUNDLE_ID}'. WebDriverAgent has been ` +
|
|
180
|
-
`modified and not returned to the original state.`);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
139
|
async function setRealDeviceSecurity(keychainPath, keychainPassword) {
|
|
184
140
|
logger_1.log.debug('Setting security for iOS device');
|
|
185
141
|
await (0, teen_process_1.exec)('security', ['-v', 'list-keychains', '-s', keychainPath]);
|
|
@@ -399,11 +355,4 @@ async function getPIDsUsingPattern(pattern) {
|
|
|
399
355
|
return [];
|
|
400
356
|
}
|
|
401
357
|
}
|
|
402
|
-
async function replaceInFile(file, find, replace) {
|
|
403
|
-
const contents = await support_1.fs.readFile(file, 'utf8');
|
|
404
|
-
const newContents = contents.replace(find, replace);
|
|
405
|
-
if (newContents !== contents) {
|
|
406
|
-
await support_1.fs.writeFile(file, newContents, 'utf8');
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
358
|
//# sourceMappingURL=utils.js.map
|