Constructor
new Blacktraffic.AgentBrowserSelenium()
Extends
Members
Methods
(async) captureConsoleToChannel()
Captures the current tab's console and feeds it into a log.Channel.
- Method of: Blacktraffic.AgentBrowserSelenium
(async) close() → {Promise.<Blacktraffic.AgentBrowser.AgentBrowserSelenium>}
Closes the browser currently mounted to the AgentBrowser.
- Method of: Blacktraffic.AgentBrowserSelenium
Returns:
- Type:
-
Promise.<Blacktraffic.AgentBrowser.AgentBrowserSelenium>
(async) closeTab(arg0_tab_key) → {Promise.<Blacktraffic.AgentBrowser.AgentBrowserSelenium>}
Closes the tab specified.
- Method of: Blacktraffic.AgentBrowserSelenium
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_tab_key |
Object
|
string
|
Returns:
- Type:
-
Promise.<Blacktraffic.AgentBrowser.AgentBrowserSelenium>
(async) closeUserTabs() → {Promise.<Blacktraffic.AgentBrowser.AgentBrowserSelenium>}
Closes all user tabs from the current browser.
- Method of: Blacktraffic.AgentBrowserSelenium
Returns:
- Type:
-
Promise.<Blacktraffic.AgentBrowser.AgentBrowserSelenium>
(async) focusTab(arg0_tab_key) → {Promise.<(Object|undefined)>}
Focuses the specified tab.
- Method of: Blacktraffic.AgentBrowserSelenium
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_tab_key |
string
|
Returns:
- Type:
-
Promise.<(Object|undefined)>
(async) getElement(arg0_tab_key, arg1_selector, arg2_optionsopt) → {Promise.<HTMLElement>}
Fetches a specific element handle using CSS selectors.
- Method of: Blacktraffic.AgentBrowserSelenium
Parameters:
| Name | Type | Attributes | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
arg0_tab_key |
Object
|
string
|
||||||||||||
arg1_selector |
string
|
||||||||||||
arg2_options |
Object
|
<optional> |
|
Returns:
- Type:
-
Promise.<HTMLElement>
getTab(arg0_tab_key) → {Object}
Returns a tab object based on its key.
- Method of: Blacktraffic.AgentBrowserSelenium
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_tab_key |
Object
|
string
|
Returns:
- Type:
-
Object
(async) getTabs() → {Promise.<Array.<Object>>}
Returns all tabs in the current browser.
- Method of: Blacktraffic.AgentBrowserSelenium
(async) injectScript(arg0_tab_key, arg1_function, arg2_optionsopt) → {Promise.<Object>}
Injects a script within the current tab. Note. Contexts are fully isolated when passing a function.
- Method of: Blacktraffic.AgentBrowserSelenium
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
arg0_tab_key |
|||||||||||
arg1_function |
function
|
||||||||||
arg2_options |
Object
|
<optional> |
|
Returns:
- Type:
-
Promise.<Object>
(async) injectScriptOnload(arg0_tab_key, arg1_function, arg2_optionsopt) → {Promise.<Object>}
Registers an onload script for future page visits using the mounted tab. Note. Contexts are fully isolated when passing a function.
- Method of: Blacktraffic.AgentBrowserSelenium
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
arg0_tab_key |
Object
|
string
|
||||||||||||||
arg1_function |
function
|
||||||||||||||
arg2_options |
Object
|
<optional> |
|
Returns:
- Type:
-
Promise.<Object>
(async) open() → {Promise.<Blacktraffic.AgentBrowserSelenium>}
Initialises a Firefox instance and connects Selenium.
- Method of: Blacktraffic.AgentBrowserSelenium
Returns:
- Type:
-
Promise.<Blacktraffic.AgentBrowserSelenium>
(async) openTab(arg0_tab_keyopt, arg1_url) → {Promise.<Object>}
Opens a tab at the corresponding URL. Corresponding URLs are optional.
- Method of: Blacktraffic.AgentBrowserSelenium
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
arg0_tab_key |
string
|
<optional> |
Object.generateRandomID(this.tab_obj) | |
arg1_url |
string
|
Returns:
- Type:
-
Promise.<Object>
(async) reloadTab(arg0_tab_key) → {Promise.<Object>}
Reloads the given tab.
- Method of: Blacktraffic.AgentBrowserSelenium
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_tab_key |
string
|
Returns:
- Type:
-
Promise.<Object>
(async) remove()
Removes the current Blacktraffic.AgentBrowser.
- Method of: Blacktraffic.AgentBrowserSelenium
(async) tabExists(arg0_tab_key, arg1_optionsopt) → {Promise.<boolean>}
Checks if a given tab exists.
- Method of: Blacktraffic.AgentBrowserSelenium
Parameters:
| Name | Type | Attributes | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
arg0_tab_key |
Object
|
string
|
||||||||||||
arg1_options |
Object
|
<optional> |
|
Returns:
- Type:
-
Promise.<boolean>
updateLogChannel(arg0_channel_key)
Updates the default logging channel for the current agent.
- Method of: Blacktraffic.AgentBrowserSelenium
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_channel_key |
string
|
(async) waitForStableSelector(arg0_tab_key, arg1_selector, arg2_intervalopt)
Waits for content to stop changing within a selector.
- Method of: Blacktraffic.AgentBrowserSelenium
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
arg0_tab_key |
Object
|
string
|
The given tab key. |
||
arg1_selector |
string
|
|||
arg2_interval |
number
|
<optional> |
3000 |