I use SoapUI Pro 5.1.2 on Win7 x32, and try to connect to Selenium Webdriver in Groovy TestStep.
For this purpose I added selenium-standalone-server.jar
If someone encountered a similar problem on Ubuntu, please check if you install Chromium web browser
Not enough to have only chrome browser.
More details
I have encountered the same error, which said:
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
but chromedriver.exe
started fine. I can see it in task manager.
My environment is as following,
After many tries suggested in google results, my final solution is to add 127.0.0.1 localhost
to C:\Windows\System32\drivers\etc\hosts
.
Hope to help you!
Download latest driver(chrome or IE) from seleniumhq.org, and use below code
System.setProperty("webdriver.chrome.driver","<YourPath>chromedriver.exe");
WebDriver driver=new ChromeDriver();
driver.get("http://www.yahoo.com");
This worked for me.
This could be a compatibility issue between the 'selenium', 'chrome browser version' and 'chrome driver' version that you are using.
It you are using Selenium 2.53 (like me), then using chrome driver 2.25 should work for you.
You can download it from here - https://chromedriver.storage.googleapis.com/index.html?path=2.25/
It already told you what happened:
//got 'C:**\\**Windows\system32\chromedriver.exe'
Try to define path using one of the next ways:
System.setProperty('webdriver.chrome.driver','C:\\Windows\\system32\\chromedriver.exe')
log.info(System.getProperty('webdriver.chrome.driver'))
OR
System.setProperty('webdriver.chrome.driver','C:/Windows/system32/chromedriver.exe')
log.info(System.getProperty('webdriver.chrome.driver'))
Also, I would not recommend you to store chromedriver.exe in system32 folder, especially if you don't have admin rights on the workstation. Use smt like C:/WebDrivers/hromedriver.exe
I encountered the same issue and upgrading to the latest chrome driver fixed my issue.
You can download the latest chrome driver from following URL.
http://chromedriver.storage.googleapis.com/index.html
It is best to use always the latest version. After downloading, set the path of chrome driver in System.setProperty("webdriver.chrome.driver","{Your path Chrome Driver}");
System.out.println("Creating Chrome Driver");
// Set Chrome Driver
System.setProperty("webdriver.chrome.driver", "D:\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("{Your URL}");