digital-ai-testing-mcp 1.2.2
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/LICENSE +197 -0
- package/README.md +984 -0
- package/dist/api/agents.d.ts +5 -0
- package/dist/api/agents.d.ts.map +1 -0
- package/dist/api/agents.js +33 -0
- package/dist/api/agents.js.map +1 -0
- package/dist/api/applications.d.ts +35 -0
- package/dist/api/applications.d.ts.map +1 -0
- package/dist/api/applications.js +162 -0
- package/dist/api/applications.js.map +1 -0
- package/dist/api/backup.d.ts +4 -0
- package/dist/api/backup.d.ts.map +1 -0
- package/dist/api/backup.js +13 -0
- package/dist/api/backup.js.map +1 -0
- package/dist/api/browser-inspection.d.ts +33 -0
- package/dist/api/browser-inspection.d.ts.map +1 -0
- package/dist/api/browser-inspection.js +273 -0
- package/dist/api/browser-inspection.js.map +1 -0
- package/dist/api/browsers.d.ts +20 -0
- package/dist/api/browsers.d.ts.map +1 -0
- package/dist/api/browsers.js +31 -0
- package/dist/api/browsers.js.map +1 -0
- package/dist/api/client.d.ts +33 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +200 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/device-groups.d.ts +15 -0
- package/dist/api/device-groups.d.ts.map +1 -0
- package/dist/api/device-groups.js +106 -0
- package/dist/api/device-groups.js.map +1 -0
- package/dist/api/devices.d.ts +32 -0
- package/dist/api/devices.d.ts.map +1 -0
- package/dist/api/devices.js +192 -0
- package/dist/api/devices.js.map +1 -0
- package/dist/api/license.d.ts +3 -0
- package/dist/api/license.d.ts.map +1 -0
- package/dist/api/license.js +11 -0
- package/dist/api/license.js.map +1 -0
- package/dist/api/nv-servers.d.ts +4 -0
- package/dist/api/nv-servers.d.ts.map +1 -0
- package/dist/api/nv-servers.js +20 -0
- package/dist/api/nv-servers.js.map +1 -0
- package/dist/api/projects.d.ts +36 -0
- package/dist/api/projects.d.ts.map +1 -0
- package/dist/api/projects.js +246 -0
- package/dist/api/projects.js.map +1 -0
- package/dist/api/provisioning-profiles.d.ts +7 -0
- package/dist/api/provisioning-profiles.d.ts.map +1 -0
- package/dist/api/provisioning-profiles.js +54 -0
- package/dist/api/provisioning-profiles.js.map +1 -0
- package/dist/api/regions.d.ts +4 -0
- package/dist/api/regions.d.ts.map +1 -0
- package/dist/api/regions.js +20 -0
- package/dist/api/regions.js.map +1 -0
- package/dist/api/reporter-projects.d.ts +3 -0
- package/dist/api/reporter-projects.d.ts.map +1 -0
- package/dist/api/reporter-projects.js +13 -0
- package/dist/api/reporter-projects.js.map +1 -0
- package/dist/api/reporting.d.ts +28 -0
- package/dist/api/reporting.d.ts.map +1 -0
- package/dist/api/reporting.js +340 -0
- package/dist/api/reporting.js.map +1 -0
- package/dist/api/repository.d.ts +17 -0
- package/dist/api/repository.d.ts.map +1 -0
- package/dist/api/repository.js +81 -0
- package/dist/api/repository.js.map +1 -0
- package/dist/api/reservations.d.ts +9 -0
- package/dist/api/reservations.d.ts.map +1 -0
- package/dist/api/reservations.js +72 -0
- package/dist/api/reservations.js.map +1 -0
- package/dist/api/sessions.d.ts +3 -0
- package/dist/api/sessions.d.ts.map +1 -0
- package/dist/api/sessions.js +12 -0
- package/dist/api/sessions.js.map +1 -0
- package/dist/api/test-views.d.ts +9 -0
- package/dist/api/test-views.d.ts.map +1 -0
- package/dist/api/test-views.js +77 -0
- package/dist/api/test-views.js.map +1 -0
- package/dist/api/transactions.d.ts +4 -0
- package/dist/api/transactions.d.ts.map +1 -0
- package/dist/api/transactions.js +28 -0
- package/dist/api/transactions.js.map +1 -0
- package/dist/api/usage-reports.d.ts +24 -0
- package/dist/api/usage-reports.d.ts.map +1 -0
- package/dist/api/usage-reports.js +47 -0
- package/dist/api/usage-reports.js.map +1 -0
- package/dist/api/users.d.ts +14 -0
- package/dist/api/users.d.ts.map +1 -0
- package/dist/api/users.js +77 -0
- package/dist/api/users.js.map +1 -0
- package/dist/api/webdriver.d.ts +97 -0
- package/dist/api/webdriver.d.ts.map +1 -0
- package/dist/api/webdriver.js +1183 -0
- package/dist/api/webdriver.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +130 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/agent-tools.d.ts +3 -0
- package/dist/tools/agent-tools.d.ts.map +1 -0
- package/dist/tools/agent-tools.js +74 -0
- package/dist/tools/agent-tools.js.map +1 -0
- package/dist/tools/application-tools.d.ts +3 -0
- package/dist/tools/application-tools.d.ts.map +1 -0
- package/dist/tools/application-tools.js +816 -0
- package/dist/tools/application-tools.js.map +1 -0
- package/dist/tools/backup-tools.d.ts +3 -0
- package/dist/tools/backup-tools.d.ts.map +1 -0
- package/dist/tools/backup-tools.js +33 -0
- package/dist/tools/backup-tools.js.map +1 -0
- package/dist/tools/boilerplate-tools.d.ts +9 -0
- package/dist/tools/boilerplate-tools.d.ts.map +1 -0
- package/dist/tools/boilerplate-tools.js +1365 -0
- package/dist/tools/boilerplate-tools.js.map +1 -0
- package/dist/tools/browser-tools.d.ts +3 -0
- package/dist/tools/browser-tools.d.ts.map +1 -0
- package/dist/tools/browser-tools.js +108 -0
- package/dist/tools/browser-tools.js.map +1 -0
- package/dist/tools/coverage-tools.d.ts +3 -0
- package/dist/tools/coverage-tools.d.ts.map +1 -0
- package/dist/tools/coverage-tools.js +148 -0
- package/dist/tools/coverage-tools.js.map +1 -0
- package/dist/tools/debug-tools.d.ts +3 -0
- package/dist/tools/debug-tools.d.ts.map +1 -0
- package/dist/tools/debug-tools.js +315 -0
- package/dist/tools/debug-tools.js.map +1 -0
- package/dist/tools/device-group-tools.d.ts +3 -0
- package/dist/tools/device-group-tools.d.ts.map +1 -0
- package/dist/tools/device-group-tools.js +284 -0
- package/dist/tools/device-group-tools.js.map +1 -0
- package/dist/tools/device-tools.d.ts +3 -0
- package/dist/tools/device-tools.d.ts.map +1 -0
- package/dist/tools/device-tools.js +757 -0
- package/dist/tools/device-tools.js.map +1 -0
- package/dist/tools/health-tools.d.ts +3 -0
- package/dist/tools/health-tools.d.ts.map +1 -0
- package/dist/tools/health-tools.js +368 -0
- package/dist/tools/health-tools.js.map +1 -0
- package/dist/tools/inspection-tools.d.ts +3 -0
- package/dist/tools/inspection-tools.d.ts.map +1 -0
- package/dist/tools/inspection-tools.js +1170 -0
- package/dist/tools/inspection-tools.js.map +1 -0
- package/dist/tools/meta-tools.d.ts +4 -0
- package/dist/tools/meta-tools.d.ts.map +1 -0
- package/dist/tools/meta-tools.js +412 -0
- package/dist/tools/meta-tools.js.map +1 -0
- package/dist/tools/nv-server-tools.d.ts +3 -0
- package/dist/tools/nv-server-tools.d.ts.map +1 -0
- package/dist/tools/nv-server-tools.js +67 -0
- package/dist/tools/nv-server-tools.js.map +1 -0
- package/dist/tools/performance-tools.d.ts +3 -0
- package/dist/tools/performance-tools.d.ts.map +1 -0
- package/dist/tools/performance-tools.js +295 -0
- package/dist/tools/performance-tools.js.map +1 -0
- package/dist/tools/project-tools.d.ts +3 -0
- package/dist/tools/project-tools.d.ts.map +1 -0
- package/dist/tools/project-tools.js +577 -0
- package/dist/tools/project-tools.js.map +1 -0
- package/dist/tools/prompt-tools.d.ts +3 -0
- package/dist/tools/prompt-tools.d.ts.map +1 -0
- package/dist/tools/prompt-tools.js +570 -0
- package/dist/tools/prompt-tools.js.map +1 -0
- package/dist/tools/provisioning-profile-tools.d.ts +3 -0
- package/dist/tools/provisioning-profile-tools.d.ts.map +1 -0
- package/dist/tools/provisioning-profile-tools.js +169 -0
- package/dist/tools/provisioning-profile-tools.js.map +1 -0
- package/dist/tools/region-tools.d.ts +3 -0
- package/dist/tools/region-tools.d.ts.map +1 -0
- package/dist/tools/region-tools.js +46 -0
- package/dist/tools/region-tools.js.map +1 -0
- package/dist/tools/reporting-tools.d.ts +3 -0
- package/dist/tools/reporting-tools.d.ts.map +1 -0
- package/dist/tools/reporting-tools.js +1105 -0
- package/dist/tools/reporting-tools.js.map +1 -0
- package/dist/tools/repository-tools.d.ts +3 -0
- package/dist/tools/repository-tools.d.ts.map +1 -0
- package/dist/tools/repository-tools.js +208 -0
- package/dist/tools/repository-tools.js.map +1 -0
- package/dist/tools/reservation-tools.d.ts +3 -0
- package/dist/tools/reservation-tools.d.ts.map +1 -0
- package/dist/tools/reservation-tools.js +199 -0
- package/dist/tools/reservation-tools.js.map +1 -0
- package/dist/tools/resources.d.ts +3 -0
- package/dist/tools/resources.d.ts.map +1 -0
- package/dist/tools/resources.js +91 -0
- package/dist/tools/resources.js.map +1 -0
- package/dist/tools/test-view-tools.d.ts +3 -0
- package/dist/tools/test-view-tools.d.ts.map +1 -0
- package/dist/tools/test-view-tools.js +242 -0
- package/dist/tools/test-view-tools.js.map +1 -0
- package/dist/tools/transaction-tools.d.ts +3 -0
- package/dist/tools/transaction-tools.d.ts.map +1 -0
- package/dist/tools/transaction-tools.js +391 -0
- package/dist/tools/transaction-tools.js.map +1 -0
- package/dist/tools/usage-report-tools.d.ts +3 -0
- package/dist/tools/usage-report-tools.d.ts.map +1 -0
- package/dist/tools/usage-report-tools.js +160 -0
- package/dist/tools/usage-report-tools.js.map +1 -0
- package/dist/tools/user-tools.d.ts +3 -0
- package/dist/tools/user-tools.d.ts.map +1 -0
- package/dist/tools/user-tools.js +279 -0
- package/dist/tools/user-tools.js.map +1 -0
- package/dist/tools/web-inspection-tools.d.ts +3 -0
- package/dist/tools/web-inspection-tools.d.ts.map +1 -0
- package/dist/tools/web-inspection-tools.js +416 -0
- package/dist/tools/web-inspection-tools.js.map +1 -0
- package/dist/tools/workflow-tools.d.ts +3 -0
- package/dist/tools/workflow-tools.d.ts.map +1 -0
- package/dist/tools/workflow-tools.js +1136 -0
- package/dist/tools/workflow-tools.js.map +1 -0
- package/dist/types/digital-ai.d.ts +691 -0
- package/dist/types/digital-ai.d.ts.map +1 -0
- package/dist/types/digital-ai.js +3 -0
- package/dist/types/digital-ai.js.map +1 -0
- package/dist/utils/csv.d.ts +6 -0
- package/dist/utils/csv.d.ts.map +1 -0
- package/dist/utils/csv.js +77 -0
- package/dist/utils/csv.js.map +1 -0
- package/dist/utils/destructive-guard.d.ts +2 -0
- package/dist/utils/destructive-guard.d.ts.map +1 -0
- package/dist/utils/destructive-guard.js +13 -0
- package/dist/utils/destructive-guard.js.map +1 -0
- package/dist/utils/device-resolver.d.ts +22 -0
- package/dist/utils/device-resolver.d.ts.map +1 -0
- package/dist/utils/device-resolver.js +69 -0
- package/dist/utils/device-resolver.js.map +1 -0
- package/dist/utils/download-command.d.ts +18 -0
- package/dist/utils/download-command.d.ts.map +1 -0
- package/dist/utils/download-command.js +54 -0
- package/dist/utils/download-command.js.map +1 -0
- package/dist/utils/locality.d.ts +9 -0
- package/dist/utils/locality.d.ts.map +1 -0
- package/dist/utils/locality.js +22 -0
- package/dist/utils/locality.js.map +1 -0
- package/dist/utils/output-format.d.ts +13 -0
- package/dist/utils/output-format.d.ts.map +1 -0
- package/dist/utils/output-format.js +13 -0
- package/dist/utils/output-format.js.map +1 -0
- package/dist/utils/pagination.d.ts +12 -0
- package/dist/utils/pagination.d.ts.map +1 -0
- package/dist/utils/pagination.js +24 -0
- package/dist/utils/pagination.js.map +1 -0
- package/dist/utils/path-guard.d.ts +17 -0
- package/dist/utils/path-guard.d.ts.map +1 -0
- package/dist/utils/path-guard.js +41 -0
- package/dist/utils/path-guard.js.map +1 -0
- package/dist/utils/performance-comparison.d.ts +53 -0
- package/dist/utils/performance-comparison.d.ts.map +1 -0
- package/dist/utils/performance-comparison.js +286 -0
- package/dist/utils/performance-comparison.js.map +1 -0
- package/dist/utils/performance-stats.d.ts +72 -0
- package/dist/utils/performance-stats.d.ts.map +1 -0
- package/dist/utils/performance-stats.js +124 -0
- package/dist/utils/performance-stats.js.map +1 -0
- package/dist/utils/profile-loader.d.ts +37 -0
- package/dist/utils/profile-loader.d.ts.map +1 -0
- package/dist/utils/profile-loader.js +80 -0
- package/dist/utils/profile-loader.js.map +1 -0
- package/dist/utils/response-formatter.d.ts +27 -0
- package/dist/utils/response-formatter.d.ts.map +1 -0
- package/dist/utils/response-formatter.js +493 -0
- package/dist/utils/response-formatter.js.map +1 -0
- package/dist/utils/timestamp.d.ts +12 -0
- package/dist/utils/timestamp.d.ts.map +1 -0
- package/dist/utils/timestamp.js +22 -0
- package/dist/utils/timestamp.js.map +1 -0
- package/dist/utils/tool-registry.d.ts +21 -0
- package/dist/utils/tool-registry.d.ts.map +1 -0
- package/dist/utils/tool-registry.js +137 -0
- package/dist/utils/tool-registry.js.map +1 -0
- package/dist/utils/upload-command.d.ts +20 -0
- package/dist/utils/upload-command.d.ts.map +1 -0
- package/dist/utils/upload-command.js +64 -0
- package/dist/utils/upload-command.js.map +1 -0
- package/dist/utils/usage-report-guard.d.ts +48 -0
- package/dist/utils/usage-report-guard.d.ts.map +1 -0
- package/dist/utils/usage-report-guard.js +88 -0
- package/dist/utils/usage-report-guard.js.map +1 -0
- package/dist/utils/usage-report-summary.d.ts +20 -0
- package/dist/utils/usage-report-summary.d.ts.map +1 -0
- package/dist/utils/usage-report-summary.js +48 -0
- package/dist/utils/usage-report-summary.js.map +1 -0
- package/dist/utils/version.d.ts +2 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +24 -0
- package/dist/utils/version.js.map +1 -0
- package/package.json +73 -0
- package/resources/boilerplate/Android-Native/Java JUnit5/AndroidNative-oss.java +58 -0
- package/resources/boilerplate/Android-Native/Java JUnit5/AndroidNative.java +67 -0
- package/resources/boilerplate/Android-Native/Java JUnit5/gradle +10 -0
- package/resources/boilerplate/Android-Native/Java JUnit5/gradle-oss +10 -0
- package/resources/boilerplate/Android-Native/Java JUnit5/maven +42 -0
- package/resources/boilerplate/Android-Native/Java JUnit5/maven-oss +42 -0
- package/resources/boilerplate/Android-Native/NodeJS (WebDriver)/AndroidNative.js +30 -0
- package/resources/boilerplate/Android-Native/NodeJS (WebDriver)/Shell +19 -0
- package/resources/boilerplate/Android-Native/NodeJS (WebDriver)/Shell-oss +19 -0
- package/resources/boilerplate/Android-Native/NodeJS (WebDriver)/package-oss.json +12 -0
- package/resources/boilerplate/Android-Native/NodeJS (WebDriver)/package.json +12 -0
- package/resources/boilerplate/Android-Native/NodeJS (WebDriver)/wdio-oss.conf.js +40 -0
- package/resources/boilerplate/Android-Native/NodeJS (WebDriver)/wdio.conf.js +44 -0
- package/resources/boilerplate/Android-Native/Python/AndroidNative-oss.py +49 -0
- package/resources/boilerplate/Android-Native/Python/AndroidNative.py +69 -0
- package/resources/boilerplate/Android-Native/Python/pip +2 -0
- package/resources/boilerplate/Android-Native/Python/pip-oss +1 -0
- package/resources/boilerplate/Android-Native/java TestNG/AndroidNative-oss.java +58 -0
- package/resources/boilerplate/Android-Native/java TestNG/AndroidNative.java +67 -0
- package/resources/boilerplate/Android-Native/java TestNG/gradle +13 -0
- package/resources/boilerplate/Android-Native/java TestNG/gradle-oss +13 -0
- package/resources/boilerplate/Android-Native/java TestNG/maven +42 -0
- package/resources/boilerplate/Android-Native/java TestNG/maven-oss +42 -0
- package/resources/boilerplate/iOS-Native/NodeJS (WebDriver)/Shell-oss.txt +19 -0
- package/resources/boilerplate/iOS-Native/NodeJS (WebDriver)/Shell.txt +19 -0
- package/resources/boilerplate/iOS-Native/NodeJS (WebDriver)/iOSNative.js +30 -0
- package/resources/boilerplate/iOS-Native/NodeJS (WebDriver)/package-oss.json +12 -0
- package/resources/boilerplate/iOS-Native/NodeJS (WebDriver)/package.json +12 -0
- package/resources/boilerplate/iOS-Native/NodeJS (WebDriver)/wdio-oss.conf.js +35 -0
- package/resources/boilerplate/iOS-Native/NodeJS (WebDriver)/wdio.conf.js +39 -0
- package/resources/boilerplate/iOS-Native/Python/iOSNative-oss.py +44 -0
- package/resources/boilerplate/iOS-Native/Python/iOSNative.py +62 -0
- package/resources/boilerplate/iOS-Native/Python/pip-oss.txt +1 -0
- package/resources/boilerplate/iOS-Native/Python/pip.txt +2 -0
- package/resources/boilerplate/iOS-Native/java-JUnit5/gradle +10 -0
- package/resources/boilerplate/iOS-Native/java-JUnit5/gradle-oss +10 -0
- package/resources/boilerplate/iOS-Native/java-JUnit5/iOSNative-oss.java +52 -0
- package/resources/boilerplate/iOS-Native/java-JUnit5/iOSNative.java +59 -0
- package/resources/boilerplate/iOS-Native/java-JUnit5/maven +42 -0
- package/resources/boilerplate/iOS-Native/java-JUnit5/maven-oss +42 -0
- package/resources/boilerplate/iOS-Native/java-TestNG/gradle +13 -0
- package/resources/boilerplate/iOS-Native/java-TestNG/gradle-oss +13 -0
- package/resources/boilerplate/iOS-Native/java-TestNG/iOSNative-oss.java +52 -0
- package/resources/boilerplate/iOS-Native/java-TestNG/iOSNative.java +59 -0
- package/resources/boilerplate/iOS-Native/java-TestNG/maven +42 -0
- package/resources/boilerplate/iOS-Native/java-TestNG/maven-oss +42 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import io.appium.java_client.android.AndroidDriver;
|
|
2
|
+
import io.appium.java_client.android.AndroidElement;
|
|
3
|
+
import io.appium.java_client.remote.AndroidMobileCapabilityType;
|
|
4
|
+
import io.appium.java_client.remote.MobileCapabilityType;
|
|
5
|
+
import org.testng.annotations.*;
|
|
6
|
+
import org.openqa.selenium.By;
|
|
7
|
+
import org.openqa.selenium.ScreenOrientation;
|
|
8
|
+
import org.openqa.selenium.remote.DesiredCapabilities;
|
|
9
|
+
|
|
10
|
+
import java.net.MalformedURLException;
|
|
11
|
+
import java.net.URL;
|
|
12
|
+
|
|
13
|
+
public class LocalAndroidTest {
|
|
14
|
+
|
|
15
|
+
protected AndroidDriver<AndroidElement> driver = null;
|
|
16
|
+
DesiredCapabilities dc = new DesiredCapabilities();
|
|
17
|
+
private String accessKey = "[Enter Your Access key here]";
|
|
18
|
+
|
|
19
|
+
@BeforeTest
|
|
20
|
+
public void setUp() throws MalformedURLException {
|
|
21
|
+
dc.setCapability("digitalai:testName", "[Enter Test Name here]");
|
|
22
|
+
dc.setCapability("digitalai:accessKey", accessKey);
|
|
23
|
+
dc.setCapability("digitalai:deviceQuery", "@os='android' and @category='[Enter PHONE/TABLET here]'");
|
|
24
|
+
dc.setCapability(MobileCapabilityType.APP, "cloud:com.experitest.ExperiBank/.LoginActivity");
|
|
25
|
+
dc.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, "com.experitest.ExperiBank");
|
|
26
|
+
dc.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, ".LoginActivity");
|
|
27
|
+
dc.setCapability("autoDismissAlerts", true);
|
|
28
|
+
dc.setCapability("autoGrantPermissions", true);
|
|
29
|
+
// System-level overlays (charging dialog, USB prompt) are outside the app hierarchy and are
|
|
30
|
+
// NOT caught by autoDismissAlerts. If they block tests, call after driver init:
|
|
31
|
+
// java.util.Map<String,Object> _args = new java.util.HashMap<>();
|
|
32
|
+
// _args.put("command", "am");
|
|
33
|
+
// _args.put("args", java.util.Arrays.asList("broadcast","-a","android.intent.action.CLOSE_SYSTEM_DIALOGS"));
|
|
34
|
+
// driver.executeScript("mobile: shell", _args);
|
|
35
|
+
// "Detected dialect: OSS" at startup is expected — the platform uses the legacy JSON Wire Protocol.
|
|
36
|
+
driver = new AndroidDriver<>(new URL("[Enter Instance here]/wd/hub"), dc);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@Test
|
|
40
|
+
public void quickStartAndroidNativeDemo() {
|
|
41
|
+
// [BEGIN_DEMO_STEPS]
|
|
42
|
+
driver.rotate(ScreenOrientation.PORTRAIT);
|
|
43
|
+
driver.findElement(By.id("com.experitest.ExperiBank:id/usernameTextField")).sendKeys("company");
|
|
44
|
+
driver.findElement(By.id("com.experitest.ExperiBank:id/passwordTextField")).sendKeys("company");
|
|
45
|
+
driver.findElement(By.id("com.experitest.ExperiBank:id/loginButton")).click();
|
|
46
|
+
driver.findElement(By.id("com.experitest.ExperiBank:id/makePaymentButton")).click();
|
|
47
|
+
driver.findElement(By.id("com.experitest.ExperiBank:id/phoneTextField")).sendKeys("0501234567");
|
|
48
|
+
driver.findElement(By.id("com.experitest.ExperiBank:id/nameTextField")).sendKeys("John Snow");
|
|
49
|
+
driver.findElement(By.id("com.experitest.ExperiBank:id/amountTextField")).sendKeys("50");
|
|
50
|
+
driver.findElement(By.id("com.experitest.ExperiBank:id/countryTextField")).sendKeys("'Switzerland'");
|
|
51
|
+
driver.findElement(By.id("com.experitest.ExperiBank:id/sendPaymentButton")).click();
|
|
52
|
+
driver.findElement(By.id("android:id/button1")).click();
|
|
53
|
+
// [END_DEMO_STEPS]
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@AfterTest
|
|
57
|
+
public void tearDown() {
|
|
58
|
+
if (driver == null) return;
|
|
59
|
+
try {
|
|
60
|
+
System.out.println("Report URL: " + driver.getCapabilities().getCapability("digitalai:reportUrl"));
|
|
61
|
+
System.out.println("Report Test ID: " + driver.getCapabilities().getCapability("digitalai:reportTestId"));
|
|
62
|
+
} catch (Exception ignored) {}
|
|
63
|
+
try {
|
|
64
|
+
driver.quit();
|
|
65
|
+
} catch (Exception ignored) {}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
apply plugin: 'java'
|
|
2
|
+
|
|
3
|
+
// Standalone use only — remove if this module is part of a larger Gradle project
|
|
4
|
+
// repositories { mavenCentral() }
|
|
5
|
+
|
|
6
|
+
test {
|
|
7
|
+
useTestNG()
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
dependencies {
|
|
11
|
+
testImplementation group: 'org.testng', name: 'testng', version: '7.6.1'
|
|
12
|
+
testImplementation group: 'io.appium', name: 'java-client', version: '7.6.0'
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
apply plugin: 'java'
|
|
2
|
+
|
|
3
|
+
// Standalone use only — remove if this module is part of a larger Gradle project
|
|
4
|
+
// repositories { mavenCentral() }
|
|
5
|
+
|
|
6
|
+
test {
|
|
7
|
+
useTestNG()
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
dependencies {
|
|
11
|
+
testImplementation group: 'org.testng', name: 'testng', version: '7.9.0'
|
|
12
|
+
testImplementation group: 'io.appium', name: 'java-client', version: '8.6.0'
|
|
13
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
3
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
4
|
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
5
|
+
<modelVersion>4.0.0</modelVersion>
|
|
6
|
+
|
|
7
|
+
<groupId>maven</groupId>
|
|
8
|
+
<artifactId>maven</artifactId>
|
|
9
|
+
<version>1.0-SNAPSHOT</version>
|
|
10
|
+
<build>
|
|
11
|
+
<plugins>
|
|
12
|
+
<plugin>
|
|
13
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
14
|
+
<artifactId>maven-compiler-plugin</artifactId>
|
|
15
|
+
<version>3.11.0</version>
|
|
16
|
+
<configuration>
|
|
17
|
+
<source>8</source>
|
|
18
|
+
<target>8</target>
|
|
19
|
+
</configuration>
|
|
20
|
+
</plugin>
|
|
21
|
+
<plugin>
|
|
22
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
23
|
+
<artifactId>maven-surefire-plugin</artifactId>
|
|
24
|
+
<version>3.1.2</version>
|
|
25
|
+
</plugin>
|
|
26
|
+
</plugins>
|
|
27
|
+
</build>
|
|
28
|
+
|
|
29
|
+
<dependencies>
|
|
30
|
+
<dependency>
|
|
31
|
+
<groupId>org.testng</groupId>
|
|
32
|
+
<artifactId>testng</artifactId>
|
|
33
|
+
<version>7.6.1</version>
|
|
34
|
+
<scope>test</scope>
|
|
35
|
+
</dependency>
|
|
36
|
+
<dependency>
|
|
37
|
+
<groupId>io.appium</groupId>
|
|
38
|
+
<artifactId>java-client</artifactId>
|
|
39
|
+
<version>7.6.0</version>
|
|
40
|
+
</dependency>
|
|
41
|
+
</dependencies>
|
|
42
|
+
</project>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
3
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
4
|
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
5
|
+
<modelVersion>4.0.0</modelVersion>
|
|
6
|
+
|
|
7
|
+
<groupId>maven</groupId>
|
|
8
|
+
<artifactId>maven</artifactId>
|
|
9
|
+
<version>1.0-SNAPSHOT</version>
|
|
10
|
+
<build>
|
|
11
|
+
<plugins>
|
|
12
|
+
<plugin>
|
|
13
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
14
|
+
<artifactId>maven-compiler-plugin</artifactId>
|
|
15
|
+
<version>3.11.0</version>
|
|
16
|
+
<configuration>
|
|
17
|
+
<source>11</source>
|
|
18
|
+
<target>11</target>
|
|
19
|
+
</configuration>
|
|
20
|
+
</plugin>
|
|
21
|
+
<plugin>
|
|
22
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
23
|
+
<artifactId>maven-surefire-plugin</artifactId>
|
|
24
|
+
<version>3.1.2</version>
|
|
25
|
+
</plugin>
|
|
26
|
+
</plugins>
|
|
27
|
+
</build>
|
|
28
|
+
|
|
29
|
+
<dependencies>
|
|
30
|
+
<dependency>
|
|
31
|
+
<groupId>org.testng</groupId>
|
|
32
|
+
<artifactId>testng</artifactId>
|
|
33
|
+
<version>7.9.0</version>
|
|
34
|
+
<scope>test</scope>
|
|
35
|
+
</dependency>
|
|
36
|
+
<dependency>
|
|
37
|
+
<groupId>io.appium</groupId>
|
|
38
|
+
<artifactId>java-client</artifactId>
|
|
39
|
+
<version>8.6.0</version>
|
|
40
|
+
</dependency>
|
|
41
|
+
</dependencies>
|
|
42
|
+
</project>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Setup
|
|
2
|
+
|
|
3
|
+
# 1. Create the project folder
|
|
4
|
+
mkdir my-appium-tests
|
|
5
|
+
cd my-appium-tests
|
|
6
|
+
|
|
7
|
+
# 2. Save the provided files into this layout:
|
|
8
|
+
# package.json ← project root
|
|
9
|
+
# wdio.conf.js ← project root
|
|
10
|
+
# test/specs/iOSNative.js
|
|
11
|
+
|
|
12
|
+
mkdir -p test/specs
|
|
13
|
+
# (copy each file from the boilerplate output into the path shown above)
|
|
14
|
+
|
|
15
|
+
# 3. Install dependencies
|
|
16
|
+
npm install
|
|
17
|
+
|
|
18
|
+
# 4. Run the test
|
|
19
|
+
npm run wdio
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Setup — do NOT run 'npm init wdio' (installs v9, incompatible with Digital.ai Appium Grid)
|
|
2
|
+
|
|
3
|
+
# 1. Create the project folder
|
|
4
|
+
mkdir my-appium-tests
|
|
5
|
+
cd my-appium-tests
|
|
6
|
+
|
|
7
|
+
# 2. Save the provided files into this layout:
|
|
8
|
+
# package.json ← project root
|
|
9
|
+
# wdio.conf.js ← project root
|
|
10
|
+
# test/specs/iOSNative.js
|
|
11
|
+
|
|
12
|
+
mkdir -p test/specs
|
|
13
|
+
# (copy each file from the boilerplate output into the path shown above)
|
|
14
|
+
|
|
15
|
+
# 3. Install dependencies (wdio v7 — pinned in package.json)
|
|
16
|
+
npm install
|
|
17
|
+
|
|
18
|
+
# 4. Run the test
|
|
19
|
+
npm run wdio
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
describe('LocaliOSTest', () => {
|
|
2
|
+
it('[testNameHere]', myTest)
|
|
3
|
+
})
|
|
4
|
+
async function myTest() {
|
|
5
|
+
// [BEGIN_DEMO_STEPS]
|
|
6
|
+
const username = await $('//*[@name="usernameTextField"]');
|
|
7
|
+
await username.setValue('company');
|
|
8
|
+
const password = await $('//*[@name="passwordTextField"]');
|
|
9
|
+
await password.setValue('company');
|
|
10
|
+
const loginButton = await $('//*[@name="loginButton"]');
|
|
11
|
+
await loginButton.click();
|
|
12
|
+
const makePaymentButton = await $('//*[@name="makePaymentButton"]');
|
|
13
|
+
await makePaymentButton.click();
|
|
14
|
+
const phoneNumber = await $("//*[@name='phoneTextField']");
|
|
15
|
+
await phoneNumber.setValue('0541234567');
|
|
16
|
+
const name = await $("//*[@name='nameTextField']");
|
|
17
|
+
await name.setValue('Jon Snow');
|
|
18
|
+
const amount = await $("//*[@name='amountTextField']");
|
|
19
|
+
await amount.setValue('50');
|
|
20
|
+
const countryButton = await $("//*[@name='countryButton']");
|
|
21
|
+
await countryButton.click();
|
|
22
|
+
const country = await $("//*[@name='Switzerland']");
|
|
23
|
+
await country.click();
|
|
24
|
+
const sendPaymentButton = await $("//*[@name='sendPaymentButton']");
|
|
25
|
+
await sendPaymentButton.click();
|
|
26
|
+
const yesButton = await $("//*[@name='Yes']");
|
|
27
|
+
await yesButton.click();
|
|
28
|
+
// [END_DEMO_STEPS]
|
|
29
|
+
}
|
|
30
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "digital-ai-appium-tests",
|
|
3
|
+
"devDependencies": {
|
|
4
|
+
"@wdio/cli": "^9.0.0",
|
|
5
|
+
"@wdio/local-runner": "^9.0.0",
|
|
6
|
+
"@wdio/mocha-framework": "^9.0.0",
|
|
7
|
+
"@wdio/spec-reporter": "^9.0.0"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"wdio": "wdio run ./wdio.conf.js"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "digital-ai-appium-tests",
|
|
3
|
+
"devDependencies": {
|
|
4
|
+
"@wdio/cli": "^7.40.0",
|
|
5
|
+
"@wdio/local-runner": "^7.40.0",
|
|
6
|
+
"@wdio/mocha-framework": "^7.40.0",
|
|
7
|
+
"@wdio/spec-reporter": "^7.40.0"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"wdio": "wdio run ./wdio.conf.js"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
exports.config = {
|
|
2
|
+
runner: 'local',
|
|
3
|
+
hostname: '[Enter Instance HOST here]',
|
|
4
|
+
protocol: 'https',
|
|
5
|
+
port: 443,
|
|
6
|
+
path: '/wd/hub',
|
|
7
|
+
specs: ['./test/specs/iOSNative.js'],
|
|
8
|
+
exclude: [],
|
|
9
|
+
maxInstances: 1,
|
|
10
|
+
capabilities: [{
|
|
11
|
+
platformName: 'iOS',
|
|
12
|
+
'digitalai:testName': '[Enter Test Name here]',
|
|
13
|
+
'digitalai:accessKey': '[Enter Your Access key here]',
|
|
14
|
+
'appium:app': 'cloud:com.experitest.ExperiBank',
|
|
15
|
+
'appium:bundleId': 'com.experitest.ExperiBank',
|
|
16
|
+
'digitalai:deviceQuery': "@os='ios' and @category='[Enter PHONE/TABLET here]'",
|
|
17
|
+
}],
|
|
18
|
+
logLevel: 'info',
|
|
19
|
+
bail: 0,
|
|
20
|
+
waitforTimeout: 10000,
|
|
21
|
+
connectionRetryTimeout: 120000,
|
|
22
|
+
connectionRetryCount: 3,
|
|
23
|
+
framework: 'mocha',
|
|
24
|
+
reporters: ['spec'],
|
|
25
|
+
mochaOpts: {
|
|
26
|
+
ui: 'bdd',
|
|
27
|
+
timeout: 180000,
|
|
28
|
+
},
|
|
29
|
+
afterSession: function (config, capabilities) {
|
|
30
|
+
const reportUrl = capabilities['digitalai:reportUrl'];
|
|
31
|
+
const reportTestId = capabilities['digitalai:reportTestId'];
|
|
32
|
+
if (reportUrl) console.log('Report URL:', reportUrl);
|
|
33
|
+
if (reportTestId) console.log('Report Test ID:', reportTestId);
|
|
34
|
+
},
|
|
35
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// wdio v7 is required — the Digital.ai Appium Grid rejects Appium client v8+.
|
|
2
|
+
// Do NOT upgrade to wdio v9 and do NOT run 'npm init wdio' (it installs v9 by default).
|
|
3
|
+
exports.config = {
|
|
4
|
+
runner: 'local',
|
|
5
|
+
hostname: '[Enter Instance HOST here]',
|
|
6
|
+
protocol: 'https',
|
|
7
|
+
port: 443,
|
|
8
|
+
path: '/wd/hub',
|
|
9
|
+
specs: ['./test/specs/iOSNative.js'],
|
|
10
|
+
exclude: [],
|
|
11
|
+
maxInstances: 1,
|
|
12
|
+
capabilities: [{
|
|
13
|
+
platformName: 'IOS',
|
|
14
|
+
'digitalai:testName': '[Enter Test Name here]',
|
|
15
|
+
'digitalai:accessKey': '[Enter Your Access key here]',
|
|
16
|
+
// Use appium: prefix — wdio v7 client validator requires W3C-format capabilities.
|
|
17
|
+
// The platform accepts them via the desiredCapabilities fallback wdio sends automatically.
|
|
18
|
+
'appium:app': 'cloud:com.experitest.ExperiBank',
|
|
19
|
+
'appium:bundleId': 'com.experitest.ExperiBank',
|
|
20
|
+
'digitalai:deviceQuery': "@os='ios' and @category='[Enter PHONE/TABLET here]'",
|
|
21
|
+
}],
|
|
22
|
+
logLevel: 'info',
|
|
23
|
+
bail: 0,
|
|
24
|
+
waitforTimeout: 10000,
|
|
25
|
+
connectionRetryTimeout: 120000,
|
|
26
|
+
connectionRetryCount: 3,
|
|
27
|
+
framework: 'mocha',
|
|
28
|
+
reporters: ['spec'],
|
|
29
|
+
mochaOpts: {
|
|
30
|
+
ui: 'bdd',
|
|
31
|
+
timeout: 180000,
|
|
32
|
+
},
|
|
33
|
+
afterSession: function (config, capabilities) {
|
|
34
|
+
const reportUrl = capabilities['digitalai:reportUrl'];
|
|
35
|
+
const reportTestId = capabilities['digitalai:reportTestId'];
|
|
36
|
+
if (reportUrl) console.log('Report URL:', reportUrl);
|
|
37
|
+
if (reportTestId) console.log('Report Test ID:', reportTestId);
|
|
38
|
+
},
|
|
39
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
from appium import webdriver
|
|
3
|
+
from appium.options.common.base import AppiumOptions
|
|
4
|
+
from selenium.webdriver.common.by import By
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class LocalIosTest(unittest.TestCase):
|
|
8
|
+
testName = '[Enter TestName here]'
|
|
9
|
+
accessKey = "[Enter Your Access key here]"
|
|
10
|
+
driver = None
|
|
11
|
+
|
|
12
|
+
def setUp(self):
|
|
13
|
+
options = AppiumOptions()
|
|
14
|
+
options.set_capability('digitalai:testName', self.testName)
|
|
15
|
+
options.set_capability('digitalai:accessKey', self.accessKey)
|
|
16
|
+
options.set_capability('app', 'cloud:com.experitest.ExperiBank')
|
|
17
|
+
options.set_capability('bundleId', 'com.experitest.ExperiBank')
|
|
18
|
+
options.set_capability('platformName', 'ios')
|
|
19
|
+
options.set_capability('digitalai:deviceQuery', "@os='ios' and @category='[Enter PHONE/TABLET here]'")
|
|
20
|
+
self.driver = webdriver.Remote("[Enter Instance here]/wd/hub", options=options)
|
|
21
|
+
self.driver.implicitly_wait(10)
|
|
22
|
+
|
|
23
|
+
def testQuickStartIosNativeDemo(self):
|
|
24
|
+
# [BEGIN_DEMO_STEPS]
|
|
25
|
+
self.driver.find_element(By.XPATH, "//*[@name='usernameTextField']").send_keys('company')
|
|
26
|
+
self.driver.find_element(By.XPATH, "//*[@name='passwordTextField']").send_keys('company')
|
|
27
|
+
self.driver.find_element(By.XPATH, "//*[@name='loginButton']").click()
|
|
28
|
+
self.driver.find_element(By.XPATH, "//*[@name='makePaymentButton']").click()
|
|
29
|
+
self.driver.find_element(By.XPATH, "//*[@name='phoneTextField']").send_keys('1234567')
|
|
30
|
+
self.driver.find_element(By.XPATH, "//*[@name='nameTextField']").send_keys('Jon Snow')
|
|
31
|
+
self.driver.find_element(By.XPATH, "//*[@name='amountTextField']").send_keys('50')
|
|
32
|
+
self.driver.find_element(By.XPATH, "//*[@name='countryButton']").click()
|
|
33
|
+
self.driver.find_element(By.XPATH, "//*[@name='Switzerland']").click()
|
|
34
|
+
self.driver.find_element(By.XPATH, "//*[@name='sendPaymentButton']").click()
|
|
35
|
+
self.driver.find_element(By.XPATH, "//*[@name='Yes']").click()
|
|
36
|
+
# [END_DEMO_STEPS]
|
|
37
|
+
|
|
38
|
+
def tearDown(self):
|
|
39
|
+
print('Report URL: ' + self.driver.capabilities.get('digitalai:reportUrl', 'n/a'))
|
|
40
|
+
self.driver.quit()
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
if __name__ == '__main__':
|
|
44
|
+
unittest.main()
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# NOTE: This project uses Appium Grid — a legacy Experitest proprietary framework
|
|
2
|
+
# that predates the W3C WebDriver standard. It is NOT standard Appium Server.
|
|
3
|
+
# The JWP session format, _elem() wrapper, and pinned dependency versions below
|
|
4
|
+
# are required by Appium Grid's protocol and are NOT needed for Appium Server projects.
|
|
5
|
+
# If you can migrate this project to Appium Server, that removes all of these workarounds.
|
|
6
|
+
|
|
7
|
+
import unittest
|
|
8
|
+
from appium import webdriver
|
|
9
|
+
from selenium.webdriver.common.by import By
|
|
10
|
+
from appium.webdriver.webelement import WebElement
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class LocalIosTest(unittest.TestCase):
|
|
14
|
+
testName = '[Enter TestName here]'
|
|
15
|
+
accessKey = "[Enter Your Access key here]"
|
|
16
|
+
driver = None
|
|
17
|
+
|
|
18
|
+
def setUp(self):
|
|
19
|
+
desired_caps = {
|
|
20
|
+
'platformName': 'ios',
|
|
21
|
+
'digitalai:testName': self.testName,
|
|
22
|
+
'digitalai:accessKey': self.accessKey,
|
|
23
|
+
'app': 'cloud:com.experitest.ExperiBank',
|
|
24
|
+
'bundleId': 'com.experitest.ExperiBank',
|
|
25
|
+
'digitalai:deviceQuery': "@os='ios' and @category='[Enter PHONE/TABLET here]'",
|
|
26
|
+
}
|
|
27
|
+
self.driver = webdriver.Remote("[Enter Instance here]/wd/hub", desired_capabilities=desired_caps)
|
|
28
|
+
self.driver.implicitly_wait(10)
|
|
29
|
+
|
|
30
|
+
def _elem(self, raw):
|
|
31
|
+
# JWP sessions return element dicts rather than WebElement objects.
|
|
32
|
+
# Wrap into Appium WebElement so .click(), .send_keys(), .is_displayed() etc. work.
|
|
33
|
+
if isinstance(raw, dict):
|
|
34
|
+
eid = raw.get('ELEMENT') or raw.get('element-6066-11e4-a52e-4f735466cecf')
|
|
35
|
+
return WebElement(self.driver, eid)
|
|
36
|
+
return raw
|
|
37
|
+
|
|
38
|
+
def _find_xpath(self, xpath):
|
|
39
|
+
return self._elem(self.driver.find_element(By.XPATH, xpath))
|
|
40
|
+
|
|
41
|
+
def testQuickStartIosNativeDemo(self):
|
|
42
|
+
# [BEGIN_DEMO_STEPS]
|
|
43
|
+
self._find_xpath("//*[@name='usernameTextField']").send_keys('company')
|
|
44
|
+
self._find_xpath("//*[@name='passwordTextField']").send_keys('company')
|
|
45
|
+
self._find_xpath("//*[@name='loginButton']").click()
|
|
46
|
+
self._find_xpath("//*[@name='makePaymentButton']").click()
|
|
47
|
+
self._find_xpath("//*[@name='phoneTextField']").send_keys('1234567')
|
|
48
|
+
self._find_xpath("//*[@name='nameTextField']").send_keys('Jon Snow')
|
|
49
|
+
self._find_xpath("//*[@name='amountTextField']").send_keys('50')
|
|
50
|
+
self._find_xpath("//*[@name='countryButton']").click()
|
|
51
|
+
self._find_xpath("//*[@name='Switzerland']").click()
|
|
52
|
+
self._find_xpath("//*[@name='sendPaymentButton']").click()
|
|
53
|
+
self._find_xpath("//*[@name='Yes']").click()
|
|
54
|
+
# [END_DEMO_STEPS]
|
|
55
|
+
|
|
56
|
+
def tearDown(self):
|
|
57
|
+
print('Report URL: ' + str(self.driver.desired_capabilities.get('digitalai:reportUrl', 'n/a')))
|
|
58
|
+
self.driver.quit()
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
if __name__ == '__main__':
|
|
62
|
+
unittest.main()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Appium-Python-Client>=4.0.0
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
apply plugin: 'java'
|
|
2
|
+
|
|
3
|
+
// Standalone use only — remove if this module is part of a larger Gradle project
|
|
4
|
+
// repositories { mavenCentral() }
|
|
5
|
+
|
|
6
|
+
dependencies {
|
|
7
|
+
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.9.3'
|
|
8
|
+
testRuntimeOnly group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.9.3'
|
|
9
|
+
testImplementation group: 'io.appium', name: 'java-client', version: '7.6.0'
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
apply plugin: 'java'
|
|
2
|
+
|
|
3
|
+
// Standalone use only — remove if this module is part of a larger Gradle project
|
|
4
|
+
// repositories { mavenCentral() }
|
|
5
|
+
|
|
6
|
+
dependencies {
|
|
7
|
+
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.10.2'
|
|
8
|
+
testRuntimeOnly group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.10.2'
|
|
9
|
+
testImplementation group: 'io.appium', name: 'java-client', version: '8.6.0'
|
|
10
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import io.appium.java_client.ios.IOSDriver;
|
|
2
|
+
import io.appium.java_client.ios.options.XCUITestOptions;
|
|
3
|
+
import org.junit.jupiter.api.*;
|
|
4
|
+
import org.openqa.selenium.By;
|
|
5
|
+
|
|
6
|
+
import java.net.MalformedURLException;
|
|
7
|
+
import java.net.URL;
|
|
8
|
+
|
|
9
|
+
public class LocaliOSTest {
|
|
10
|
+
|
|
11
|
+
private IOSDriver driver;
|
|
12
|
+
|
|
13
|
+
@BeforeEach
|
|
14
|
+
public void setUp() throws MalformedURLException {
|
|
15
|
+
XCUITestOptions options = new XCUITestOptions();
|
|
16
|
+
options.setCapability("digitalai:testName", "[Enter Test Name here]");
|
|
17
|
+
options.setCapability("digitalai:accessKey", "[Enter Your Access key here]");
|
|
18
|
+
options.setCapability("digitalai:deviceQuery", "@os='ios' and @category='[Enter PHONE/TABLET here]'");
|
|
19
|
+
options.setApp("cloud:com.experitest.ExperiBank");
|
|
20
|
+
options.setBundleId("com.experitest.ExperiBank");
|
|
21
|
+
driver = new IOSDriver(new URL("[Enter Instance here]/wd/hub"), options);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@Test
|
|
25
|
+
public void quickStartiOSNativeDemo() {
|
|
26
|
+
// [BEGIN_DEMO_STEPS]
|
|
27
|
+
driver.findElement(By.xpath("//*[@name='usernameTextField']")).sendKeys("company");
|
|
28
|
+
driver.findElement(By.xpath("//*[@name='passwordTextField']")).sendKeys("company");
|
|
29
|
+
driver.findElement(By.xpath("//*[@name='loginButton']")).click();
|
|
30
|
+
driver.findElement(By.xpath("//*[@name='makePaymentButton']")).click();
|
|
31
|
+
driver.findElement(By.xpath("//*[@name='phoneTextField']")).sendKeys("0501234567");
|
|
32
|
+
driver.findElement(By.xpath("//*[@name='nameTextField']")).sendKeys("John Snow");
|
|
33
|
+
driver.findElement(By.xpath("//*[@name='amountTextField']")).sendKeys("50");
|
|
34
|
+
driver.findElement(By.xpath("//*[@name='countryButton']")).click();
|
|
35
|
+
driver.findElement(By.xpath("//*[@name='Switzerland']")).click();
|
|
36
|
+
driver.findElement(By.xpath("//*[@name='sendPaymentButton']")).click();
|
|
37
|
+
driver.findElement(By.xpath("//*[@name='Yes']")).click();
|
|
38
|
+
// [END_DEMO_STEPS]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@AfterEach
|
|
42
|
+
public void tearDown() {
|
|
43
|
+
if (driver == null) return;
|
|
44
|
+
try {
|
|
45
|
+
System.out.println("Report URL: " + driver.getCapabilities().getCapability("digitalai:reportUrl"));
|
|
46
|
+
System.out.println("Report Test ID: " + driver.getCapabilities().getCapability("digitalai:reportTestId"));
|
|
47
|
+
} catch (Exception ignored) {}
|
|
48
|
+
try {
|
|
49
|
+
driver.quit();
|
|
50
|
+
} catch (Exception ignored) {}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import io.appium.java_client.ios.IOSDriver;
|
|
2
|
+
import io.appium.java_client.ios.IOSElement;
|
|
3
|
+
import io.appium.java_client.remote.IOSMobileCapabilityType;
|
|
4
|
+
import io.appium.java_client.remote.MobileCapabilityType;
|
|
5
|
+
import org.junit.jupiter.api.*;
|
|
6
|
+
import org.openqa.selenium.By;
|
|
7
|
+
import org.openqa.selenium.ScreenOrientation;
|
|
8
|
+
import org.openqa.selenium.remote.DesiredCapabilities;
|
|
9
|
+
|
|
10
|
+
import java.net.MalformedURLException;
|
|
11
|
+
import java.net.URL;
|
|
12
|
+
|
|
13
|
+
public class LocaliOSTest {
|
|
14
|
+
|
|
15
|
+
protected IOSDriver<IOSElement> driver = null;
|
|
16
|
+
DesiredCapabilities dc = new DesiredCapabilities();
|
|
17
|
+
private String accessKey = "[Enter Your Access key here]";
|
|
18
|
+
|
|
19
|
+
@BeforeEach
|
|
20
|
+
public void setUp() throws MalformedURLException {
|
|
21
|
+
dc.setCapability("digitalai:testName", "[Enter Test Name here]");
|
|
22
|
+
dc.setCapability("digitalai:accessKey", accessKey);
|
|
23
|
+
dc.setCapability("digitalai:deviceQuery", "@os='ios' and @category='[Enter PHONE/TABLET here]'");
|
|
24
|
+
dc.setCapability(MobileCapabilityType.APP, "cloud:com.experitest.ExperiBank");
|
|
25
|
+
dc.setCapability(IOSMobileCapabilityType.BUNDLE_ID, "com.experitest.ExperiBank");
|
|
26
|
+
// "Detected dialect: OSS" at startup is expected — the platform uses the legacy JSON Wire Protocol.
|
|
27
|
+
driver = new IOSDriver<>(new URL("[Enter Instance here]/wd/hub"), dc);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@Test
|
|
31
|
+
public void quickStartiOSNativeDemo() {
|
|
32
|
+
// [BEGIN_DEMO_STEPS]
|
|
33
|
+
driver.rotate(ScreenOrientation.PORTRAIT);
|
|
34
|
+
driver.findElement(By.xpath("//*[@name='usernameTextField']")).sendKeys("company");
|
|
35
|
+
driver.findElement(By.xpath("//*[@name='passwordTextField']")).sendKeys("company");
|
|
36
|
+
driver.findElement(By.xpath("//*[@name='loginButton']")).click();
|
|
37
|
+
driver.findElement(By.xpath("//*[@name='makePaymentButton']")).click();
|
|
38
|
+
driver.findElement(By.xpath("//*[@name='phoneTextField']")).sendKeys("0501234567");
|
|
39
|
+
driver.findElement(By.xpath("//*[@name='nameTextField']")).sendKeys("John Snow");
|
|
40
|
+
driver.findElement(By.xpath("//*[@name='amountTextField']")).sendKeys("50");
|
|
41
|
+
driver.findElement(By.xpath("//*[@name='countryButton']")).click();
|
|
42
|
+
driver.findElement(By.xpath("//*[@name='Switzerland']")).click();
|
|
43
|
+
driver.findElement(By.xpath("//*[@name='sendPaymentButton']")).click();
|
|
44
|
+
driver.findElement(By.xpath("//*[@name='Yes']")).click();
|
|
45
|
+
// [END_DEMO_STEPS]
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@AfterEach
|
|
49
|
+
public void tearDown() {
|
|
50
|
+
if (driver == null) return;
|
|
51
|
+
try {
|
|
52
|
+
System.out.println("Report URL: " + driver.getCapabilities().getCapability("digitalai:reportUrl"));
|
|
53
|
+
System.out.println("Report Test ID: " + driver.getCapabilities().getCapability("digitalai:reportTestId"));
|
|
54
|
+
} catch (Exception ignored) {}
|
|
55
|
+
try {
|
|
56
|
+
driver.quit();
|
|
57
|
+
} catch (Exception ignored) {}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
3
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
4
|
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
5
|
+
<modelVersion>4.0.0</modelVersion>
|
|
6
|
+
|
|
7
|
+
<groupId>maven</groupId>
|
|
8
|
+
<artifactId>maven</artifactId>
|
|
9
|
+
<version>1.0-SNAPSHOT</version>
|
|
10
|
+
<build>
|
|
11
|
+
<plugins>
|
|
12
|
+
<plugin>
|
|
13
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
14
|
+
<artifactId>maven-compiler-plugin</artifactId>
|
|
15
|
+
<version>3.11.0</version>
|
|
16
|
+
<configuration>
|
|
17
|
+
<source>8</source>
|
|
18
|
+
<target>8</target>
|
|
19
|
+
</configuration>
|
|
20
|
+
</plugin>
|
|
21
|
+
<plugin>
|
|
22
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
23
|
+
<artifactId>maven-surefire-plugin</artifactId>
|
|
24
|
+
<version>3.1.2</version>
|
|
25
|
+
</plugin>
|
|
26
|
+
</plugins>
|
|
27
|
+
</build>
|
|
28
|
+
|
|
29
|
+
<dependencies>
|
|
30
|
+
<dependency>
|
|
31
|
+
<groupId>org.junit.jupiter</groupId>
|
|
32
|
+
<artifactId>junit-jupiter</artifactId>
|
|
33
|
+
<version>5.9.3</version>
|
|
34
|
+
<scope>test</scope>
|
|
35
|
+
</dependency>
|
|
36
|
+
<dependency>
|
|
37
|
+
<groupId>io.appium</groupId>
|
|
38
|
+
<artifactId>java-client</artifactId>
|
|
39
|
+
<version>7.6.0</version>
|
|
40
|
+
</dependency>
|
|
41
|
+
</dependencies>
|
|
42
|
+
</project>
|