Skip to content

Commit 6f128ed

Browse files
Merge pull request appium#329 from TikhomirovSergey/TikhomirovSergey-server_flag_actualization
server flag actualization. The resolving of the merge conflict
2 parents f89acfd + 2abe32a commit 6f128ed

14 files changed

Lines changed: 1076 additions & 95 deletions
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* See the NOTICE file distributed with this work for additional
5+
* information regarding copyright ownership.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package io.appium.java_client.remote;
18+
19+
20+
import org.openqa.selenium.remote.CapabilityType;
21+
22+
/**
23+
* The list of Android-specific capabilities
24+
* Read: https://github.com/appium/appium/blob/1.5/docs/en/writing-running-appium/caps.md#android-only
25+
*/
26+
public interface AndroidMobileCapabilityType extends CapabilityType {
27+
/**
28+
* Activity name for the Android activity you want to launch from your package. This often needs to be preceded
29+
* by a . (e.g., .MainActivity instead of MainActivity)
30+
*/
31+
String APP_ACTIVITY = "appActivity";
32+
33+
/**
34+
* Java package of the Android app you want to run
35+
*/
36+
String APP_PACKAGE = "appPackage";
37+
38+
/**
39+
* Activity name for the Android activity you want to wait for
40+
*/
41+
String APP_WAIT_ACTIVITY = "appWaitActivity";
42+
43+
/**
44+
* Java package of the Android app you want to wait for
45+
*/
46+
String APP_WAIT_PACKAGE = "appWaitPackage";
47+
48+
/**
49+
* Timeout in seconds while waiting for device to become ready
50+
*/
51+
String DEVICE_READY_TIMEOUT = "deviceReadyTimeout";
52+
53+
/**
54+
* Fully qualified instrumentation class. Passed to -w in adb shell am instrument -e coverage true -w
55+
*/
56+
String ANDROID_COVERAGE = "androidCoverage";
57+
58+
/**
59+
* (Chrome and webview only) Enable Chromedriver's performance logging (default false)
60+
*/
61+
String ENABLE_PERFORMANCE_LOGGING = "enablePerformanceLogging";
62+
63+
/**
64+
* Timeout in seconds used to wait for a device to become ready after booting
65+
*/
66+
String ANDROID_DEVICE_READY_TIMEOUT = "androidDeviceReadyTimeout";
67+
68+
/**
69+
* Port used to connect to the ADB server (default 5037)
70+
*/
71+
String ADB_PORT = "adbPort";
72+
73+
/**
74+
* Devtools socket name. Needed only when tested app is a Chromium embedding browser.
75+
* The socket is open by the browser and Chromedriver connects to it as a devtools client.
76+
*/
77+
String ANDROID_DEVICE_SOCKET = "androidDeviceSocket";
78+
79+
/**
80+
* Name of avd to launch
81+
*/
82+
String AVD = "avd";
83+
84+
/**
85+
* How long to wait in milliseconds for an avd to launch and connect to ADB (default 120000)
86+
*/
87+
String AVD_LAUNCH_TIMEOUT = "avdLaunchTimeout";
88+
89+
/**
90+
* How long to wait in milliseconds for an avd to finish its boot animations (default 120000)
91+
*/
92+
String AVD_READY_TIMEOUT = "avdReadyTimeout";
93+
94+
/**
95+
* Additional emulator arguments used when launching an avd
96+
*/
97+
String AVD_ARGS = "avdArgs";
98+
99+
/**
100+
* Use a custom keystore to sign apks, default false
101+
*/
102+
String USE_KEYSTORE = "useKeystore";
103+
104+
/**
105+
* Path to custom keystore, default ~/.android/debug.keystore
106+
*/
107+
String KEYSTORE_PATH = "keystorePath";
108+
109+
/**
110+
* Password for custom keystore
111+
*/
112+
String KEYSTORE_PASSWORD = "keystorePassword";
113+
114+
/**
115+
* Alias for key
116+
*/
117+
String KEY_ALIAS = "keyAlias";
118+
119+
/**
120+
* Password for key
121+
*/
122+
String KEY_PASSWORD = "keyPassword";
123+
124+
/**
125+
* The absolute local path to webdriver executable (if Chromium embedder provides its own webdriver,
126+
* it should be used instead of original chromedriver bundled with Appium)
127+
*/
128+
String CHROMEDRIVER_EXECUTABLE = "chromedriverExecutable";
129+
130+
/**
131+
* Amount of time to wait for Webview context to become active, in ms. Defaults to 2000
132+
*/
133+
String AUTO_WEBVIEW_TIMEOUT = "autoWebviewTimeout";
134+
135+
/**
136+
* Intent action which will be used to start activity (default android.intent.action.MAIN)
137+
*/
138+
String INTENT_ACTION = "intentAction";
139+
140+
/**
141+
* Intent category which will be used to start activity (default android.intent.category.LAUNCHER)
142+
*/
143+
String INTENT_CATEGORY = "intentCategory";
144+
145+
/**
146+
* Flags that will be used to start activity (default 0x10200000)
147+
*/
148+
String INTENT_FLAGS = "intentFlags";
149+
150+
/**
151+
* Additional intent arguments that will be used to start activity. See Intent arguments:
152+
* http://developer.android.com/tools/help/adb.html#IntentSpec
153+
*/
154+
String OPTIONAL_INTENT_ARGUMENTS = "optionalIntentArguments";
155+
156+
/**
157+
* Doesn't stop the process of the app under test, before starting the app using adb.
158+
* If the app under test is created by another anchor app, setting this false,
159+
* allows the process of the anchor app to be still alive, during the start of the test app using adb.
160+
* In other words, with dontStopAppOnReset set to true, we will not include the -S flag in the adb shell am start call.
161+
* With this capability omitted or set to false, we include the -S flag. Default false
162+
*/
163+
String DONT_STOP_APP_ON_RESET = "dontStopAppOnReset";
164+
165+
/**
166+
* Enable Unicode input, default false
167+
*/
168+
String UNICODE_KEYBOARD = "unicodeKeyboard";
169+
170+
/**
171+
* Reset keyboard to its original state, after running Unicode tests with unicodeKeyboard capability.
172+
* Ignored if used alone. Default false
173+
*/
174+
String RESET_KEYBOARD = "resetKeyboard";
175+
176+
/**
177+
* Skip checking and signing of app with debug keys, will work only with
178+
* UiAutomator and not with selendroid, default false
179+
*/
180+
String NO_SIGN = "noSign";
181+
182+
/**
183+
* Calls the setCompressedLayoutHierarchy() uiautomator function. This capability can speed up test execution,
184+
* since Accessibility commands will run faster ignoring some elements. The ignored elements will not be findable,
185+
* which is why this capability has also been implemented as a toggle-able setting as well as a capability.
186+
* Defaults to false
187+
*/
188+
String IGNORE_UNIMPORTANT_VIEWS = "ignoreUnimportantViews";
189+
190+
/**
191+
* Disables android watchers that watch for application not responding and application crash,
192+
* this will reduce cpu usage on android device/emulator. This capability will work only with
193+
* UiAutomator and not with selendroid, default false
194+
*/
195+
String DISABLE_ANDROID_WATCHERS = "disableAndroidWatchers";
196+
197+
/**
198+
* Allows passing chromeOptions capability for ChromeDriver. For more information see chromeOptions:
199+
* https://sites.google.com/a/chromium.org/chromedriver/capabilities
200+
*/
201+
String CHROME_OPTIONS = "chromeOptions";
202+
203+
/**
204+
* Kill ChromeDriver session when moving to a non-ChromeDriver webview. Defaults to false
205+
*/
206+
String RECREATE_CHROME_DRIVER_SESSIONS = "recreateChromeDriverSessions";
207+
208+
String SELENDROID_PORT = "selendroidPort";
209+
}
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* See the NOTICE file distributed with this work for additional
5+
* information regarding copyright ownership.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package io.appium.java_client.remote;
17+
18+
import org.openqa.selenium.remote.CapabilityType;
19+
20+
/**
21+
* The list of iOS-specific capabilities
22+
* Read: https://github.com/appium/appium/blob/1.5/docs/en/writing-running-appium/caps.md#ios-only
23+
*/
24+
public interface IOSMobileCapabilityType extends CapabilityType {
25+
26+
/**
27+
* (Sim-only) Calendar format to set for the iOS Simulator
28+
*/
29+
String CALENDAR_FORMAT = "calendarFormat";
30+
31+
/**
32+
* Bundle ID of the app under test. Useful for starting an app on a real device or for using other caps which require
33+
* the bundle ID during test startup. To run a test on a real device using the bundle ID,
34+
* you may omit the 'app' capability, but you must provide 'udid'.
35+
*/
36+
String BUNDLE_ID = "bundleId";
37+
38+
/**
39+
* Amount of time in ms to wait for instruments before assuming it hung and failing the session
40+
*/
41+
String LAUNCH_TIMEOUT = "launchTimeout";
42+
43+
/**
44+
* (Sim-only) Force location services to be either on or off. Default is to keep current sim setting.
45+
*/
46+
String LOCATION_SERVICES_ENABLED = "locationServicesEnabled";
47+
48+
/**
49+
* (Sim-only) Set location services to be authorized or not authorized for app via plist, so that location services
50+
* alert doesn't pop up. Default is to keep current sim setting. Note that
51+
* if you use this setting you MUST also use the bundleId capability to send in your app's bundle ID.
52+
*/
53+
String LOCATION_SERVICES_AUTHORIZED = "locationServicesAuthorized";
54+
55+
/**
56+
* Accept all iOS alerts automatically if they pop up. This includes privacy access permission alerts
57+
* (e.g., location, contacts, photos). Default is false.
58+
*/
59+
String AUTO_ACCEPT_ALERTS = "autoAcceptAlerts";
60+
61+
/**
62+
* Dismiss all iOS alerts automatically if they pop up.
63+
* This includes privacy access permission alerts (e.g.,
64+
* location, contacts, photos). Default is false.
65+
*/
66+
String AUTO_DISMISS_ALERTS = "autoDismissAlerts";
67+
68+
/**
69+
* Use native intruments lib (ie disable instruments-without-delay).
70+
*/
71+
String NATIVE_INSTRUMENTS_LIB = "nativeInstrumentsLib";
72+
73+
/**
74+
* (Sim-only) Enable "real", non-javascript-based web taps in Safari.
75+
* Default: false.
76+
* Warning: depending on viewport size/ratio this might not accurately tap an element
77+
*/
78+
String NATIVE_WEB_TAP = "nativeWebTap";
79+
80+
/**
81+
* (Sim-only) (>= 8.1) Initial safari url, default is a local welcome page
82+
*/
83+
String SAFARI_INITIAL_URL = "safariInitialUrl";
84+
85+
/**
86+
* (Sim-only) Allow javascript to open new windows in Safari. Default keeps current sim setting
87+
*/
88+
String SAFARI_ALLOW_POPUPS = "safariAllowPopups";
89+
90+
/**
91+
* (Sim-only) Prevent Safari from showing a fraudulent website warning. Default keeps current sim setting.
92+
*/
93+
String SAFARI_IGNORE_FRAUD_WARNING = "safariIgnoreFraudWarning";
94+
95+
/**
96+
* (Sim-only) Whether Safari should allow links to open in new windows. Default keeps current sim setting.
97+
*/
98+
String SAFARI_OPEN_LINKS_IN_BACKGROUND = "safariOpenLinksInBackground";
99+
100+
/**
101+
* (Sim-only) Whether to keep keychains (Library/Keychains) when appium session is started/finished
102+
*/
103+
String KEEP_KEY_CHAINS = "keepKeyChains";
104+
105+
/**
106+
* Where to look for localizable strings. Default en.lproj
107+
*/
108+
String LOCALIZABLE_STRINGS_DIR = "localizableStringsDir";
109+
110+
/**
111+
* Arguments to pass to the AUT using instruments
112+
*/
113+
String PROCESS_ARGUMENTS = "processArguments";
114+
115+
/**
116+
* The delay, in ms, between keystrokes sent to an element when typing.
117+
*/
118+
String INTER_KEY_DELAY = "interKeyDelay";
119+
120+
/**
121+
* Whether to show any logs captured from a device in the appium logs. Default false
122+
*/
123+
String SHOW_IOS_LOG = "showIOSLog";
124+
125+
/**
126+
* strategy to use to type test into a test field. Simulator default: oneByOne. Real device default: grouped
127+
*/
128+
String SEND_KEY_STRATEGY = "sendKeyStrategy";
129+
130+
/**
131+
* Max timeout in sec to wait for a screenshot to be generated. default: 10
132+
*/
133+
String SCREENSHOT_WAIT_TIMEOUT = "screenshotWaitTimeout";
134+
135+
/**
136+
* The ios automation script used to determined if the app has been launched,
137+
* by default the system wait for the page source not to be empty. The result must be a boolean
138+
*/
139+
String WAIT_FOR_APP_SCRIPT = "waitForAppScript";
140+
141+
/**
142+
* Number of times to send connection message to remote debugger, to get webview. Default: 8
143+
*/
144+
String WEBVIEW_CONNECT_RETRIES = "webviewConnectRetries";
145+
146+
/**
147+
* The display name of the application under test. Used to automate backgrounding the app in iOS 9+.
148+
*/
149+
String APP_NAME = "appName";
150+
}

0 commit comments

Comments
 (0)