Documentation

Selenium
in package

Table of Contents

Constants

DEFAULT_DRIVER_URL  = "http://localhost:4444"
DEFAULT_TIKTOK_URL  = "https://www.tiktok.com/feedback/"
SPOOF_JS  = ["utils.js", "chrome.app.js", "chrome.csi.js", "chrome.loadtimes.js", "chrome.runtime.js", "iframe.contentWindow.js", "media.codecs.js", "navigator.hardwareConcurrency.js", "navigator.languages.js", "navigator.permissions.js", "navigator.plugins.js", "navigator.vendor.js", "navigator.webdriver.js", "webgl.vendor.js", "window.outerdimensions.js"]

Properties

$driver  : RemoteWebDriver

Methods

__construct()  : mixed
getDriver()  : RemoteWebDriver
getNavigator()  : object
getUserAgent()  : string
_buildSession()  : void
Build selenium session, executes only on first run.
_getSessions()  : array<string|int, mixed>
_spoof()  : void
_spoofUa()  : void

Constants

DEFAULT_DRIVER_URL

private mixed DEFAULT_DRIVER_URL = "http://localhost:4444"

DEFAULT_TIKTOK_URL

private mixed DEFAULT_TIKTOK_URL = "https://www.tiktok.com/feedback/"

SPOOF_JS

private mixed SPOOF_JS = ["utils.js", "chrome.app.js", "chrome.csi.js", "chrome.loadtimes.js", "chrome.runtime.js", "iframe.contentWindow.js", "media.codecs.js", "navigator.hardwareConcurrency.js", "navigator.languages.js", "navigator.permissions.js", "navigator.plugins.js", "navigator.vendor.js", "navigator.webdriver.js", "webgl.vendor.js", "window.outerdimensions.js"]

Properties

Methods

__construct()

public __construct(array<string|int, mixed> $config, Tokens $tokens) : mixed
Parameters
$config : array<string|int, mixed>
$tokens : Tokens

getDriver()

public getDriver() : RemoteWebDriver
Return values
RemoteWebDriver

getNavigator()

public getNavigator() : object
Return values
object

getUserAgent()

public getUserAgent() : string
Return values
string

_buildSession()

Build selenium session, executes only on first run.

private _buildSession(string $url, DesiredCapabilities $cap, Tokens $tokens) : void

Waits until window.byted_acrawler is available or timeout

Parameters
$url : string

Chromedriver url

$cap : DesiredCapabilities

Chrome's capabilities

$tokens : Tokens

_getSessions()

private _getSessions(string $url) : array<string|int, mixed>
Parameters
$url : string
Return values
array<string|int, mixed>

_spoof()

private _spoof(ChromeDevToolsDriver $devTools) : void
Parameters
$devTools : ChromeDevToolsDriver

_spoofUa()

private _spoofUa(ChromeDevToolsDriver $devTools) : void
Parameters
$devTools : ChromeDevToolsDriver

        
On this page

Search results