I want to run my WebDriver
test cases on Chrome
on remote Ubuntu
server. I have installed latest Chrome
on that server but I've been getting these errors,when I used this:
System.setProperty("webdriver.chrome.driver","/usr/bin/chromedriver");
driver = new ChromeDriver();
Error1:
The driver is not executable: /usr/bin/chromedriver
to correct I made it executable using sudo 777 chromedriver
then I got
Error2:
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
to fix this I updated selenium jar dependencies
to 2.40.0
and since then, I've been getting
Error3:
java.lang.NoClassDefFoundError: org/openqa/selenium/HasInputDevices
Query: Now I know that HasInputDevices
has been moved to org/openqa/selenium/Interactions/
then why it is still looking in old directory path org/openqa/selenium/HasInputDevices
. How to let it find at its actual directory.
1. I have updated dependencies.
2. I have tried to use mvn install
so that it download what is written in pom.xml
but it's looking in old directory.
How to resolve this error, I don't want to downgrade selenium APIs, because then Chrome exits unexpectedly.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…