Selenium/PhantomJS raises error

前端 未结 4 2132
谎友^
谎友^ 2020-12-15 10:55

I\'m trying to run PhantomJS driver in Python but I\'m getting error. I\'ve read that I should pass the whole path as an argument but it di

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-15 11:14

    Make the path in raw string, add 'r': 

    driver = webdriver.PhantomJS(executable_path=r'D:\Python\phantomjs-2.0.0-windows\bin\phantomjs.exe')
    

提交回复
热议问题