diff --git a/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/capabilities/SelenoidCapabilitiesParser.java b/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/capabilities/SelenoidCapabilitiesParser.java index 47f83ff7..b3b7e029 100644 --- a/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/capabilities/SelenoidCapabilitiesParser.java +++ b/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/capabilities/SelenoidCapabilitiesParser.java @@ -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()); @@ -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; } diff --git a/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/properties/Configuration.java b/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/properties/Configuration.java index ffeb746a..2f0cfee2 100644 --- a/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/properties/Configuration.java +++ b/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/properties/Configuration.java @@ -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") diff --git a/page-factory-doc/src/main/asciidoc/mobile_properties.asciidoc b/page-factory-doc/src/main/asciidoc/mobile_properties.asciidoc index 980b2803..8eaaff61 100644 --- a/page-factory-doc/src/main/asciidoc/mobile_properties.asciidoc +++ b/page-factory-doc/src/main/asciidoc/mobile_properties.asciidoc @@ -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 diff --git a/plugins/mobile-plugin/src/main/java/ru/sbtqa/tag/pagefactory/mobile/drivers/MobileDriverService.java b/plugins/mobile-plugin/src/main/java/ru/sbtqa/tag/pagefactory/mobile/drivers/MobileDriverService.java index 71dc9e6a..bf84460b 100644 --- a/plugins/mobile-plugin/src/main/java/ru/sbtqa/tag/pagefactory/mobile/drivers/MobileDriverService.java +++ b/plugins/mobile-plugin/src/main/java/ru/sbtqa/tag/pagefactory/mobile/drivers/MobileDriverService.java @@ -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; @@ -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()); @@ -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(); diff --git a/plugins/mobile-plugin/src/main/java/ru/sbtqa/tag/pagefactory/mobile/properties/MobileConfiguration.java b/plugins/mobile-plugin/src/main/java/ru/sbtqa/tag/pagefactory/mobile/properties/MobileConfiguration.java index c40b8be1..2ebf2bba 100644 --- a/plugins/mobile-plugin/src/main/java/ru/sbtqa/tag/pagefactory/mobile/properties/MobileConfiguration.java +++ b/plugins/mobile-plugin/src/main/java/ru/sbtqa/tag/pagefactory/mobile/properties/MobileConfiguration.java @@ -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")