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 3c658e0d..3fb4f1b0 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 @@ -22,6 +22,10 @@ public interface Configuration extends Config { @DefaultValue("false") boolean isVideoEnabled(); + @Key("video.path") + @DefaultValue("") + String getVideoPath(); + @Key("tasks.to.kill") @DefaultValue("") String getTasksToKill(); diff --git a/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/tasks/ConnectToLogTask.java b/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/tasks/ConnectToLogTask.java index 7bf24d75..b8a83f1d 100644 --- a/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/tasks/ConnectToLogTask.java +++ b/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/tasks/ConnectToLogTask.java @@ -17,7 +17,7 @@ public void handle() { PropertyConfigurator.configure(DEFAULT_LOG_PROPERTIES_PATH); LOG.info("Log4j properties were picked up on the path {}", DEFAULT_LOG_PROPERTIES_PATH); } else { - LOG.warn("There is no log4j.properties on the path {}", DEFAULT_LOG_PROPERTIES_PATH); + LOG.debug("There is no log4j.properties on the path {}", DEFAULT_LOG_PROPERTIES_PATH); } } } diff --git a/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/tasks/StartVideoTask.java b/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/tasks/StartVideoTask.java index 28ec7c88..a58d5e72 100644 --- a/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/tasks/StartVideoTask.java +++ b/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/tasks/StartVideoTask.java @@ -11,7 +11,8 @@ public class StartVideoTask implements Task { @Override public void handle() { if(PROPERTIES.isVideoEnabled()) { - VideoRecorder.getInstance().startRecording(); + VideoRecorder.setVideoFolder(PROPERTIES.getVideoPath()); + VideoRecorder.startRecording(); } } } diff --git a/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/tasks/StopVideoTask.java b/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/tasks/StopVideoTask.java index 94457b20..fe6885ab 100644 --- a/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/tasks/StopVideoTask.java +++ b/page-factory-core/src/main/java/ru/sbtqa/tag/pagefactory/tasks/StopVideoTask.java @@ -10,10 +10,8 @@ public class StopVideoTask implements Task { @Override public void handle() { - if (PROPERTIES.isVideoEnabled() && VideoRecorder.getInstance().isVideoStarted()) { - VideoRecorder.getInstance().stopRecording(); - VideoRecorder.getInstance().resetVideoRecorder(); + if (PROPERTIES.isVideoEnabled()) { + VideoRecorder.stopRecording(); } } - } diff --git a/page-factory-core/src/main/resources/config/application.properties-sample b/page-factory-core/src/main/resources/config/application.properties-sample index 5f31f17c..8d0ff3ee 100644 --- a/page-factory-core/src/main/resources/config/application.properties-sample +++ b/page-factory-core/src/main/resources/config/application.properties-sample @@ -9,9 +9,7 @@ driver.shared = true #optional. False by default video.enabled = false -video.path.dest = /tmp/video -video.path.temp = /tmp/video -video.highlight.enabled = false +video.path = /tmp/video #optional. driver or raw. Raw by default screenshot.strategy = driver diff --git a/plugins/html-plugin/src/test/resources/config/application.properties b/plugins/html-plugin/src/test/resources/config/application.properties index 9c50dc84..2903f14f 100644 --- a/plugins/html-plugin/src/test/resources/config/application.properties +++ b/plugins/html-plugin/src/test/resources/config/application.properties @@ -1,23 +1,8 @@ -#COMMON BLOCK -#path to page objects page.package=ru.sbtqa.tag.pagefactory.pages -#default wait timeout in seconds -timeout=20 -#optional. false by default -video.enabled=false -video.path.dest=/tmp/video -video.path.temp=/tmp/video -video.highlight.enabled=false -#optional. driver or raw. Raw by default screenshot.strategy=driver -#optional. tasks to kill before test (ONLY FOR WINDOWS) -#tasks.to.kill = iexplorer,chrome -#IN CASE OF WEB -#parameters for web driver create + webdriver.browser.name=Chrome webdriver.starting.url=http://localhost:8181 -#optional. The number of start attempts webdriver. 3 by default -webdriver.create.attempts=3 # run chrome in headless mode webdriver.chrome.capability.options.args=headless,disable-gpu,no-sandbox,remote-debugging-port=9222 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 4c7009ef..c5806243 100644 --- a/plugins/html-plugin/src/test/resources/config/application.properties-sample +++ b/plugins/html-plugin/src/test/resources/config/application.properties-sample @@ -10,9 +10,7 @@ driver.shared = true #optional. False by default video.enabled = false -video.path.dest = /tmp/video -video.path.temp = /tmp/video -video.highlight.enabled = false +video.path = /tmp/video #optional. driver or raw. Raw by default screenshot.strategy = driver diff --git a/plugins/jdi-plugin/src/test/resources/config/application.properties b/plugins/jdi-plugin/src/test/resources/config/application.properties index 7bd3d695..cad126de 100644 --- a/plugins/jdi-plugin/src/test/resources/config/application.properties +++ b/plugins/jdi-plugin/src/test/resources/config/application.properties @@ -1,34 +1,9 @@ -#COMMON BLOCK -#mobile or web -driver.environment = web - -#path to page objects page.package = ru.sbtqa.tag.pagefactory.pages - -#default wait timeout in seconds -timeout = 20 - -#optional. false by default -video.enabled = false -video.path.dest = /tmp/video -video.path.temp = /tmp/video -video.highlight.enabled = false - -#optional. driver or raw. Raw by default screenshot.strategy = driver -#optional. tasks to kill before test (ONLY FOR WINDOWS) -#tasks.to.kill = iexplorer,chrome - - -#IN CASE OF WEB -#parameters for web driver create webdriver.browser.name = Chrome webdriver.starting.url = http://localhost:8181 -#optional. The number of start attempts webdriver. 3 by default -webdriver.create.attempts = 3 - # run chrome in headless mode webdriver.chrome.capability.options.args=headless,disable-gpu,no-sandbox,remote-debugging-port=9222 diff --git a/plugins/jdi-plugin/src/test/resources/config/application.properties-sample b/plugins/jdi-plugin/src/test/resources/config/application.properties-sample index fb20a3d1..92373562 100644 --- a/plugins/jdi-plugin/src/test/resources/config/application.properties-sample +++ b/plugins/jdi-plugin/src/test/resources/config/application.properties-sample @@ -10,9 +10,7 @@ driver.shared = true #optional. False by default video.enabled = false -video.path.dest = /tmp/video -video.path.temp = /tmp/video -video.highlight.enabled = false +video.path = /tmp/video #optional. driver or raw. Raw by default screenshot.strategy = driver diff --git a/plugins/mobile-plugin/src/test/resources/config/application.properties-sample b/plugins/mobile-plugin/src/test/resources/config/application.properties-sample index e7b0f731..0a0db1d7 100644 --- a/plugins/mobile-plugin/src/test/resources/config/application.properties-sample +++ b/plugins/mobile-plugin/src/test/resources/config/application.properties-sample @@ -7,9 +7,7 @@ timeout = 20 #optional. False by default video.enabled = false -video.path.dest = /tmp/video -video.path.temp = /tmp/video -video.highlight.enabled = false +video.path = /tmp/video #optional. driver or raw. Raw by default screenshot.strategy = driver diff --git a/plugins/web-plugin/src/test/resources/config/application.properties b/plugins/web-plugin/src/test/resources/config/application.properties index 06f412ee..2aee695c 100644 --- a/plugins/web-plugin/src/test/resources/config/application.properties +++ b/plugins/web-plugin/src/test/resources/config/application.properties @@ -1,44 +1,16 @@ -#path to page objects page.package = pagefactory.pages.webelements - -#default wait timeout in seconds -timeout = 10 - -#optional. false by default -video.enabled = false -video.path.dest = /tmp/video -video.path.temp = /tmp/video -video.highlight.enabled = false - -#optional. driver or raw. Raw by default screenshot.strategy = driver -#optional. tasks to kill before test (ONLY FOR WINDOWS) -#tasks.to.kill = iexplorer,chrome - - -#IN CASE OF WEB -#parameters for web driver create webdriver.browser.name = Chrome webdriver.starting.url = http://localhost:8181 -#optional. The number of start attempts webdriver. 3 by default -webdriver.create.attempts = 3 - # run chrome in headless mode webdriver.chrome.capability.options.args=headless,disable-gpu,no-sandbox,remote-debugging-port=9222 aspects.highlight.enabled = true -#Optional. Test data management -## Data type data.type = json -## File extension for json and properties data types -# data.extension = jsonp -## Path to test data. For excel data type - path to xslx file without extension data.folder = src/test/resources/data/ -## Initial collection data.initial.collection = Data -# Optional. Insert the scenario fragments path here fragments.path = src/test/resources/fragments \ No newline at end of file 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 37cd7359..e9d7081d 100644 --- a/plugins/web-plugin/src/test/resources/config/application.properties-sample +++ b/plugins/web-plugin/src/test/resources/config/application.properties-sample @@ -7,9 +7,7 @@ timeout = 20 #optional. False by default video.enabled = false -video.path.dest = /tmp/video -video.path.temp = /tmp/video -video.highlight.enabled = false +video.path = /tmp/video #optional. driver or raw. Raw by default screenshot.strategy = driver diff --git a/pom.xml b/pom.xml index bf62cefd..77f49830 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ 1.8.13 1.4.2 1.4.0 - 1.0.6 + 1.0.7 2.2.2 4.0.4