diff --git a/page-factory-doc/src/main/asciidoc/web_properties.asciidoc b/page-factory-doc/src/main/asciidoc/web_properties.asciidoc index f9e423e3..5536e2ad 100644 --- a/page-factory-doc/src/main/asciidoc/web_properties.asciidoc +++ b/page-factory-doc/src/main/asciidoc/web_properties.asciidoc @@ -53,7 +53,7 @@ webdriver.browser.size = 1920x1080 webdriver.browser.path = src/test/resources/webdrivers/chromedriver.exe | Не задано -| webdriver.version +| webdriver.browser.version | Версия драйвера. Если указан этот параметр, то будет выполнена попытка автоматически найти соответствующую версию | Не задано diff --git a/plugins/html-plugin/src/test/resources/config/application.properties b/plugins/html-plugin/src/test/resources/config/application.properties index d9ef4f83..a2fc7eb8 100644 --- a/plugins/html-plugin/src/test/resources/config/application.properties +++ b/plugins/html-plugin/src/test/resources/config/application.properties @@ -3,6 +3,7 @@ screenshot.strategy=driver webdriver.browser.name=Chrome webdriver.starting.url=http://localhost:8181 +webdriver.browser.version = 123.0.6312.86 # Run in headless mode webdriver.chrome.capability.options.args=headless,disable-gpu,no-sandbox,remote-allow-origins=* diff --git a/plugins/html-plugin/src/test/resources/config/application.properties-sample b/plugins/html-plugin/src/test/resources/config/application.properties-sample index df98e34c..dff4063f 100644 --- a/plugins/html-plugin/src/test/resources/config/application.properties-sample +++ b/plugins/html-plugin/src/test/resources/config/application.properties-sample @@ -59,7 +59,7 @@ webdriver.nexus.url = http://your.nexus.repo.with.drivers.com/ webdriver.os.arch #optional. Forces to download this driver version if it is available. LATEST by default -webdriver.version = 2.35 +webdriver.browser.version = 2.35 #optional. The number of start attempts webdriver. 3 by default webdriver.create.attempts = 3 diff --git a/plugins/web-plugin/src/main/java/ru/sbtqa/tag/pagefactory/web/configure/WebDriverManagerConfigurator.java b/plugins/web-plugin/src/main/java/ru/sbtqa/tag/pagefactory/web/configure/WebDriverManagerConfigurator.java index 67c00924..b4ad53f6 100644 --- a/plugins/web-plugin/src/main/java/ru/sbtqa/tag/pagefactory/web/configure/WebDriverManagerConfigurator.java +++ b/plugins/web-plugin/src/main/java/ru/sbtqa/tag/pagefactory/web/configure/WebDriverManagerConfigurator.java @@ -7,17 +7,20 @@ import ru.sbtqa.tag.pagefactory.web.properties.WebConfiguration; import io.github.bonigarcia.wdm.WebDriverManager; - public class WebDriverManagerConfigurator { private static final Logger LOG = LoggerFactory.getLogger(WebDriverManagerConfigurator.class); private static final WebConfiguration PROPERTIES = WebConfiguration.create(); - private WebDriverManagerConfigurator() {} + private WebDriverManagerConfigurator() { + } public static void configureDriver(WebDriverManager webDriverManager, String browserType) { + System.setProperty("wdm." + browserType.toLowerCase() + "Version", PROPERTIES.getBrowserVersion()); + if (!PROPERTIES.getDriversPath().isEmpty()) { - System.setProperty("webdriver." + browserType.toLowerCase() + ".driver", new File(PROPERTIES.getDriversPath()).getAbsolutePath()); + System.setProperty("webdriver." + browserType.toLowerCase() + ".driver", + new File(PROPERTIES.getDriversPath()).getAbsolutePath()); } else { LOG.warn("The value of property 'webdriver.drivers.path' is not specified." + " Trying to automatically download and setup driver."); diff --git a/plugins/web-plugin/src/main/java/ru/sbtqa/tag/pagefactory/web/properties/WebConfiguration.java b/plugins/web-plugin/src/main/java/ru/sbtqa/tag/pagefactory/web/properties/WebConfiguration.java index 2ea8c60d..916f1699 100644 --- a/plugins/web-plugin/src/main/java/ru/sbtqa/tag/pagefactory/web/properties/WebConfiguration.java +++ b/plugins/web-plugin/src/main/java/ru/sbtqa/tag/pagefactory/web/properties/WebConfiguration.java @@ -37,7 +37,7 @@ public interface WebConfiguration extends Configuration { @DefaultValue("") String getDriversPath(); - @Key("webdriver.version") + @Key("webdriver.browser.version") @DefaultValue("") String getWebDriverVersion(); @@ -57,7 +57,6 @@ public interface WebConfiguration extends Configuration { @DefaultValue("") String getProxy(); - @Key("aspects.highlight.enabled") @DefaultValue("false") boolean isHighlightEnabled(); diff --git a/plugins/web-plugin/src/test/resources/config/application.properties b/plugins/web-plugin/src/test/resources/config/application.properties index cb57a5d4..77e24f71 100644 --- a/plugins/web-plugin/src/test/resources/config/application.properties +++ b/plugins/web-plugin/src/test/resources/config/application.properties @@ -4,6 +4,7 @@ screenshot.strategy = driver webdriver.browser.name = Chrome webdriver.starting.url = http://localhost:8181 +webdriver.browser.version = 123.0.6312.86 # Run in headless mode webdriver.chrome.capability.options.args=headless,disable-gpu,no-sandbox,remote-allow-origins=* webdriver.edge.capability.options.args=headless,disable-gpu,no-sandbox,remote-allow-origins=* @@ -13,7 +14,8 @@ webdriver.firefox.capability.options.args=headless #webdriver.browser.size=1920x1080 aspects.highlight.enabled = true - +video.enabled = false +video.path = /Users/sidochenko/Downloads data.type = json data.folder = src/test/resources/data/ data.initial.collection = Data diff --git a/plugins/web-plugin/src/test/resources/config/application.properties-sample b/plugins/web-plugin/src/test/resources/config/application.properties-sample index 1b83d842..9ff9e576 100644 --- a/plugins/web-plugin/src/test/resources/config/application.properties-sample +++ b/plugins/web-plugin/src/test/resources/config/application.properties-sample @@ -41,7 +41,7 @@ webdriver.nexus.url = http://your.nexus.repo.with.drivers.com/ webdriver.os.arch #optional. Forces to download this driver version if it is available. LATEST by default -webdriver.version = 2.35 +webdriver.browser.version = 2.35 #optional. The number of start attempts webdriver. 3 by default webdriver.create.attempts = 3 diff --git a/pom.xml b/pom.xml index 1c34cb37..c8dd6e16 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ - 4.8.1 + 4.11.0 UTF-8 1.8 1.8 @@ -64,7 +64,7 @@ 2.22.1 1.9.1 1.1.2 - 5.5.2 + 5.7.0 5.2.3 2.13.0 4.1.87.Final diff --git a/tests/test-web-app/pom.xml b/tests/test-web-app/pom.xml index 8af35dc0..4e50c453 100644 --- a/tests/test-web-app/pom.xml +++ b/tests/test-web-app/pom.xml @@ -19,7 +19,7 @@ org.apache.maven.plugins maven-war-plugin - 3.0.0 + 3.4.0 web/WEB-INF/web.xml