Subversion Repositories basico

Compare Revisions

Ignore whitespace Rev 142 → Rev 143

/branches/BR-0.3/basico/driver.py
15,7 → 15,9
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.firefox.options import Options
 
 
from .service import Service
 
GECKODRIVER_URL = "https://github.com/mozilla/geckodriver/releases/download/v0.15.0/geckodriver-v0.15.0-linux64.tar.gz"
44,9 → 46,12
 
if self.driver is None:
utils = self.get_service('Utils')
options = Options()
options.add_argument('--headless')
#~ driver = webdriver.Firefox()
FIREFOX_PROFILE_DIR = utils.get_firefox_profile_dir()
FIREFOX_PROFILE = webdriver.FirefoxProfile(FIREFOX_PROFILE_DIR)
driver = webdriver.Firefox(FIREFOX_PROFILE)
driver = webdriver.Firefox(firefox_profile=FIREFOX_PROFILE, firefox_options=options)
self.driver = driver
self.debug("Webdriver initialited")