I'am trying to run a simple code from hub to node, hub and node connections are successful.
While executing the program I am getting the exception
org.openqa.selenium.SessionNotCreatedException
Chrome driver path which I have mentioned is a share path that can be accessible from the node machine.
- Chrome Version: 58.0.3029.110
- Chrome Driver Version: 2.9
Both Hub and Node are remote machines.
Below is the code used:
public static void main(String[] args) throws MalformedURLException {
WebDriver driver;
System.setProperty("webdriver.chrome.driver", "Q:\xxxxx\chromedriver.exe");
DesiredCapabilities dc = new DesiredCapabilities();
dc.setBrowserName("chrome");
dc.setPlatform(Platform.VISTA);
driver = new RemoteWebDriver(new URL("http://10.xx.xxx.xx:5566/wd/hub"), dc); //node url
driver.get("https://www.google.com");
}
Below is the console message:
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{browserName=chrome, platform=VISTA}], required capabilities = Capabilities [{}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'A5DAFC-W7A-0012', ip: '10.xx.xxx.xx', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_131'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:91)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:155)
at testcases.Grid.main(Grid.java:23)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…