Reputation: 13
I have two personal laptops. Laptop A is the client from where I am running Selenium tests through Eclipse IDE. The tests are to be executed on Laptop B which runs the standalone server. Both laptops run Windows 10
To run Selenium Standalone server on Laptop B, I use the following command:-
java -jar selenium-server-standalone-3.141.59.jar -role standalone
The configuration steps I took:-
For Laptop B:
IPv4 Address: 192.168.1.9
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
For Laptop A:
IPv4 Address: 192.168.1.5
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
http://192.168.1.9:5555/console
@BeforeClass
annotated method like so:- @BeforeClass
public void beforeClass() throws MalformedURLException, InterruptedException {
FirefoxOptions firefoxOptions = new FirefoxOptions();
firefoxOptions.setCapability("browserName", "firefox");
firefoxOptions.setCapability("platformName", "WIN10");
firefoxOptions.setCapability("marionette", true);
webdriver = new RemoteWebDriver(new URL("http://192.168.1.9:5555"), firefoxOptions);
...
..
.
}
I get the following error while running Selenium Tests [the standalone server's console HTML page is returned in error response]:-
FAILED CONFIGURATION: @BeforeClass beforeClass
org.openqa.selenium.WebDriverException: Unable to parse remote response: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
...
Notes:-
I got the same error when I tried with different browsers/webdriver combinations as given below:-
While using ChromeDriver, I ensure the following are taken care of:-
a.On Laptop B, the selenium server jar and the webdriver [chromedriver] are kept in the same folder
b.I have included the path to this folder in the PATH system environment variable on Laptop B
c.TestNG annotated test class:-
@BeforeClass
public void beforeClass() throws MalformedURLException, InterruptedException {
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.setCapability("browserName", "chrome");
chromeOptions.setCapability("browserVersion", "81.x.x"); //76.x,80.x,81.x,83.x
chromeOptions.setCapability("platformName", "WIN10");
webdriver = new RemoteWebDriver(new URL("http://192.168.1.9:5555"), chromeOptions);
}
The end result is that the browsers are not invoked on laptop B and the tests not run
I searched the web (including Stackoverflow) but couldn't find a resolution to this error. Any inputs will be highly appreciated
Upvotes: 1
Views: 947
Reputation: 979
Please check the below for Selenium Grid configuration. It makes the procedure of configuring the selenium grid very easy and the part of this utility is it can increase and decrease the node automatically. If you face any issue while configuring the selenium grid then please drop me an email [email protected] I will love to solve that issue on screen share.
https://github.com/frostyaxe/Talongrid
Upvotes: 0
Reputation: 1
Looks like you have wrong remote URL. Let's try: http://192.168.1.9:5555/wd/hub
Upvotes: 0