ericmckean / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

In Selenium Grid the Chrome Browser opens up but didnt load the required URL #1033

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
package SeleniumGrid;

import java.net.MalformedURLException;

import org.openqa.selenium.remote.DesiredCapabilities;

import java.net.URL;

import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.firefox.FirefoxDriver;

/*     ????????????????????????????   Use This code for multiple browser in 
same system   ????????????????????????????                */

public class grid {

    public static void main(String[] args) throws MalformedURLException, InterruptedException
    {  
          System.setProperty("webdriver.chrome.driver","C:\\chromedriver.exe");

          WebDriver driver =new ChromeDriver();

          DesiredCapabilities cape=DesiredCapabilities.chrome();
          cape.setBrowserName("chrome");
          cape.setPlatform(Platform.WINDOWS);
          driver=new RemoteWebDriver(new   URL("http://192.168.10.108:5566/wd/hub"),cape);

          driver.get("http://www.google.com/xhtml");

    }

}

Original issue reported on code.google.com by ashish.p...@osscube.com on 12 Feb 2015 at 6:40

GoogleCodeExporter commented 9 years ago
your codes may not be correct 

1. 
 no need 
System.setProperty("webdriver.chrome.driver","C:\\chromedriver.exe");
WebDriver driver =new ChromeDriver();

driver come from
 driver=new RemoteWebDriver(new   URL("http://192.168.10.108:5566/wd/hub"),cape);

2. you port 5566 could be wrong
   check the hub , what port is  listening.

Original comment by andrewch...@chromium.org on 12 Feb 2015 at 7:07

GoogleCodeExporter commented 9 years ago
there is no issue of Path , when i m executing the same code in webdriver its 
working fine , but when adding the code of Desire Capability then it just load 
the browser but not the url. 
im using Chrome browser version: 40.0.2214.111
Selenium standalone server :2.44 
Latest Chrome driver with correct path 

Original comment by ashish.p...@osscube.com on 13 Feb 2015 at 4:13

GoogleCodeExporter commented 9 years ago
can you show me the current codes? 
grid load the chromedriver,  not your application

Original comment by andrewch...@chromium.org on 17 Feb 2015 at 7:37

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:18

GoogleCodeExporter commented 9 years ago

Original comment by gmanikp...@chromium.org on 2 Apr 2015 at 7:36