Class BrowserControl

  • All Implemented Interfaces:
    AutoCloseable

    public class BrowserControl
    extends Object
    implements AutoCloseable
    Runs the browser via Playwright and gets the rendered page description.
    Author:
    burgetr
    • Constructor Detail

      • BrowserControl

        public BrowserControl()
    • Method Detail

      • getWidth

        public int getWidth()
      • setWidth

        public void setWidth​(int width)
      • getHeight

        public int getHeight()
      • setHeight

        public void setHeight​(int height)
      • getPersist

        public int getPersist()
      • setPersist

        public void setPersist​(int persist)
      • isAcquireImages

        public boolean isAcquireImages()
      • setAcquireImages

        public void setAcquireImages​(boolean acquireImages)
      • isIncludeScreenshot

        public boolean isIncludeScreenshot()
      • setIncludeScreenshot

        public void setIncludeScreenshot​(boolean includeScreenshot)
      • isNoHeadless

        public boolean isNoHeadless()
      • setNoHeadless

        public void setNoHeadless​(boolean noHeadless)
      • getUserDir

        public String getUserDir()
      • setUserDir

        public void setUserDir​(String userDir)
      • createBrowserType

        protected com.microsoft.playwright.BrowserType createBrowserType()
      • initCurrentContext

        protected void initCurrentContext()
      • launchTemporary

        protected com.microsoft.playwright.BrowserContext launchTemporary​(com.microsoft.playwright.BrowserType btype)
      • launchPersistent

        protected com.microsoft.playwright.BrowserContext launchPersistent​(com.microsoft.playwright.BrowserType btype,
                                                                           Path userDir)
      • getClientScript

        protected String getClientScript()
      • loadResource

        protected static String loadResource​(String filePath)