Class BrowserDrone
java.lang.Object
uno.anahata.asi.yam.tools.browser.BrowserDrone
Represents a single browser WebDriver connection and its associated state.
This acts as the universal tracking object for headless and visible browser sessions across different implementations (e.g., Chrome, Firefox).
- Author:
- anahata
-
Field Summary
FieldsModifier and TypeFieldDescriptionOptional path to the browser binary (e.g. for Snap or custom installs).Tracks the current URL of the drone's active tab.org.openqa.selenium.WebDriverThe active WebDriver instance.booleanIndicates whether this drone is running in an invisible headless mode.The unique identifier for this drone.booleanIndicates whether the drone is currently in the process of starting up.Stores the last error message encountered by this drone, if any.intThe remote debugging port used to connect to the browser.The browser profile directory name (e.g., 'Default', 'Profile 1').The absolute path to the user data directory containing the profiles. -
Constructor Summary
ConstructorsConstructorDescriptionPublic constructor to provide documentation and instantiate a new drone. -
Method Summary
-
Field Details
-
driver
public transient org.openqa.selenium.WebDriver driverThe active WebDriver instance. Marked transient as the live network connection cannot be persisted across session restarts. -
initializing
public transient boolean initializingIndicates whether the drone is currently in the process of starting up. Marked transient as it only applies to the current runtime execution. -
id
The unique identifier for this drone. -
port
public int portThe remote debugging port used to connect to the browser.A value of
-1indicates that no connection has been established or the port hasn't been assigned yet. -
profile
The browser profile directory name (e.g., 'Default', 'Profile 1').Used to maintain consistent cookies and authentication across restarts.
-
userDataDir
The absolute path to the user data directory containing the profiles.Required for visual mode to locate existing Chrome/Firefox structures.
-
headless
public boolean headlessIndicates whether this drone is running in an invisible headless mode. -
binaryPath
Optional path to the browser binary (e.g. for Snap or custom installs). -
currentUrl
Tracks the current URL of the drone's active tab.This is updated after every navigation event to provide quick context without requiring a remote driver query.
-
lastError
Stores the last error message encountered by this drone, if any.Used by
AbstractBrowser.getStatus(String)to provide diagnostic feedback when a session fails to start.
-
-
Constructor Details
-
BrowserDrone
public BrowserDrone()Public constructor to provide documentation and instantiate a new drone.
-

