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

Commit

Permalink
set scenario name of test to selenoid name capability, if we don't se…
Browse files Browse the repository at this point in the history
…t capability via properties, add description
  • Loading branch information
UtinaSvetlana committed Oct 27, 2020
1 parent 84bc5bf commit 5dcac60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions page-factory-doc/src/main/asciidoc/web_properties.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ http://proxy.com:8080
|selenoid.enableVNC = true
|selenoid.screenResolution
| Разрешение экрана
selenoid.screenResolution = 1280x1024x24
|selenoid.screenResolution = 1280x1024x24
|selenoid.enableVideo
| Включение/выключение записи видео
|selenoid.enableVideo = true
Expand All @@ -149,7 +149,7 @@ selenoid.video.name = my-cool-video.mp4
| Количество кадров в секунду
|selenoid.video.frameRate = 24
|selenoid.nameOfTests
| Имя теста
| Имя теста, по умолчанию наименование берется из названия сценария
|selenoid.nameOfTests = myCoolTestName
|selenoid.timeZone
| Таймзона
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.openqa.selenium.remote.DesiredCapabilities;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.sbtqa.tag.pagefactory.environment.Environment;
import ru.sbtqa.tag.pagefactory.web.environment.WebEnvironment;
import ru.sbtqa.tag.pagefactory.web.properties.WebConfiguration;

Expand All @@ -30,7 +31,7 @@ public DesiredCapabilities parse() {
setCapability("videoName", PROPERTIES.getSelenoidVideoName(), VIDEONAME_FORMAT);
setCapability("videoScreenSize", PROPERTIES.getSelenoidVideoScreenSize());
setCapability("videoFrameRate", PROPERTIES.getSelenoidVideoFrameRate());
setCapability("name", PROPERTIES.getSelenoidNameOfTests());
setCapability("name", PROPERTIES.getSelenoidNameOfTests().trim().isEmpty() ? Environment.getScenario().getName() : PROPERTIES.getSelenoidNameOfTests());
setCapability("timeZone", PROPERTIES.getSelenoidTimeZone());
setCapability("hostsEntries", PROPERTIES.getSelenoidHostEntries());
setCapability("applicationContainers", PROPERTIES.getSelenoidApplicationContainers());
Expand Down

0 comments on commit 5dcac60

Please sign in to comment.