2

I want to launch Google chrome on server without using ChromeDriver.exe Currently trying with RemoteWebDriver , but getting below error

Code I am trying:

public class DEMO {
   public static void main(String[] args) throws MalformedURLException {
    // create a Chrome Web Driver
       URL local = new URL("http://localhost:8080");
       WebDriver driver = new RemoteWebDriver(local, DesiredCapabilities.chrome());
       // open the browser and go to open google.com
       driver.get("https://www.google.com"); 


       driver.manage().window().maximize();
   }

Error :

Exception in thread "main" org.openqa.selenium.UnsupportedCommandException: <html><head><title>Apache Tomcat/7.0.47 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /session</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/session</u></p><p><b>description</b> <u>The requested resource is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.47</h3></body></html>
Command duration or timeout: 333 milliseconds
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:01:03'
Suyash
  • 37
  • 6

1 Answers1

2

Any operation with Chrome should eventually be passed through chromedriver (.exe for Windows OS). This is a basic conception of Selenium / WebDriver. Will it be a remote call or local call.

Alexey R.
  • 8,057
  • 2
  • 11
  • 27