Cannot access/initialize Chrome Browser in SeleniumWebdriver

Answered

I have written few test scripts and executed using Firefox driver.. Also I was able to access Chrome in my previous version of Ubuntu which was 12.04.. Now I’ve installed Ubuntu 14.04 and when I run the following script

package practice;

import org.testng.annotations.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class dynamicPractice {
@Test
public void dynamicpractice() {
System.setProperty(“webdriver.chrome.driver”, “data/chromedriver”);
WebDriver driver = new ChromeDriver();
driver.get(“http://www.toolsqa.com/automation-practice-table/”);
}
}

I get the following error:

/home/practice/data/chromedriver: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
org.openqa.selenium.os.UnixProcess checkForError

Any help is greatly appreciated.. Thanks in advance..

Train Asked on October 14, 2015 in Selenium WebDriver.
Add Comment
  • 1 Answer(s)
    Best answer

    Sorry for the inconvenience.. Now I’m able to access it.. I was using the wrong version of chrome driver 32 bit instead of 64 bit..

    Train Answered on October 14, 2015.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.