Skip to main content

Cross Browser and Platform

Introduction

Sauce Bindings provides reasonable defaults to make your developer experience easier 👍

Run a test on latest Chrome


https://github.com/saucelabs/sauce_bindings/blob/main/java/junit5/src/test/java/com/saucelabs/saucebindings/junit5/examples/SessionTest.java

Run a test on Safari on Mac


https://github.com/saucelabs/sauce_bindings/blob/main/java/junit5/src/test/java/com/saucelabs/saucebindings/junit5/examples/SessionTest.java

Numerous configuration options are available for your tests.

See Platform Configurator

Browser Capabilities

There are many browser capabilities that can be configured to define a specific behavior for your tests. For example,

Set UnhandledPromptBehavior


https://github.com/saucelabs/sauce_bindings/blob/main/java/junit5/src/test/java/com/saucelabs/saucebindings/junit5/examples/CommonOptionsTest.java

The test above will run on X, Y, Z.

Additionally, there are settings that apply to all browser sessions that can be configured in SauceOptions

Here's an example of running a test on Firefox and Windows 8.0, that accepts insecure certificates and changes the unhandled prompt behavior to "ignore":

https://github.com/saucelabs/sauce_bindings/tree/website-1.2.0/java/junit5/src/test/java/com/saucelabs/saucebindings/junit5/examples/CommonOptionsTest.java