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 #106 from sbtqa/video
Browse files Browse the repository at this point in the history
Video
  • Loading branch information
kosteman authored Nov 22, 2018
2 parents b49273b + c90a466 commit 69a6cac
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<aspectj.version>1.8.13</aspectj.version>
<tag.version.allurehelper>1.4.2</tag.version.allurehelper>
<tag.version.qautils>1.4.0</tag.version.qautils>
<tag.version.videorecorder>1.0.6</tag.version.videorecorder>
<tag.version.videorecorder>1.0.7</tag.version.videorecorder>
<tag.version.webdrivermanager>2.2.2</tag.version.webdrivermanager>
<tag.version.datajack>4.0.4</tag.version.datajack>
</properties>
Expand Down

0 comments on commit 69a6cac

Please sign in to comment.