Class PulsarSettings

  • All Implemented Interfaces:

    
    public final class PulsarSettings
    
                        

    The PulsarSettings class defines a convenient interface to control the behavior of Browser4.

    For example, to run multiple temporary browsers in headless mode, which is usually used in the spider scenario, you can use the following code:

    PulsarSettings
       .headless()
       .maxBrowsers(4)
       .maxOpenTabs(12)
       .enableUrlBlocking()

    The above code will:

    • Run the browser in headless mode

    • Set the number of privacy contexts to 4

    • Set the max number of open tabs in each browser context to 12

    • Enable url blocking

    If you want to run your system's default browser in GUI mode, and interact with the webpage, you can use the following code:

    PulsarSettings.withSystemDefaultBrowser().withGUI().withSPA()

    The above code will:

    • Use the system's default browser

    • Run the browser in GUI mode

    • Set the system to work with single page application