Class ChromiumFactory
-
- All Implemented Interfaces:
-
ai.platon.pulsar.skeleton.crawl.fetch.driver.BrowserFactory
public final class ChromiumFactory implements BrowserFactoryA factory to create browser instances.
-
-
Constructor Summary
Constructors Constructor Description ChromiumFactory()
-
Method Summary
Modifier and Type Method Description Browserconnect(Integer port, BrowserSettings settings)Connect to a browser instance, the browser instance should be open with Chrome devtools open. BrowserlaunchSystemDefaultBrowser()Launch the system default browser, the system default browser is your daily used browser. BrowserlaunchDefaultBrowser()Launch the default browser, notice, the default browser is not the one you used daily. BrowserlaunchPrototypeBrowser()Launch the prototype browser, the prototype browser is a browser instance with default settings. BrowserlaunchNextSequentialBrowser()Launch the next sequential browser, the browser's user data dir rotates between a group of dirs. BrowserlaunchRandomTempBrowser()Launch a random temporary browser, the browser's user data dir is a random temporary dir. final Browserlaunch(BrowserId browserId, LauncherOptions launcherOptions, ChromeOptions launchOptions)Launch a browser with the given browser id, the browser id is used to identify the browser instance. -
-
Method Detail
-
connect
Browser connect(Integer port, BrowserSettings settings)
Connect to a browser instance, the browser instance should be open with Chrome devtools open.
-
launchSystemDefaultBrowser
Browser launchSystemDefaultBrowser()
Launch the system default browser, the system default browser is your daily used browser.
-
launchDefaultBrowser
Browser launchDefaultBrowser()
Launch the default browser, notice, the default browser is not the one you used daily.
-
launchPrototypeBrowser
Browser launchPrototypeBrowser()
Launch the prototype browser, the prototype browser is a browser instance with default settings.
-
launchNextSequentialBrowser
Browser launchNextSequentialBrowser()
Launch the next sequential browser, the browser's user data dir rotates between a group of dirs.
-
launchRandomTempBrowser
Browser launchRandomTempBrowser()
Launch a random temporary browser, the browser's user data dir is a random temporary dir.
-
launch
final Browser launch(BrowserId browserId, LauncherOptions launcherOptions, ChromeOptions launchOptions)
Launch a browser with the given browser id, the browser id is used to identify the browser instance.
-
-
-
-