1
0
mirror of synced 2026-05-23 11:13:15 +00:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Yury Semikhatsky 82260585ce chore: roll 1.41.2 driver, mark 1.41.2 (#1471) 2024-02-01 16:42:13 -08:00
Yury Semikhatsky bae57eec02 cherry-pick(#1469): fix: put file payloads into "payloads" protocol f… (#1470)
Reference https://github.com/microsoft/playwright-java/issues/1468
2024-02-01 12:20:31 -08:00
Yury Semikhatsky fd0c9ca398 chore: set version to 1.41.1 (#1463) 2024-01-25 13:08:40 -08:00
Yury Semikhatsky ae3cfc9e91 chore: roll driver 1.41.1 (#1462) 2024-01-25 12:50:45 -08:00
15 changed files with 27 additions and 14 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>com.microsoft.playwright</groupId>
<artifactId>parent-pom</artifactId>
<version>1.41.0</version>
<version>1.41.2</version>
</parent>
<artifactId>driver-bundle</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>com.microsoft.playwright</groupId>
<artifactId>parent-pom</artifactId>
<version>1.41.0</version>
<version>1.41.2</version>
</parent>
<artifactId>driver</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>org.example</groupId>
<artifactId>examples</artifactId>
<version>1.41.0</version>
<version>1.41.2</version>
<name>Playwright Client Examples</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+1 -1
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>com.microsoft.playwright</groupId>
<artifactId>parent-pom</artifactId>
<version>1.41.0</version>
<version>1.41.2</version>
</parent>
<artifactId>playwright</artifactId>
@@ -248,6 +248,8 @@ public class Connection {
String callLog = formatCallLog(message.log);
if (message.error.error == null) {
callback.completeExceptionally(new PlaywrightException(message.error + callLog));
} else if ("Expect".equals(message.error.error.name)) {
callback.complete(message.result);
} else if ("TimeoutError".equals(message.error.error.name)) {
callback.completeExceptionally(new TimeoutError(message.error.error + callLog));
} else if ("TargetClosedError".equals(message.error.error.name)) {
@@ -490,7 +490,7 @@ public class ElementHandleImpl extends JSHandleImpl implements ElementHandle {
options = new SetInputFilesOptions();
}
JsonObject params = gson().toJsonTree(options).getAsJsonObject();
params.add("files", Serialization.toJsonArray(files));
params.add("payloads", Serialization.toJsonArray(files));
sendMessage("setInputFiles", params);
}
@@ -308,7 +308,18 @@ public class TestPageSetInputFiles extends TestBase {
assertEquals("file-to-upload.txt", page.evalOnSelector("input", "input => input.files[0].name"));
}
// @Test
@Test
void shouldAcceptSingleFilePayload() {
page.setContent("<input type=file oninput='javascript:console.timeStamp()'>");
FileChooser fileChooser = page.waitForFileChooser(() -> page.click("input"));
assertEquals(page, fileChooser.page());
assertNotNull(fileChooser.element());
fileChooser.setFiles(new FilePayload("test.txt", "text/plain", "Hello!".getBytes()));
assertEquals(1, page.evalOnSelector("input", "input => input.files.length"));
assertEquals("test.txt", page.evalOnSelector("input", "input => input.files[0].name"));
}
// @Test
void shouldDetectMimeType() throws ExecutionException, InterruptedException {
// TODO: Parse form fields on server
}
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>com.microsoft.playwright</groupId>
<artifactId>parent-pom</artifactId>
<version>1.41.0</version>
<version>1.41.2</version>
<packaging>pom</packaging>
<name>Playwright Parent Project</name>
<description>Java library to automate Chromium, Firefox and WebKit with a single API.
+1 -1
View File
@@ -1 +1 @@
1.41.0
1.41.2
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>com.microsoft.playwright</groupId>
<artifactId>api-generator</artifactId>
<version>1.41.0</version>
<version>1.41.2</version>
<name>Playwright - API Generator</name>
<description>
This is an internal module used to generate Java API from the upstream Playwright
+1 -1
View File
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.microsoft.playwright</groupId>
<artifactId>test-cli-fatjar</artifactId>
<version>1.41.0</version>
<version>1.41.2</version>
<name>Test Playwright Command Line FatJar</name>
<properties>
<compiler.version>1.8</compiler.version>
+1 -1
View File
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.microsoft.playwright</groupId>
<artifactId>test-cli-version</artifactId>
<version>1.41.0</version>
<version>1.41.2</version>
<name>Test Playwright Command Line Version</name>
<properties>
<compiler.version>1.8</compiler.version>
+1 -1
View File
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.microsoft.playwright</groupId>
<artifactId>test-local-installation</artifactId>
<version>1.41.0</version>
<version>1.41.2</version>
<name>Test local installation</name>
<description>Runs Playwright test suite (copied from playwright module) against locally cached Playwright</description>
<properties>
+1 -1
View File
@@ -9,7 +9,7 @@
</parent>
<groupId>com.microsoft.playwright</groupId>
<artifactId>test-spring-boot-starter</artifactId>
<version>1.41.0</version>
<version>1.41.2</version>
<name>Test Playwright With Spring Boot</name>
<properties>
<spring.version>2.4.3</spring.version>
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>com.microsoft.playwright</groupId>
<artifactId>update-version</artifactId>
<version>1.41.0</version>
<version>1.41.2</version>
<name>Playwright - Update Version in Documentation</name>
<description>
This is an internal module used to update versions in the documentation based on