selenium grid 3.141.59 Webdriver Launching Issue

140 views
Skip to first unread message

Aamir Saleem

unread,
Apr 22, 2020, 1:55:03 PM4/22/20
to Selenium Users
Hi All

I have run the selenium grid 3.141.59 hub and node successfully, node is connected to hub but when I run the following code, it's not launching the chrome browser, and an error displayed in console 

Exception in thread "main" org.openqa.selenium.WebDriverException: Unable to parse remote response: <!DOCTYPE html>

help needed :/

package grid;
import java.io.File;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;

public class gridChorme {

static WebDriver driver;
static String hubURL;

public static void main(String[] args) throws Throwable {

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setBrowserName("chorme");
capabilities.setPlatform(Platform.WIN10);

ChromeOptions options = new ChromeOptions();
options.merge(capabilities);

driver = new RemoteWebDriver(new URL(hubURL), options);
driver.manage().deleteAllCookies();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.manage().window().maximize();

driver.get("https://www.google.com/");
driver.findElement(By.name("q")).sendKeys("Love");
driver.findElement(By.xpath("//div[@class='FPdoLc tfB0Bf']//input[@name='btnK']")).click();
driver.close();

}

}

⇜Krishnan Mahadevan⇝

unread,
Apr 22, 2020, 1:58:04 PM4/22/20
to Selenium Users
Should the URL be hubURL = "http://192.168.10.3:4444/wd/hub"; (Notice how we are using wd instead of wb)

instead of it reading as hubURL = "http://192.168.10.3:4444/wb/hub";

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4e7ae621-f265-45ff-b761-c48e8847fb19%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages