diff --git a/.github/workflows/java-build.yml b/.github/workflows/java-build.yml
index 0566c3a5..b1b86a5b 100644
--- a/.github/workflows/java-build.yml
+++ b/.github/workflows/java-build.yml
@@ -30,8 +30,9 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.version }}
cache: 'maven'
- - name: Format / Lint Check
- run: mvn fmt:check --file pom.xml
- if: matrix.version == '11'
- name: Build with Maven
run: mvn -B package --file pom.xml
+ if: matrix.version == '8'
+ - name: Build and Lint with Maven
+ run: mvn -B verify --file pom.xml
+ if: matrix.version == '11'
diff --git a/visual-java/pom.xml b/visual-java/pom.xml
index 1de6876b..fa35b499 100644
--- a/visual-java/pom.xml
+++ b/visual-java/pom.xml
@@ -6,7 +6,7 @@
com.saucelabs.visual
java-client
- 0.9.0
+ 0.7.0
visual-java-client
Java library to interact with Sauce Visual
diff --git a/visual-java/src/main/java/com/saucelabs/visual/VisualApi.java b/visual-java/src/main/java/com/saucelabs/visual/VisualApi.java
index 2f720b45..7be07318 100644
--- a/visual-java/src/main/java/com/saucelabs/visual/VisualApi.java
+++ b/visual-java/src/main/java/com/saucelabs/visual/VisualApi.java
@@ -521,7 +521,7 @@ private List extractIgnoreElements(CheckOptions options) {
List result = new ArrayList<>();
for (int i = 0; i < ignoredElements.size(); i++) {
WebElement element = ignoredElements.get(i);
- if (validateRemoteElement(element) == null) {
+ if (validate(element) == null) {
throw new VisualApiException("options.ignoreElement[" + i + "] does not exist (yet)");
}
result.add(VisualRegion.ignoreChangesFor(element).toElementIn());
@@ -530,14 +530,7 @@ private List extractIgnoreElements(CheckOptions options) {
}
private WebElement validate(WebElement element) {
- if (element == null || !element.isDisplayed() || element.getRect() == null) {
- return null;
- }
- return element;
- }
-
- private WebElement validateRemoteElement(WebElement element) {
- if (element != null && element instanceof RemoteWebElement && element.isDisplayed()) {
+ if (element instanceof RemoteWebElement && element.isDisplayed()) {
return element;
}
return null;