Skip to content

Instantly share code, notes, and snippets.

@mattonem
Created March 15, 2022 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattonem/24ac7c1a5d3c1c9d1206fac7783bef45 to your computer and use it in GitHub Desktop.
Save mattonem/24ac7c1a5d3c1c9d1206fac7783bef45 to your computer and use it in GitHub Desktop.
from selenium import webdriver
from time import sleep
import logging, requests, timeit
desired_cap = {
"browser" : "Chrome",
"browser_version" : "latest",
"browserstack.local" : "false",
"browserstack.selenium_version" : "3.141.59"
}
driver = webdriver.Remote(desired_capabilities = desired_cap, command_executor = 'https://USERNAME:PASSWORD@hub-cloud.browserstack.com/wd/hub', keep_alive = True)
driver.get("https://abc.xyz")
driver.title
logs = driver.get_log('driver')
print(logs)
driver.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment