Skip to content

Commit

Permalink
Update examples; Prepare for v4.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kklisura committed May 21, 2021
1 parent 4e1a3ad commit 54f4acf
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ For more information on DevTools, see https://chromedevtools.github.io/devtools-

[v3.0.0](https://github.com/kklisura/chrome-devtools-java-client/tree/v3.0.0) tested on Google Chrome Version 86.0.4240.111. Protocol files from [dev-tools-protocol#fcb68d10bc](https://github.com/ChromeDevTools/devtools-protocol/tree/fcb68d10bc5258ebf96121caf57200069f6e6731/json)

[v4.0.0](https://github.com/kklisura/chrome-devtools-java-client/tree/v4.0.0) tested on Google Chrome Version 90.0.4430.212. Protocol files from [dev-tools-protocol#987bbb1124](https://github.com/ChromeDevTools/devtools-protocol/tree/987bbb1124f098c7e4bca6b2f91c7e96b350a8e6/json)

[1] https://chromedevtools.github.io/devtools-protocol/.

## Usage
Expand All @@ -22,7 +24,7 @@ Add the following dependency to your `pom.xml`:
<dependency>
<groupId>com.github.kklisura.cdt</groupId>
<artifactId>cdt-java-client</artifactId>
<version>3.0.0</version>
<version>4.0.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion cdt-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<dependency>
<groupId>com.github.kklisura.cdt</groupId>
<artifactId>cdt-java-client</artifactId>
<version>3.0.0</version>
<version>4.0.0</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

/**
* Takes a full page screenshot. The output screenshot dimensions will be page width x page height,
* for example when capturing http://github.com the output screenshot image will be 1200 × 6598.
* for example when capturing https://news.ycombinator.com/ the output screenshot image will be 1185x1214
*
* @author Kenan Klisura
*/
Expand Down Expand Up @@ -66,7 +66,8 @@ private static void captureFullPageScreenshot(

dump(
outputFilename,
page.captureScreenshot(CaptureScreenshotFormat.PNG, 100, viewport, Boolean.TRUE));
page.captureScreenshot(
CaptureScreenshotFormat.PNG, 100, viewport, Boolean.TRUE, Boolean.FALSE));
}

public static void main(String[] args) {
Expand Down Expand Up @@ -100,7 +101,7 @@ public static void main(String[] args) {
page.enable();

// Navigate to github.com.
page.navigate("http://github.com");
page.navigate("https://news.ycombinator.com/");

devToolsService.waitUntilClosed();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import java.util.Base64;

/**
* The following example opens the http://github.com and prints its page to PDF. PDF printing is
* The following example opens the HackerNews and prints its page to PDF. PDF printing is
* supported on chrome headless at the moment.
*
* @author Kenan Klisura
Expand All @@ -58,7 +58,7 @@ public static void main(String[] args) {
page.enable();

// Navigate to github.com.
page.navigate("http://github.com");
page.navigate("https://news.ycombinator.com/");

page.onLoadEventFired(
loadEventFired -> {
Expand Down
2 changes: 1 addition & 1 deletion cdt-java-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>com.github.kklisura.cdt</groupId>
<artifactId>cdt-java-client</artifactId>
<version>3.0.0</version>
<version>4.0.0</version>
<packaging>jar</packaging>

<name>cdt-java-client</name>
Expand Down

0 comments on commit 54f4acf

Please sign in to comment.