fix 2: PlayWright-firstScript

This commit is contained in:
2024-10-22 11:11:48 -04:00
parent a6e48cac36
commit 2667cc4900
@@ -1,6 +1,5 @@
package zacksolutions; package zacksolutions;
import com.microsoft.playwright.Browser; import com.microsoft.playwright.Browser;
import com.microsoft.playwright.Page; import com.microsoft.playwright.Page;
import com.microsoft.playwright.Playwright; import com.microsoft.playwright.Playwright;
@@ -17,6 +16,8 @@ public class BrowserLaunchTest {
page.navigate("https://zenful.cloud"); page.navigate("https://zenful.cloud");
System.out.println(page.title()); System.out.println(page.title());
page.screenshot(new Page.ScreenshotOptions().setPath(Paths.get("photo.png"))); page.screenshot(new Page.ScreenshotOptions().setPath(Paths.get("photo.png")));
page.type("input[id='message']", "4 8 15 16 23 42");
page.click("button");
} }
} }
} }