Selenium UnreachableBrowserException - “Could not start a new session” in SoapUI Groovy TestStep

前端 未结 7 1004
终归单人心
终归单人心 2020-12-10 04:41

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

相关标签:
7条回答
  • 2020-12-10 04:53

    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

    0 讨论(0)
  • 2020-12-10 04:56

    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,

    • windows 7, ultimate, 64 bit system
    • selenium-server-standalone-2.47.1
    • chromedriver 2.19
    • google chrome: 45.0

    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!

    0 讨论(0)
  • 2020-12-10 04:56

    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.

    0 讨论(0)
  • 2020-12-10 05:04

    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/

    0 讨论(0)
  • 2020-12-10 05:12

    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

    0 讨论(0)
  • 2020-12-10 05:13

    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}");
    
    0 讨论(0)
提交回复
热议问题