class TiktokPassport::Marionette
- TiktokPassport::Marionette
- Reference
- Object
Defined in:
tiktok_passport/marionette.crtiktok_passport/marionette/exceptions.cr
tiktok_passport/marionette/javascript.cr
tiktok_passport/marionette/pool.cr
tiktok_passport/marionette/session.cr
tiktok_passport/marionette/types/navigator_info.cr
tiktok_passport/marionette/user_agent_parser.cr
Constant Summary
-
CHROME_CAPABILITIES =
Selenium::Chrome::Capabilities.new.tap do |conf| conf.chrome_options.args = ["--headless", "--disable-blink-features=AutomationControlled", "--disable-infobars", "--window-size=1920,1080", "--start-maximized"] conf.chrome_options.exclude_switches = ["enable-automation"] end
-
The remote browser desired capabilities.
-
SCRIPTS_TO_EXECUTE_ON_PAGE_LOAD =
begin buffer = uninitialized ::StaticArray(String, 16) {% for key, index in ["/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/utils.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/chrome.app.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/chrome.csi.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/chrome.loadTimes.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/chrome.runtime.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/iframe.contentWindow.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/media.codecs.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/navigator.hardwareConcurrency.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/navigator.languages.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/navigator.permissions.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/navigator.plugins.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/navigator.vendor.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/navigator.webdriver.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/webgl.vendor.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/evasions/window.outerdimensions.js", "/srv/crystaldoc.info/github-lucasintel-tiktok-passport-v0.3.0/src/tiktok_passport/marionette/javascript/signer.js"] %} {% if env("MINIFY_JS") %} buffer[{{ index }}] = {{ (`uglifyjs --validate #{key}`).stringify }} {% else %} buffer[{{ index }}] = {{ read_file(key) }} {% end %} {% end %} buffer end
-
An array of javascript fucntions to execute on page load.
Constructors
Instance Method Summary
-
#evaluate(script, args = [] of String)
Evaluates a script and wait for the response.
-
#evaluate_cdp(command, params = {} of String => String)
Evaluates a CDP (Selenium Chrome DevTools Protocol) command.
-
#id : String
Returns the current selenium session id.
-
#navigate_to(url)
Navigates to the given URL.
-
#screenshot(path)
Takes a screenshot of the current page.
-
#stop
Terminates the current selenium session.
-
#user_agent : String
Returns the navigator user agent.
-
#user_agent=(desired_user_agent)
Overrides the navigator user agent.
Constructor Detail
Instance Method Detail
Evaluates a script and wait for the response.
Evaluates a CDP (Selenium Chrome DevTools Protocol) command.