Skip to content

Commit a14c031

Browse files
committed
Merge branch 'master' into angular_rework_development
2 parents ac4f921 + 4ab9d39 commit a14c031

File tree

101 files changed

+1574
-1948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+1574
-1948
lines changed

jdi-eyes-demo/src/test/java/com/jdi/testng/TestNGListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import static java.lang.System.currentTimeMillis;
2222

2323
public class TestNGListener implements IInvokedMethodListener {
24-
private Long start = currentTimeMillis();
24+
private long start = currentTimeMillis();
2525

2626
@Override
2727
public void beforeInvocation(IInvokedMethod m, ITestResult tr) {

jdi-light-angular-tests-with-mocks/src/test/java/io/github/epam/testng/TestNGListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
public class TestNGListener implements IInvokedMethodListener {
1818

19-
private Long start = currentTimeMillis();
19+
private long start = currentTimeMillis();
2020

2121
@Override
2222
public void beforeInvocation(IInvokedMethod m, ITestResult tr) {

jdi-light-angular-tests/src/test/java/io/github/epam/testng/TestNGListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import static java.lang.System.currentTimeMillis;
1717

1818
public class TestNGListener implements IInvokedMethodListener {
19-
private Long start = currentTimeMillis();
19+
private long start = currentTimeMillis();
2020

2121
@Override
2222
public void beforeInvocation(IInvokedMethod m, ITestResult tr) {

jdi-light-bootstrap-tests/src/test/java/io/github/epam/testng/TestNGListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import static java.lang.System.currentTimeMillis;
2020

2121
public class TestNGListener implements IInvokedMethodListener {
22-
private Long start = currentTimeMillis();
22+
private long start = currentTimeMillis();
2323
@Override
2424
public void beforeInvocation(IInvokedMethod m, ITestResult tr) {
2525
if (m.isTestMethod()) {

jdi-light-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<dependency>
6767
<groupId>io.github.bonigarcia</groupId>
6868
<artifactId>webdrivermanager</artifactId>
69-
<version>5.6.2</version>
69+
<version>5.6.3</version>
7070
<exclusions>
7171
<exclusion>
7272
<groupId>com.github.docker-java</groupId>

jdi-light-core/src/main/java/com/epam/jdi/light/actions/ActionHelper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -747,12 +747,12 @@ public static ActionObject newInfo(ProceedingJoinPoint jp, String name) {
747747
}
748748
private static long previousThread = -1;
749749
public static JAction CHECK_MULTI_THREAD = () -> {
750-
if (previousThread == -1)
750+
if (previousThread == -1) {
751751
previousThread = currentThread().getId();
752-
else {
752+
} else {
753753
if (previousThread != currentThread().getId()) {
754754
MULTI_THREAD = true;
755-
logger.trace("switch to getMultiThreadDriver");
755+
logger.trace("Switch to getMultiThreadDriver");
756756
DRIVER.getFunc = WebDriverFactory::getMultiThreadDriver;
757757
CHECK_MULTI_THREAD = () -> {};
758758
if (GETTING_DRIVER) {

jdi-light-core/src/main/java/com/epam/jdi/light/driver/get/DriverInfo.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,14 @@ private WebDriver setupLocal() {
9292
Sleeper.SYSTEM_SLEEPER.sleep(Duration.ofMillis(1000));
9393
return this.setupLocal();
9494
}
95-
isLoading = isBlank(DRIVER.path);
95+
isLoading = isBlank(getProperty(properties));
9696
String driverPath = isLoading
9797
? DOWNLOAD_DRIVER_FUNC.execute(downloadType, getDriverPlatform(), DRIVER.version)
98-
: path.execute();
98+
: getProperty(properties);
9999
logger.info("Use driver path: " + driverPath);
100100
logger.trace("setProperty(properties:%s, driverPath:%s)", properties, driverPath);
101101
setProperty(properties, driverPath);
102+
DRIVER.path = driverPath;
102103
Capabilities caps = getCapabilities();
103104
logger.trace("getDriver.execute(getCapabilities())", caps);
104105
isLoading = false;
@@ -119,7 +120,8 @@ private WebDriver setupLocal() {
119120

120121
private WebDriver tryToDownloadDriver() {
121122
try {
122-
DOWNLOAD_DRIVER_FUNC.execute(downloadType, getDriverPlatform(), getBelowVersion());
123+
String dPath = DOWNLOAD_DRIVER_FUNC.execute(downloadType, getDriverPlatform(), getBelowVersion());
124+
setProperty(properties, dPath);
123125
return getDriver.execute(getCapabilities());
124126
} catch (Throwable ex) {
125127
throw exception(ex, "Failed to download driver");

jdi-light-core/src/main/java/com/epam/jdi/light/elements/common/Cookies.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ public static void setCookies(Collection<Cookie> cookies) {
7373
*/
7474
@JDIAction("Delete all cookies")
7575
public static void clearAllCookies() {
76-
manage().deleteAllCookies();
76+
try {
77+
manage().deleteAllCookies();
78+
} catch (Exception ignore) { }
7779
}
7880
/**
7981
* Clear browsers cache

jdi-light-core/src/main/java/com/epam/jdi/light/elements/composite/WebPage.java

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,25 @@ public static void checkUrl(String url) {
110110
init();
111111
new WebPage(url).checkOpened();
112112
}
113-
@JDIAction
113+
@JDIAction(value = "Verify that url contains {0}")
114114
public static boolean verifyUrl(String url) {
115-
init();
116-
return getUrl().contains(url);
115+
try {
116+
init();
117+
return getUrl().contains(url);
118+
} catch (Throwable ex) {
119+
logger.error("Failed during verify url", ex);
120+
}
121+
return false;
117122
}
118-
@JDIAction
123+
@JDIAction(value = "Verify that title contains {0}")
119124
public static boolean verifyTitle(String title) {
120-
init();
121-
return getTitle().contains(title);
125+
try {
126+
init();
127+
return getTitle().contains(title);
128+
} catch (Throwable ex) {
129+
logger.error("Failed during verify url", ex);
130+
}
131+
return false;
122132
}
123133
public static void checkTitle(String title) {
124134
init();

jdi-light-core/src/main/java/com/epam/jdi/light/elements/interfaces/base/HasPlaceholder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@
55
* Email: roman.iovlev.jdi@gmail.com; Skype: roman.iovlev
66
*/
77
public interface HasPlaceholder extends ICoreElement {
8-
default String placeholder() { return core().placeholder(); }
8+
default String placeholder() {
9+
return core().placeholder();
10+
}
911
}

0 commit comments

Comments
 (0)