Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public String failure() {

public Path pathAfterFinished() {
if (connection.isRemote()) {
throw new PlaywrightException("Path is not available when using browserType.connect(). Use download.saveAs() to save a local copy.");
throw new PlaywrightException("Path is not available when connecting remotely. Use saveAs() to save a local copy.");
}
return FileSystems.getDefault().getPath(channel.pathAfterFinished(NO_TIMEOUT).value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void delete() {
@Override
public Path path() {
if (page.connection.isRemote()) {
throw new PlaywrightException("Path is not available when using browserType.connect(). Use saveAs() to save a local copy.");
throw new PlaywrightException("Path is not available when connecting remotely. Use saveAs() to save a local copy.");
}
if (artifact == null)
throw new PlaywrightException("Video recording has not been started.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ void shouldSaveAsVideosFromRemoteBrowser(Browser browser, @TempDir Path tempDir)
page.video().saveAs(savedAsPath);
assertTrue(Files.exists(savedAsPath));
PlaywrightException e = assertThrows(PlaywrightException.class, () -> page.video().path());
assertTrue(e.getMessage().contains("Path is not available when using browserType.connect(). Use saveAs() to save a local copy."));
assertTrue(e.getMessage().contains("Path is not available when connecting remotely. Use saveAs() to save a local copy."));
}


Expand All @@ -354,7 +354,7 @@ void shouldSaveDownload(Browser browser, Server server, @TempDir Path tempDir) t
assertTrue(Files.exists(nestedPath));
assertEquals("Hello world", new String(Files.readAllBytes(nestedPath), StandardCharsets.UTF_8));
PlaywrightException e = assertThrows(PlaywrightException.class, () -> download.path());
assertTrue(e.getMessage().contains("Path is not available when using browserType.connect(). Use download.saveAs() to save a local copy."));
assertTrue(e.getMessage().contains("Path is not available when connecting remotely. Use saveAs() to save a local copy."));
page.close();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,6 @@ void shouldBeAbleToConnect20TimesToASingleServerWithoutWarnings(Connect connect,

@PlaywrightTest
@DisplayName("BT-068 should save download")
@Fixme("java: the message of download.path() differs: 'Path is not available when using browserType.connect(). Use download.saveAs() to save a local copy.'")
void shouldSaveDownload(TestServer server, Connect connect, StartRemoteServer startRemoteServer, TestInfo testInfo) throws Exception {
server.setRoute("/download", (req, res) -> {
res.setHeader("Content-Type", "application/octet-stream");
Expand Down
Loading