I have a code base which is deployed in a server where I don't have any access other than uploading war file. I have tested the application using apache tomcat 7 locally and it works perfectly.
I have a code in JAVA which triggers a remote web browser instance, it works perfectly when deployed locally but when I uploaded the war file to a server I get an exception as shown in the image below.
nodeIP = "10.52.239.111";
driver = new RemoteWebDriver(new URL(Node), capability);
Server in which the war has been deployed has an Ip address of "172.32.xxx.xxx"
I get an exception of org.openqa.selenium.UnsupportedCommandException I googled it and found some threads on where it is pointing and asking to change host files address and all. But I didn't understand how can I fix in my situation as Server configuration can't be controlled by me at all.
DesiredCapabilities capability = DesiredCapabilities.firefox();
capability.setBrowserName("firefox");
FirefoxProfile fp = new FirefoxProfile();
fp.setPreference("browser.private.browsing.autostart", true);
//fp.setPreference(FirefoxProfile.ALLOWED_HOSTS_PREFERENCE, "localhost,localhost.localdomain");
String Node = "http://" + nodeIP + ":5556/wd/hub";
try {
driver = new RemoteWebDriver(new URL(Node), capability);
driver.manage().window().maximize();
} catch (Exception e) {
e.printStackTrace();
}