8000 SeleniumQueryWaitException -> SeleniumQueryTimeoutException · seleniumQuery/seleniumQuery@89beb6a · GitHub
[go: up one dir, main page]

Skip to content

Commit 89beb6a

Browse files
committed
SeleniumQueryWaitException -> SeleniumQueryTimeoutException
1 parent 7a366f4 commit 89beb6a

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

src/main/java/io/github/seleniumquery/wait/SeleniumQueryFluentWait.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ private <T> T fluentWait(SeleniumQueryObject seleniumQueryObject, Function<By, T
5252
.ignoring(NoSuchElementException.class)
5353
.until(function);
5454
} catch (TimeoutException sourceException) {
55-
throw new SeleniumQueryWaitException(sourceException, seleniumQueryObject, reason);
55+
throw new SeleniumQueryTimeoutException(sourceException, seleniumQueryObject, reason);
5656
}
5757
}
5858

src/main/java/io/github/seleniumquery/wait/SeleniumQueryWaitException.java renamed to src/main/java/io/github/seleniumquery/wait/SeleniumQueryTimeoutException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
import io.github.seleniumquery.SeleniumQueryConfig;
1313
import io.github.seleniumquery.SeleniumQueryObject;
1414

15-
public class SeleniumQueryWaitException extends TimeoutException {
15+
public class SeleniumQueryTimeoutException extends TimeoutException {
1616

1717
private static final long serialVersionUID = 2L;
1818

1919
private SeleniumQueryObject seleniumQueryObject;
2020

21-
public SeleniumQueryWaitException(TimeoutException sourceException, SeleniumQueryObject seleniumQueryObject, String reason) {
21+
public SeleniumQueryTimeoutException(TimeoutException sourceException, SeleniumQueryObject seleniumQueryObject, String reason) {
2222
super("Timeout while waiting for selector '"+seleniumQueryObject.getBy()+"' "+reason, sourceException);
2323
this.seleniumQueryObject = seleniumQueryObject;
2424

src/test/java/integration/waitUntil/WaitUntilIsMoreTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package integration.waitUntil;
22

33
import infrastructure.junitrule.SetUpAndTearDownDriver;
4-
import io.github.seleniumquery.wait.SeleniumQueryWaitException;
4+
import io.github.seleniumquery.wait.SeleniumQueryTimeoutException;
55
import org.junit.ClassRule;
66
import org.junit.Test;
77

@@ -43,7 +43,7 @@ public void containsText() {
4343
assertEquals("!visibleDiv!", $(".visibleDiv").waitUntil().text().contains("isibleDi").then().text());
4444
}
4545

46-
@Test(expected=SeleniumQueryWaitException.class)
46+
@Test(expected=SeleniumQueryTimeoutException.class)
4747
public void waitUntil_has_textContaininig__should_throw_an_exception_after_waiting_for_div_without_the_desired_text() {
4848
$(".visibleDiv").waitUntil().text().contains("CRAZY TEXT THAT IT DOES NOT CONTAIN");
4949
}

src/test/java/integration/waitUntil/WaitUntilValTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package integration.waitUntil;
22

33
import infrastructure.junitrule.SetUpAndTearDownDriver;
4+
import io.github.seleniumquery.wait.SeleniumQueryTimeoutException;
45
import org.junit.Before;
56
import org.junit.ClassRule;
67
import org.junit.Test;
@@ -28,7 +29,7 @@ public void waitUntil_val() {
2829
assertThat($("#i2").waitUntil().val().not().isEqualTo("xyz").then().size(), is(1));
2930
}
3031

31-
@Test
32+
@Test(expected = SeleniumQueryTimeoutException.class)
3233
public void waitUntil_val__not_everyone_meet() {
3334
assertThat($("input").waitUntil(500).val().isEqualTo("abcdef").then().size(), is(1));
3435
}

0 commit comments

Comments
 (0)
0