Skip to content

Commit

Permalink
[java] Removing check for TAKES_SCREENSHOT in test
Browse files Browse the repository at this point in the history
As this is not affecting if the test runs or not.
  • Loading branch information
diemol committed May 25, 2022
1 parent 348f17b commit 70b0bb8
Showing 1 changed file with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@

package org.openqa.selenium.remote;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.openqa.selenium.OutputType.BASE64;
import static org.openqa.selenium.testing.drivers.Browser.HTMLUNIT;

import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
Expand All @@ -30,6 +25,11 @@
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.openqa.selenium.OutputType.BASE64;
import static org.openqa.selenium.testing.drivers.Browser.HTMLUNIT;

@Ignore(HTMLUNIT)
public class RemoteWebDriverScreenshotTest extends JUnit4TestBase {

Expand All @@ -56,13 +56,6 @@ public void testCanAugmentWebDriverInstanceIfNecessary() {
return;
}

RemoteWebDriver remote = (RemoteWebDriver) driver;
Boolean screenshots = (Boolean) remote.getCapabilities()
.getCapability(CapabilityType.TAKES_SCREENSHOT);
if (screenshots == null || !screenshots) {
System.out.println("Skipping test: remote driver cannot take screenshots");
}

driver.get(pages.formPage);
WebDriver toUse = new Augmenter().augment(driver);
String screenshot = ((TakesScreenshot) toUse).getScreenshotAs(BASE64);
Expand Down

0 comments on commit 70b0bb8

Please sign in to comment.