Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #340 from sbtqa/disableWindowAnimation
Browse files Browse the repository at this point in the history
fix disable animations capability
  • Loading branch information
kosteman authored Apr 22, 2021
2 parents 2e5eaed + 05ebbd0 commit f077d2d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public DesiredCapabilities parse() {
setVersion(version);

String name = getProperty(PROPERTIES.getSelenoidNameOfTests());
String logName = getProperty(PROPERTIES.getSelenoidLogName()) + ".log";
String videoName = getProperty(PROPERTIES.getSelenoidVideoName()) + ".mp4";
String logName = getProperty(PROPERTIES.getSelenoidLogName());
String videoName = getProperty(PROPERTIES.getSelenoidVideoName());


setCapability("enableVNC", PROPERTIES.getSelenoidEnableVNC());
Expand All @@ -40,14 +40,13 @@ public DesiredCapabilities parse() {
setCapability("videoScreenSize", PROPERTIES.getSelenoidVideoScreenSize());
setCapability("videoFrameRate", PROPERTIES.getSelenoidVideoFrameRate());
setCapability("name", name);
setCapability("logName", logName, UNIQUE_NAME_FORMAT);
setCapability("videoName", videoName, UNIQUE_NAME_FORMAT);
setCapability("logName", logName, UNIQUE_NAME_FORMAT + ".log");
setCapability("videoName", videoName, UNIQUE_NAME_FORMAT + ".mp4");
setCapability("timeZone", PROPERTIES.getSelenoidTimeZone());
setCapability("hostsEntries", PROPERTIES.getSelenoidHostEntries());
setCapability("applicationContainers", PROPERTIES.getSelenoidApplicationContainers());
setCapability("labels", PROPERTIES.getSelenoidContainerLabels());
setCapability("sessionTimeout", PROPERTIES.getSelenoidSessionTimeout());
setCapability("timeZone", PROPERTIES.getSelenoidTimeZone());

return capabilities;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ public interface Configuration extends Config {
@DefaultValue("")
String getSelenoidSessionTimeout();

@Key("selenoid.timeZone")
@DefaultValue("")
String getSelenoidTimezone();


@Key("aspects.report.fill.enabled")
@DefaultValue("true")
Expand Down
6 changes: 6 additions & 0 deletions page-factory-doc/src/main/asciidoc/mobile_properties.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ include::common_properties.asciidoc[]

| appium.xcodeSigningId
| iOS only. Идентификатор подписи кода в Xcode

| appium.disableWindowAnimation
| Android only. Следует ли отключать анимацию окон при запуске, по умолчанию false

| appium.waitForIdleTimeout
| Android only. Тайм-аут, используемый для ожидания перехода пользовательского интерфейса в состояние ожидания, по умолчанию 10000
|====================

==== Параметры работы с Selenoid/Moon
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ru.sbtqa.tag.pagefactory.mobile.drivers;

import io.appium.java_client.AppiumDriver;
import io.appium.java_client.Setting;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.remote.IOSMobileCapabilityType;
Expand Down Expand Up @@ -59,8 +60,7 @@ public void mountDriver() {
capabilities.setCapability("xcodeOrgId", PROPERTIES.getAppiumXcodeOrgId());
capabilities.setCapability("xcodeSigningId", PROPERTIES.getAppiumXcodeSigningId());
capabilities.setCapability("showIOSLog", PROPERTIES.getAppiumShowIOSLog());
capabilities.setCapability("waitForIdleTimeout", PROPERTIES.getWaitForIdleTimeout());
capabilities.setCapability("disableWindowAnimation", PROPERTIES.getDisableWindowAnimation());
capabilities.setCapability("appium:disableWindowAnimation", PROPERTIES.getDisableWindowAnimation());
capabilities.setCapability("appium:useJSONSource", PROPERTIES.getAppiumUseJSONSource());
capabilities.setCapability("appium:simpleIsVisibleCheck", PROPERTIES.getAppiumSimpleIsVisibleCheck());
capabilities.setCapability("appium:useNewWDA", PROPERTIES.getAppiumUseNewWDA());
Expand All @@ -82,6 +82,10 @@ public void mountDriver() {

mobileDriver = PROPERTIES.getAppiumPlatformName() == IOS ? new IOSDriver(url, capabilities) : new AndroidDriver(url, capabilities);

if (PROPERTIES.getAppiumPlatformName() == ANDROID) {
((AndroidDriver) mobileDriver).setSetting(Setting.WAIT_FOR_IDLE_TIMEOUT, PROPERTIES.getWaitForIdleTimeout());
}

if (PROPERTIES.getAppiumVideoEnabled()) {
appiumVideoRecorder = new AppiumVideoRecorder(Environment.getScenario());
appiumVideoRecorder.startRecord();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ public interface MobileConfiguration extends Configuration {
String getAppiumShowIOSLog();

@Key("appium.waitForIdleTimeout")
@DefaultValue("")
String getWaitForIdleTimeout();
@DefaultValue("10000")
long getWaitForIdleTimeout();

@Key("appium.disableWindowAnimation")
@DefaultValue("false")
Expand Down

0 comments on commit f077d2d

Please sign in to comment.