Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point to Sauce Docs for java and dotnet #95

Merged
merged 1 commit into from
Jul 17, 2024
Merged
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
28 changes: 2 additions & 26 deletions visual-dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,6 @@

Sauce Labs Visual for C# expose Sauce Labs Visual Testing for your C# project with Selenium.

# Installation
## Installation & Usage

Add SauceLabs.Visual to your current project
```sh
dotnet add package SauceLabs.Visual
```

# How to use

- Instantiate `VisualClient` object
```csharp
var dataCenter = DataCenter.UsWest1;
var visualClient = await VisualClient.Create(Driver, datacenter);
```

- Invoke Visual Testing
```csharp
var checkOptions = new VisualCheckOptions() { CaptureDom = true };
await visualClient.VisualCheck("Home Page", checkOptions);
```

- Get results of Visual Tests and run assertions on it
```csharp
var results = await visualClient.VisualResults(visualBuild.Id);
// verify that no differences have been detected
Assert.AreEqual(0, results[DiffStatus.Approved]);
```
View installation and usage instructions on the [Sauce Docs website](https://docs.saucelabs.com/visual-testing/integrations/csharp/).
63 changes: 2 additions & 61 deletions visual-java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,65 +2,6 @@

Sauce Labs Visual for Java exposes Sauce Labs Visual Testing for your Java project with Selenium.

## Installation
## Installation & Usage

Add [sauce visual](https://central.sonatype.com/artifact/com.saucelabs.visual/java-client) dependency to your project

*Latest available version can be found [here](https://central.sonatype.com/artifact/com.saucelabs.visual/java-client)*

- Maven

```xml

<dependency>
<groupId>com.saucelabs.visual</groupId>
<artifactId>java-client</artifactId>
<version>LATEST VERSION</version>
<scope>test</scope>
</dependency>
```

- Gradle

```
testImplementation group: 'com.saucelabs.visual', name: 'java-client', version: 'LATEST VERSION'
```

- Gradle (short)

```
testImplementation 'com.saucelabs.visual:java-client:LATEST VERSION'
```

## How to use

- Instantiate `VisualApi` object
```java

import com.saucelabs.visual.DataCenter;
import com.saucelabs.visual.VisualApi;
import org.openqa.selenium.remote.RemoteWebDriver;
//...
RemoteWebDriver driver = new RemoteWebDriver(webDriverUrl, capabilities);
VisualApi visual = new VisualApi.Builder(driver, sauceUsername, sauceAccessKey, DataCenter.US_WEST_1).build();
```

- Invoke Visual Testing
```java

import com.saucelabs.visual.CheckOptions;
//...
CheckOptions checkOptions = new CheckOptions.Builder().withCaptureDom(true).build();
visual.sauceVisualCheck("Home Page", checkOptions);
```

- Get results of Visual Tests and run assertions on it
```java

import com.saucelabs.visual.graphql.type.DiffStatus;
import org.junit.jupiter.api.Assertions;
//...
Map<DiffStatus, Integer> results = visual.sauceVisualResults();
// verify that no differences have been detected
Assertions.assertEquals(0, results.get(DiffStatus.APPROVED));
```
View installation and usage instructions on the [Sauce Docs website](https://docs.saucelabs.com/visual-testing/integrations/java/).
Loading