我怎麼都找不到下手的命令行選項phantomjs像--cookies-file=/path/to/cookies.txt
等...如何在Selenium中使用命令行選項啓動PhantomJS?
嘗試driver = webdriver.PhantomJS('--cookies-file=/tmp/ph_cook.txt')
,但沒有。
未知原因add_cookie
不工作以保持記錄。
我試圖啓動phantomjs這樣的:
driver = webdriver.PhantomJS(executable_path = "phantomjs --cookies-file=/tmp/ph_cook.txt --webdriver")
,但得到的錯誤:
raise WebDriverException("Unable to start phantomjs with ghostdriver.", e)
selenium.common.exceptions.WebDriverException: Message: Unable to start phantomjs with ghost driver.
這是http://stackoverflow.com/q/17788223/3124333的副本嗎? – SiKing
@SiKing錯誤的語言,但我還沒有找到重複的。儘管如此。 –
@ArtjomB。這都是硒,語言綁定應該不重要? – SiKing