Accessibility Testing
As of version 1.2, Sauce Bindings supports the new Sauce Labs Deque axe™ Integration
- Java
- JUnit 5
import com.deque.html.axecore.results.Results;
import com.saucelabs.saucebindings.SauceSession;
import com.saucelabs.saucebindings.junit5.SauceBindingsExtension;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.openqa.selenium.WebDriver;
public class AccessibilityExample {
WebDriver driver;
SauceSession session;
@RegisterExtension static SauceBindingsExtension sauceExtension = new SauceBindingsExtension();
@BeforeEach
public void storeVariables() {
session = sauceExtension.getSession();
driver = sauceExtension.getDriver();
}
@Test
public void accessibilityExample() {
driver.get("https://www.saucedemo.com/");
Results accessibilityResults = session.getAccessibilityResults();
}
}