1
0
mirror of synced 2026-08-31 19:55:37 +00:00

chore: roll driver, fix canSpecifyPreinstalledNodeJsAsEnv on windows (#1496)

This commit is contained in:
Yury Semikhatsky
2024-02-20 10:58:32 -08:00
committed by GitHub
parent 1b2ac3f2c3
commit b9b3552cc4
4 changed files with 26 additions and 3 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ Playwright is a Java library to automate [Chromium](https://www.chromium.org/Hom
| | Linux | macOS | Windows |
| :--- | :---: | :---: | :---: |
| Chromium <!-- GEN:chromium-version -->122.0.6261.29<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Chromium <!-- GEN:chromium-version -->122.0.6261.39<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| WebKit <!-- GEN:webkit-version -->17.4<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Firefox <!-- GEN:firefox-version -->122.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
@@ -2055,6 +2055,10 @@ public interface Page extends AutoCloseable {
* Paper margins, defaults to none.
*/
public Margin margin;
/**
* Whether or not to embed the document outline into the PDF. Defaults to {@code false}.
*/
public Boolean outline;
/**
* Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
*/
@@ -2077,6 +2081,10 @@ public interface Page extends AutoCloseable {
* Scale of the webpage rendering. Defaults to {@code 1}. Scale amount must be between 0.1 and 2.
*/
public Double scale;
/**
* Whether or not to generate tagged (accessible) PDF. Defaults to {@code false}.
*/
public Boolean tagged;
/**
* Paper width, accepts values labeled with units.
*/
@@ -2139,6 +2147,13 @@ public interface Page extends AutoCloseable {
this.margin = margin;
return this;
}
/**
* Whether or not to embed the document outline into the PDF. Defaults to {@code false}.
*/
public PdfOptions setOutline(boolean outline) {
this.outline = outline;
return this;
}
/**
* Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
*/
@@ -2176,6 +2191,13 @@ public interface Page extends AutoCloseable {
this.scale = scale;
return this;
}
/**
* Whether or not to generate tagged (accessible) PDF. Defaults to {@code false}.
*/
public PdfOptions setTagged(boolean tagged) {
this.tagged = tagged;
return this;
}
/**
* Paper width, accepts values labeled with units.
*/
@@ -3,6 +3,7 @@ package com.microsoft.playwright;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIf;
import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -16,6 +17,6 @@ public class TestPageAddScriptTag extends TestBase {
Path path = Paths.get("src/test/resources/injectedfile.js");
page.addScriptTag(new Page.AddScriptTagOptions().setPath(path));
String result = (String) page.evaluate("() => window['__injectedError'].stack");
assertTrue(result.contains("resources/injectedfile.js"));
assertTrue(result.contains("resources" + File.separator + "injectedfile.js"), result);
}
}
+1 -1
View File
@@ -1 +1 @@
1.42.0-alpha-1707967288000
1.42.0-alpha-1708140911000