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 @@ -35,7 +35,7 @@

import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT;
import static com.microsoft.playwright.impl.Serialization.gson;
import static com.microsoft.playwright.impl.Utils.isSafeCloseError;
import static com.microsoft.playwright.impl.Errors.isSafeCloseError;
import static java.util.Arrays.asList;

class APIResponseImpl implements APIResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ public String failure() {
}

public Path pathAfterFinished() {
if (connection.isRemote) {
if (connection.isRemote()) {
throw new PlaywrightException("Path is not available when using browserType.connect(). Use download.saveAs() to save a local copy.");
}
return FileSystems.getDefault().getPath(channel.pathAfterFinished(NO_TIMEOUT).value);
}

public void saveAs(Path path) {
if (connection.isRemote) {
if (connection.isRemote()) {
Stream stream = channel.saveAsStream(NO_TIMEOUT).stream;
writeToFile(stream.stream(), path);
return;
Expand Down
Loading
Loading