Skip to content

Instantly share code, notes, and snippets.

@NaelsonDouglas
Last active October 31, 2023 03:12
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 NaelsonDouglas/3a260c078adb78bb3b4fc6bf42ee2650 to your computer and use it in GitHub Desktop.
Save NaelsonDouglas/3a260c078adb78bb3b4fc6bf42ee2650 to your computer and use it in GitHub Desktop.
from selenium import webdriver
from selenium.webdriver.firefox.options import Options as FirefoxOptions
options = FirefoxOptions()
options = webdriver.FirefoxOptions()
options.set_capability('browserName', 'firefox')
options.set_capability('browserVersion', '117.0') #
#options.set_capability('selenoid:options', {'enableVideo': True}) # Faz com que a execução seja gravada em ~/.aerokube/selenoid/video
options.set_capability('selenoid:options', {'enableVNC': True}) # Permite ver o webdriver em tempo real pela web-ui
driver = webdriver.Remote(command_executor='http://localhost:4444/wd/hub',options=options)
driver.implicitly_wait(0.8)
driver.get('http:\\www.google.com')
print(driver.title)
driver.close()
@NaelsonDouglas
Copy link
Author

Veja que o webdriver é da classe 'webdriver.Remote'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment