2016-06-04 8 views
1
OS:4.4.10-22.54.amzn1.x86_64 GNU/Linux 

, wenn ich Google-Chrom geben, es zeigt einen Fehler [14033:14033:0604/061453:ERROR:browser_main_loop.cc(271)] Gtk: can not open display:Google Chrome läuft nicht auf 4.4.10-22.54.amzn1.x86_64 GNU/Linux

I Chrom installiert haben Browser mit folgendem Befehl

sudo yum -y install google-chrome-stable –skip-broken 

Daher, auch wenn ich meinen Selen Test ausführen, es zeigt, wie

org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally 
    [testng] (Driver info: chromedriver=2.2,platform=Linux 4.4.10-22.54.amzn1.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information) 
    [testng] Command duration or timeout: 21.07 seconds 

Hat jemand eine Idee, was ich falsch mache?

+0

Ich konnte dieses Problem nicht lösen, Glück hier? Ich habe versucht Xvfb Einstellung 'Export DISPLAY =: 1' und' Xvfb: 1 Bildschirm 1024x768x240 + Ausdruck RANDR & '... Nichts hat funktioniert. – Dineshmohan

Antwort

0

Gtk + Abhängigkeiten müssen ebenfalls installiert werden. Folgen Sie diesem Blogpost, um das zu lösen. https://gist.github.com/joekiller/4144838

Und auch dies: http://itsallabtamil.blogspot.com/2013/02/setting-up-chrome-firefox-ec2-selenium-java.html

Gelöst: Versuchen Sie diese Schritt für Schritt yum install libgcrypt-devel wget http://dl.fedoraproject.org/pub/archive/fedora/linux/updates/15/x86_64/libstdc++-4.6.3-2.fc15.x86_64.rpm wget http://dl.fedoraproject.org/pub/archive/fedora/linux/updates/15/x86_64/libstdc++-devel-4.6.3-2.fc15.x86_64.rpm wget http://dl.fedoraproject.org/pub/archive/fedora/linux/updates/15/x86_64/cpp-4.6.3-2.fc15.x86_64.rpm wget http://dl.fedoraproject.org/pub/archive/fedora/linux/updates/15/x86_64/gcc-4.6.3-2.fc15.x86_64.rpm wget http://dl.fedoraproject.org/pub/archive/fedora/linux/updates/15/x86_64/gcc-c++-4.6.3-2.fc15.x86_64.rpmsudo rpm -Uvh libstdc++-devel-4.6.3-2.fc15.x86_64.rpm cpp-4.6.3-2.fc15.x86_64.rpm gcc-4.6.3-2.fc15.x86_64.rpm gcc-c++-4.6.3-2.fc15.x86_64.rpm

sudo yum remove google-chrome wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm sudo yum install ./google-chrome-stable_current_*.rpm google-chrome &

Nun endlich Ihre Selen Tests starten.

Verwandte Themen