Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@

<properties>
<compiler.version>1.8</compiler.version>

<selenium.version>2.53.0</selenium.version>
<selenium.version>3.8.1</selenium.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.openqa.selenium.By;
import org.openqa.selenium.SearchContext;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.internal.Locatable;
import org.openqa.selenium.interactions.internal.Locatable;

import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import io.qameta.htmlelements.matcher.PredicateMatcher;
import org.hamcrest.Matcher;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.internal.Locatable;
import org.openqa.selenium.interactions.internal.Locatable;

import java.util.function.Predicate;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.qameta.htmlelements.extension.page;

import com.google.common.base.Predicate;
import com.google.common.base.Function;
import io.qameta.htmlelements.context.Context;
import io.qameta.htmlelements.exception.WebPageException;
import io.qameta.htmlelements.extension.HandleWith;
Expand Down Expand Up @@ -39,7 +39,8 @@ public Object handle(Context context, Object proxy, Method method, Object[] args
new WebDriverWait(driver, 5)
.ignoring(Throwable.class)
.withMessage(String.format("Couldn't wait for page with url %s to load", url))
.until((Predicate<WebDriver>) (d) -> (d != null && d.getCurrentUrl().equals(url)) &&
.until((Function<? super WebDriver, Boolean>) d ->
(d != null && d.getCurrentUrl().equals(url)) &&
WebDriverUtils.pageIsLoaded(d));
return proxy;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.qameta.htmlelements.extension.page;

import com.google.common.base.Predicate;
import com.google.common.base.Function;
import io.qameta.htmlelements.context.Context;
import io.qameta.htmlelements.exception.WebPageException;
import io.qameta.htmlelements.extension.HandleWith;
Expand Down Expand Up @@ -39,8 +39,9 @@ public Object handle(Context context, Object proxy, Method method, Object[] args
new WebDriverWait(driver, 5)
.ignoring(Throwable.class)
.withMessage(format("Couldn't wait for page with url %s to load", expectedUrlMacher))
.until((Predicate<WebDriver>) (d) -> (d != null && expectedUrlMacher.matches(d.getCurrentUrl())) &&
WebDriverUtils.pageIsLoaded(d));
.until((Function<? super WebDriver, Boolean>) d ->
(d != null && expectedUrlMacher.matches(d.getCurrentUrl())) &&
WebDriverUtils.pageIsLoaded(d));
return proxy;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.qameta.htmlelements.statement;

import com.google.common.base.Throwables;
import org.openqa.selenium.support.ui.Clock;
import org.openqa.selenium.support.ui.Duration;
import org.openqa.selenium.support.ui.SystemClock;
Expand All @@ -11,6 +10,8 @@
import java.util.Properties;
import java.util.concurrent.TimeUnit;

import static com.google.common.base.Throwables.throwIfUnchecked;

/**
* eroshenkoam
* 25.02.17
Expand Down Expand Up @@ -67,7 +68,8 @@ public Statement apply(Statement statement) throws Throwable {
break;
}
} else {
Throwables.propagate(e);
throwIfUnchecked(e);
throw new RuntimeException(e);
}
}
} while ((clock.isNowBefore(end)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

import io.qameta.htmlelements.annotation.Description;
import io.qameta.htmlelements.annotation.FindBy;
import io.qameta.htmlelements.annotation.Name;
import io.qameta.htmlelements.annotation.Param;
import io.qameta.htmlelements.element.*;
import io.qameta.htmlelements.example.TestData;
import io.qameta.htmlelements.extension.DescriptionProvider;

/**
* @author Artem Eroshenko <erosenkoam@me.com>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.qameta.htmlelements.example.element;

import io.qameta.htmlelements.annotation.FindBy;
import io.qameta.htmlelements.annotation.Name;
import io.qameta.htmlelements.element.*;
import io.qameta.htmlelements.example.TestData;
import org.openqa.selenium.WebElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@
import io.qameta.htmlelements.annotation.FindBy;
import io.qameta.htmlelements.element.ExtendedList;
import io.qameta.htmlelements.element.ExtendedWebElement;
import io.qameta.htmlelements.element.HtmlElement;
import io.qameta.htmlelements.element.HtmlElementList;
import io.qameta.htmlelements.example.TestData;

import java.util.List;

/**
* @author Artem Eroshenko <erosenkoam@me.com>
*/
Expand Down