summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMavlushechka <mavlushechka@gmail.com>2022-10-20 01:01:03 +0500
committerMavlushechka <mavlushechka@gmail.com>2022-10-20 01:01:03 +0500
commit8d76bc6115773fa179be87bd9e95692925006747 (patch)
tree98aba808903660d1c445a33b3fbd622bc498131b
parent91e670e44088e2d4427b2d3c61c497ee0a28dccf (diff)
User system property instead for browser name instead of config filetask-3
-rw-r--r--src/main/java/com/mavlushechka/a1qa/driverUtils/WebDriverFactory.java2
-rw-r--r--src/main/resources/config.json1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/com/mavlushechka/a1qa/driverUtils/WebDriverFactory.java b/src/main/java/com/mavlushechka/a1qa/driverUtils/WebDriverFactory.java
index 7fde704..d7771ea 100644
--- a/src/main/java/com/mavlushechka/a1qa/driverUtils/WebDriverFactory.java
+++ b/src/main/java/com/mavlushechka/a1qa/driverUtils/WebDriverFactory.java
@@ -17,7 +17,7 @@ public class WebDriverFactory {
}
protected static WebDriver createWebDriver() {
- switch (Browser.valueOf(StringUtils.convertToConstantCase(JSONParser.parseData("config", "browser.name")))) {
+ switch (Browser.valueOf(StringUtils.convertToConstantCase(System.getProperty("browser.name")))) {
case CHROME -> {
LoggerUtils.info("Creating ChromeDriver.");
return createChromeDriver();
diff --git a/src/main/resources/config.json b/src/main/resources/config.json
index a55d26a..e4aa511 100644
--- a/src/main/resources/config.json
+++ b/src/main/resources/config.json
@@ -1,6 +1,5 @@
{
"browser": {
- "name": "Firefox",
"isIncognito": "true",
"isKiosk": "true",
"url": "https://jsonplaceholder.typicode.com"