Skip to content

[BUG]Immediate step of page.pause() always throws null pointer exception with version 1.35.0 #1313

@mridiniveni

Description

@mridiniveni

System info

  • Playwright Version: [1.35.0]
  • Operating System: [ macOS Ventura13.4]
  • Browser: [Chromium,]
  • Other info:

Source code

 public static void main(String[] args) {
            try (Playwright playwright = Playwright.create()) {
                BrowserType chromium = playwright.chromium();

                BrowserType.LaunchOptions launchOptions = new BrowserType.LaunchOptions();
                launchOptions.setHeadless(false);
                Browser browser= chromium.launch(launchOptions);

                launchOptions.setArgs(Collections.singletonList("--auth-server-whitelist='_'"));

         
                BrowserContext browserContext=browser.newContext(new Browser.NewContextOptions().setHttpCredentials("username","password"));
 Page page = browserContext.newPage();
                page.navigate(url);
                page.getByText("Sign in").click();
              page.pause();
 page.locator("locator").click(new Locator.ClickOptions().setDelay(500));
page.screenshot(new Page.ScreenshotOptions().setPath(Paths.get("example.png")));
}
}

Exception:

java.lang.NullPointerException
	at com.microsoft.playwright.impl.PageImpl.lambda$pause$58(PageImpl.java:946)
	at com.microsoft.playwright.impl.LoggingSupport.lambda$withLogging$0(LoggingSupport.java:36)
	at com.microsoft.playwright.impl.LoggingSupport.withLogging(LoggingSupport.java:47)
	at com.microsoft.playwright.impl.ChannelOwner.withLogging(ChannelOwner.java:87)
	at com.microsoft.playwright.impl.LoggingSupport.withLogging(LoggingSupport.java:35)
	at com.microsoft.playwright.impl.PageImpl.pause(PageImpl.java:938)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions