watsonx.ai

watsonx.ai

A one-stop, integrated, end- to-end AI development studio

 View Only

Help: How to Execute GeckoDriver with Selenium in Python Notebook?

  • 1.  Help: How to Execute GeckoDriver with Selenium in Python Notebook?

    Posted Tue April 28, 2020 10:24 AM
    In a notebook cell, I installed GeckoDriver with the following terminal command: 
    !conda install -c conda-forge geckodriver​

    and found its directory in path using the following terminal command: 
    !ls /path/to/{$PATH}

    When trying to initialise a Firefox session with Selenium as below: 
    from selenium import webdriver
    
    driver = webdriver.Firefox(executable_path, options)

    such that 
    executable_path = '/path/to/geckodriver/dir/geckodriver'
    options = var webdriver.FirefoxOptions()


    These are the same codes I use when working locally (MacOS Catalina) and performed just fine. 

    However, on the cloud of Watson Studio, the kernel was interrupted with the following error: 

    Unable to find a matching set of capabilities


    How shall I proceed to resolve the issue? 



    ------------------------------
    Azhar
    Data Scientist, Trainee
    CADS (Malaysia)
    ------------------------------

    #WatsonStudio