Skip to content

Commit 54f4acf

Browse files
committed
Update examples; Prepare for v4.0.0 release
1 parent 4e1a3ad commit 54f4acf

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ For more information on DevTools, see https://chromedevtools.github.io/devtools-
1212

1313
[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)
1414

15+
[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)
16+
1517
[1] https://chromedevtools.github.io/devtools-protocol/.
1618

1719
## Usage
@@ -22,7 +24,7 @@ Add the following dependency to your `pom.xml`:
2224
<dependency>
2325
<groupId>com.github.kklisura.cdt</groupId>
2426
<artifactId>cdt-java-client</artifactId>
25-
<version>3.0.0</version>
27+
<version>4.0.0</version>
2628
</dependency>
2729
```
2830

cdt-examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<dependency>
3232
<groupId>com.github.kklisura.cdt</groupId>
3333
<artifactId>cdt-java-client</artifactId>
34-
<version>3.0.0</version>
34+
<version>4.0.0</version>
3535
</dependency>
3636

3737
<dependency>

cdt-examples/src/main/java/com/github/kklisura/cdt/examples/FullPageScreenshotExample.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

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

6767
dump(
6868
outputFilename,
69-
page.captureScreenshot(CaptureScreenshotFormat.PNG, 100, viewport, Boolean.TRUE));
69+
page.captureScreenshot(
70+
CaptureScreenshotFormat.PNG, 100, viewport, Boolean.TRUE, Boolean.FALSE));
7071
}
7172

7273
public static void main(String[] args) {
@@ -100,7 +101,7 @@ public static void main(String[] args) {
100101
page.enable();
101102

102103
// Navigate to github.com.
103-
page.navigate("http://github.com");
104+
page.navigate("https://news.ycombinator.com/");
104105

105106
devToolsService.waitUntilClosed();
106107
}

cdt-examples/src/main/java/com/github/kklisura/cdt/examples/PrintingPageToPdf.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import java.util.Base64;
3434

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

6060
// Navigate to github.com.
61-
page.navigate("http://github.com");
61+
page.navigate("https://news.ycombinator.com/");
6262

6363
page.onLoadEventFired(
6464
loadEventFired -> {

cdt-java-client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>com.github.kklisura.cdt</groupId>
99
<artifactId>cdt-java-client</artifactId>
10-
<version>3.0.0</version>
10+
<version>4.0.0</version>
1111
<packaging>jar</packaging>
1212

1313
<name>cdt-java-client</name>

0 commit comments

Comments
 (0)