Class PlaywrightImpl

    • Constructor Detail

      • PlaywrightImpl

        PlaywrightImpl​(ChannelOwner parent,
                       java.lang.String type,
                       java.lang.String guid,
                       com.google.gson.JsonObject initializer)
    • Method Detail

      • create

        public static PlaywrightImpl create​(Playwright.CreateOptions options)
        Description copied from interface: Playwright
        Launches new Playwright driver process and connects to it. Playwright.close() should be called when the instance is no longer needed.
        
         Playwright playwright = Playwright.create();
         Browser browser = playwright.webkit().launch();
         Page page = browser.newPage();
         page.navigate("https://www.w3.org/");
         playwright.close();
         
      • initSharedSelectors

        void initSharedSelectors​(PlaywrightImpl parent)
      • unregisterSelectors

        void unregisterSelectors()
      • chromium

        public BrowserTypeImpl chromium()
        Description copied from interface: Playwright
        This object can be used to launch or connect to Chromium, returning instances of Browser.
        Specified by:
        chromium in interface Playwright
      • firefox

        public BrowserTypeImpl firefox()
        Description copied from interface: Playwright
        This object can be used to launch or connect to Firefox, returning instances of Browser.
        Specified by:
        firefox in interface Playwright
      • request

        public APIRequest request()
        Description copied from interface: Playwright
        Exposes API that can be used for the Web API testing.
        Specified by:
        request in interface Playwright
      • webkit

        public BrowserTypeImpl webkit()
        Description copied from interface: Playwright
        This object can be used to launch or connect to WebKit, returning instances of Browser.
        Specified by:
        webkit in interface Playwright
      • close

        public void close()
        Description copied from interface: Playwright
        Terminates this instance of Playwright, will also close all created browsers if they are still running.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface Playwright