0

I am working with Selenium Java for Automation and I am using

String Node = "http://" + nodeIP + ":5557/wd/hub";
driver = new RemoteWebDriver(new URL(Node), cap);

to get a new client browser instance but I get an exception as mentioned below

org.openqa.selenium.UnsupportedCommandException chrome
org.openqa.selenium.UnsupportedCommandException: 

The requested URL could not be retrieved
SAP Cloud Services Infrastructure Management

Is there by any means do we have any flags which can't correct these ? I mean from Java program can we set and avoid this exception ? If so how do we set them for Chrome or IE ?

Santhosh_Reddy
  • 274
  • 4
  • 18

1 Answers1

0

UnsupportedCommandException is mostly due to host file issues. You may have to look at https://code.google.com/p/selenium/issues/detail?id=3280 .

Most generic solution can be found here.

Community
  • 1
  • 1
ArunPrakash
  • 138
  • 1
  • 7
  • is there a way we can set these from Java Code. I am wondering if there is any way from which we can set these right I mean for a chrome browser or IE. – Santhosh_Reddy Feb 09 '16 at 10:31
  • You can as profile.setPreference(FirefoxProfile.ALLOWED_HOSTS_PREFERENCE, "alias1,alias2"); Please see https://code.google.com/p/selenium/issues/detail?id=3280#c20 – ArunPrakash Feb 09 '16 at 12:47
  • above link is broken and redirects to a page which doesn't exist. I am not aware of what exactly to use in the parameters alias1, alias 2. If you can let me know a bit in detail pls – Santhosh_Reddy Feb 10 '16 at 03:50