Skip to content

Commit bd5e01e

Browse files
more fixes
1 parent 072bd9d commit bd5e01e

File tree

4 files changed

+85
-9
lines changed

4 files changed

+85
-9
lines changed

.github/workflows/functional-test.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,16 @@ jobs:
5050
model: ${{ env.IPHONE_MODEL }}
5151
os_version: ${{ env.IOS_VERSION }}
5252

53-
# needed?
54-
- run: brew install ffmpeg
55-
5653
# Start Appium
5754
- run: npm install -g appium
5855
- run: |
5956
appium driver install xcuitest
60-
appium driver run xcuitest build-wda --sdk=${{ env.IOS_VERSION }} --name='${{ env.IPHONE_MODEL }}'
61-
appium plugin install images
62-
appium plugin install execute-driver
6357
nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors > appium.log &
6458
65-
- run: |
66-
appium driver run xcuitest download-wda-sim --platform=ios --outdir=${{ github.workspace }}/wda
59+
- run: appium driver run xcuitest download-wda-sim --platform=ios --outdir=${{ github.workspace }}/wda
6760
name: Downloading prebuilt WDA
6861

69-
- name: Set up Python 3.12
62+
- name: Set up Python
7063
uses: actions/setup-python@v5
7164
with:
7265
python-version: 3.12

appium/options/ios/xcuitest/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
from .wda.keychain_path_option import KeychainPathOption
7373
from .wda.max_typing_frequency_option import MaxTypingFrequencyOption
7474
from .wda.mjpeg_server_port_option import MjpegServerPortOption
75+
from .wda.prebuilt_wda_path_option import PrebuiltWdaPathOption
7576
from .wda.process_arguments_option import ProcessArgumentsOption
7677
from .wda.result_bundle_path_option import ResultBundlePathOption
7778
from .wda.screenshot_quality_option import ScreenshotQualityOption
@@ -83,6 +84,7 @@
8384
from .wda.use_native_caching_strategy_option import UseNativeCachingStrategyOption
8485
from .wda.use_new_wda_option import UseNewWdaOption
8586
from .wda.use_prebuilt_wda_option import UsePrebuiltWdaOption
87+
from .wda.use_preinstalled_wda_option import UsePreinstalledWdaOption
8688
from .wda.use_simple_build_test_option import UseSimpleBuildTestOption
8789
from .wda.use_xctestrun_file_option import UseXctestrunFileOption
8890
from .wda.wait_for_idle_timeout_option import WaitForIdleTimeoutOption
@@ -171,6 +173,7 @@ class XCUITestOptions(
171173
KeychainPathOption,
172174
MaxTypingFrequencyOption,
173175
MjpegServerPortOption,
176+
PrebuiltWdaPathOption,
174177
ProcessArgumentsOption,
175178
ResultBundlePathOption,
176179
ScreenshotQualityOption,
@@ -182,6 +185,7 @@ class XCUITestOptions(
182185
UseNativeCachingStrategyOption,
183186
UseNewWdaOption,
184187
UsePrebuiltWdaOption,
188+
UsePreinstalledWdaOption,
185189
UseSimpleBuildTestOption,
186190
UseXctestrunFileOption,
187191
WaitForIdleTimeoutOption,
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Licensed to the Software Freedom Conservancy (SFC) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The SFC licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14+
# either express or implied. See the License for the specific
15+
# language governing permissions and limitations
16+
# under the License.
17+
18+
from typing import Optional
19+
20+
from appium.options.common.supports_capabilities import SupportsCapabilities
21+
22+
PREBUILT_WDA_PATH = 'prebuiltWDAPath'
23+
24+
25+
class PrebuiltWdaPathOption(SupportsCapabilities):
26+
@property
27+
def prebuilt_wda_path(self) -> Optional[str]:
28+
"""
29+
The path to the prebuilt WebDriverAgent.
30+
"""
31+
return self.get_capability(PREBUILT_WDA_PATH)
32+
33+
@prebuilt_wda_path.setter
34+
def prebuilt_wda_path(self, value: str) -> None:
35+
"""
36+
The path to the prebuilt WebDriverAgent. This should be the path to the
37+
WebDriverAgent.xcarchive file or the WebDriverAgent.app bundle.
38+
"""
39+
self.set_capability(PREBUILT_WDA_PATH, value)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Licensed to the Software Freedom Conservancy (SFC) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The SFC licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14+
# either express or implied. See the License for the specific
15+
# language governing permissions and limitations
16+
# under the License.
17+
18+
from typing import Optional
19+
20+
from appium.options.common.supports_capabilities import SupportsCapabilities
21+
22+
USE_PREINSTALLED_WDA = 'usePreinstalledWDA'
23+
24+
25+
class UsePreinstalledWdaOption(SupportsCapabilities):
26+
@property
27+
def use_preinstalled_wda(self) -> Optional[bool]:
28+
"""
29+
Whether to use a preinstalled WebDriverAgent.
30+
"""
31+
return self.get_capability(USE_PREINSTALLED_WDA)
32+
33+
@use_preinstalled_wda.setter
34+
def use_preinstalled_wda(self, value: bool) -> None:
35+
"""
36+
Whether to use a preinstalled WebDriverAgent. If true, Appium will not
37+
build and install the WebDriverAgent, but will use an existing one.
38+
Defaults to false.
39+
"""
40+
self.set_capability(USE_PREINSTALLED_WDA, value)

0 commit comments

Comments
 (0)