Skip to content

Commit 010e782

Browse files
committed
Review feedback
1 parent ed032cf commit 010e782

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

driver-bundle/src/main/java/com/microsoft/playwright/impl/driver/jar/DriverJar.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public DriverJar() throws IOException {
4040
driverTempDir = alternativeTmpdir == null
4141
? Files.createTempDirectory(prefix)
4242
: Files.createTempDirectory(Paths.get(alternativeTmpdir), prefix);
43+
driverTempDir.toFile().deleteOnExit();
4344
String nodePath = System.getProperty("playwright.nodejs.path");
4445
if (nodePath != null) {
4546
preinstalledNodePath = Paths.get(nodePath);
@@ -86,11 +87,10 @@ private void installBrowsers(Map<String, String> env) throws IOException, Interr
8687
}
8788
ProcessBuilder pb = createProcessBuilder();
8889
pb.command().add("install");
89-
logMessage("Executing: " + String.join(" ", pb.command()));
9090
pb.redirectError(ProcessBuilder.Redirect.INHERIT);
9191
pb.redirectOutput(ProcessBuilder.Redirect.INHERIT);
9292
Process p = pb.start();
93-
boolean result = p.waitFor(30, TimeUnit.MINUTES);
93+
boolean result = p.waitFor(10, TimeUnit.MINUTES);
9494
if (!result) {
9595
p.destroy();
9696
throw new RuntimeException("Timed out waiting for browsers to install");

playwright/src/test/java/com/microsoft/playwright/TraceViewerPage.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,58 +23,58 @@
2323
import com.microsoft.playwright.impl.driver.Driver;
2424
import com.microsoft.playwright.options.AriaRole;
2525

26-
public class TraceViewerPage {
26+
class TraceViewerPage {
2727
private final Page page;
2828

29-
public TraceViewerPage(Page page) {
29+
TraceViewerPage(Page page) {
3030
this.page = page;
3131
}
3232

33-
public Page page() {
33+
Page page() {
3434
return page;
3535
}
3636

37-
public Locator actionsTree() {
37+
Locator actionsTree() {
3838
return page.getByTestId("actions-tree");
3939
}
4040

41-
public Locator actionTitles() {
41+
Locator actionTitles() {
4242
return page.locator(".action-title");
4343
}
4444

45-
public Locator stackFrames() {
45+
Locator stackFrames() {
4646
return this.page.getByRole(AriaRole.LIST, new Page.GetByRoleOptions().setName("stack trace")).getByRole(AriaRole.LISTITEM);
4747
}
4848

49-
public void selectAction(String title, int ordinal) {
49+
void selectAction(String title, int ordinal) {
5050
this.actionsTree().getByTitle(title).nth(ordinal).click();
5151
}
5252

53-
public void selectAction(String title) {
53+
void selectAction(String title) {
5454
selectAction(title, 0);
5555
}
5656

57-
public void selectSnapshot(String name) {
57+
void selectSnapshot(String name) {
5858
this.page.getByRole(AriaRole.TAB, new Page.GetByRoleOptions().setName(name)).click();
5959
}
6060

61-
public FrameLocator snapshotFrame(String actionName, int ordinal, boolean hasSubframe) {
61+
FrameLocator snapshotFrame(String actionName, int ordinal, boolean hasSubframe) {
6262
selectAction(actionName, ordinal);
6363
while (page.frames().size() < (hasSubframe ? 4 : 3)) {
6464
page.waitForTimeout(200);
6565
}
6666
return page.frameLocator("iframe.snapshot-visible[name=snapshot]");
6767
}
6868

69-
public FrameLocator snapshotFrame(String actionName, int ordinal) {
69+
FrameLocator snapshotFrame(String actionName, int ordinal) {
7070
return snapshotFrame(actionName, ordinal, false);
7171
}
7272

73-
public void showSourceTab() {
73+
void showSourceTab() {
7474
page.getByRole(AriaRole.TAB, new Page.GetByRoleOptions().setName("Source")).click();
7575
}
7676

77-
public void expandAction(String title) {
77+
void expandAction(String title) {
7878
this.actionsTree().getByRole(AriaRole.TREEITEM, new Locator.GetByRoleOptions().setName(title)).locator(".codicon-chevron-right").click();
7979
}
8080

0 commit comments

Comments
 (0)