Last active
March 1, 2020 22:07
-
-
Save aoirint/cf25ad4c15d1f27b069f5ac5f8e4589c to your computer and use it in GitHub Desktop.
Initialize selenium Remote WebDriver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from selenium import webdriver | |
from selenium.common.exceptions import NoSuchElementException | |
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities | |
REMOTE_DRIVER = os.environ['REMOTE_DRIVER'] | |
driver = webdriver.Remote( | |
command_executor=REMOTE_DRIVER, | |
desired_capabilities=DesiredCapabilities.CHROME, | |
) | |
driver.get('http://example.com') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment