Skip to content

Commit 1a85dca

Browse files
committed
[master] - added support for UWP.
1 parent 1a82dac commit 1a85dca

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>net.itarray</groupId>
88
<artifactId>automotion</artifactId>
9-
<version>1.3.0</version>
9+
<version>1.3.1</version>
1010
<name>Automotion</name>
1111
<description>Library for automation testing</description>
1212
<url>https://www.itarray.net</url>
@@ -63,8 +63,8 @@
6363
<configuration>
6464
<serverId>ossrh</serverId>
6565
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
66-
<!--<stagingProfileId>22f8da536d8418</stagingProfileId> &lt;!&ndash;Staging&ndash;&gt;-->
67-
<stagingProfileId>7edbe315063867</stagingProfileId> <!--Central staging-->
66+
<stagingProfileId>22f8da536d8418</stagingProfileId> <!--Staging-->
67+
<!--<stagingProfileId>7edbe315063867</stagingProfileId> &lt;!&ndash;Central staging&ndash;&gt;-->
6868
<skipStagingRepositoryClose>true</skipStagingRepositoryClose>
6969
<autoReleaseAfterClose>true</autoReleaseAfterClose>
7070
</configuration>

readme.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This is JAVA library for the running of mobile, web or API automated tests.
88
<dependency>
99
<groupId>net.itarray</groupId>
1010
<artifactId>automotion</artifactId>
11-
<version>1.3.0</version>
11+
<version>1.3.1</version>
1212
</dependency>
1313

1414
### Steps of adding to the project ###
@@ -68,6 +68,14 @@ This is JAVA library for the running of mobile, web or API automated tests.
6868
EXECUTOR=http://{host}:{port}/wd/hub
6969
DEVICE=Device name
7070

71+
* For Windows UWP:
72+
73+
IS_MOBILE=True
74+
PLATFORM=Windows
75+
APP={path_to_app}
76+
EXECUTOR=http://{host}:{port}/wd/hub
77+
DEVICE=Device name or ID
78+
7179
### Possibilities ###
7280
- Verification that elements are aligned correctly on the web or mobile page
7381
* Elements horizontally are aligned correctly:

src/main/java/util/driver/CapabilitiesFactory.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public static DesiredCapabilities getCapabilities() {
1919
capabilities = getAndroidCapabilities();
2020
} else if (isIOS()) {
2121
capabilities = getIOSCapabilities();
22+
} else if (isWindows()) {
23+
capabilities = getWindowsCapabilities();
2224
} else if (isRemote()) {
2325
capabilities = getRemoteDriverCapabilities();
2426
} else if (isHeadless()) {
@@ -67,6 +69,12 @@ private static DesiredCapabilities getIOSCapabilities() {
6769
capabilities.setCapability("udid", getUDIDDevice());
6870
capabilities.setCapability("waitForAppScript", true);
6971

72+
return capabilities;
73+
}
74+
75+
private static DesiredCapabilities getWindowsCapabilities() {
76+
capabilities = getCommonMobileCapabilities();
77+
capabilities.setCapability("platformName", "Windows");
7078

7179
return capabilities;
7280
}

src/main/java/web/BaseWebMobileElement.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public BaseWebMobileElement(WebDriver driver) {
2525

2626
wait = new FluentWait<>(driver)
2727
.withTimeout(timeOfWaiting, TimeUnit.SECONDS)
28-
.pollingEvery(10, TimeUnit.SECONDS)
28+
.pollingEvery(2, TimeUnit.SECONDS)
2929
.ignoring(NoSuchElementException.class)
3030
.ignoring(TimeoutException.class)
3131
.ignoring(StaleElementReferenceException.class)

0 commit comments

Comments
 (0)