我想在我的Rails項目中使用Linux上的selenium-webdriver。它在本地Mac上正常工作,但不在遠程服務器Amazon Linux上運行。如何在亞馬遜Linux上使用selenium和chrome驅動程序。錯誤:Selenium :: WebDriver :: Error :: UnknownError:未知錯誤:找不到Chrome二進制文件
這裏是機器信息
$ uname --all
Linux ip-172-31-21-116 4.4.10-22.54.amzn1.x86_64 #1 SMP Tue May 17 22:45:04 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
這是我得到了錯誤。
Selenium::WebDriver::Error::UnknownError: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.22.397932 (282ed7cf89cf0053b6542e0d0f039d4123bbb6ad),platform=Linux 4.4.10-22.54.amzn1.x86_64 x86_64)
我安裝了chromedriver並把/usr/local/bin
$ ls -al /usr/local/bin
-rwxrwxrwx 1 root root 5952376 Jun 4 12:54 chromedriver
這是我安裝 http://chromedriver.storage.googleapis.com/2.22/chromedriver_linux64.zip
請幫助我,讓我可以在我的Linux使用Selenium。謝謝
您是否嘗試過使用此寶石? https://github.com/flavorjones/chromedriver-helper –
@RogérioPeixoto感謝您的評論。我試過這個寶石,但它失敗了同樣的錯誤信息 –