WebDriverException: Forwarding error of a new session cannot be found: {platform = WINDOWS, browserName = FIREFOX, version = 3.6}

I am new to the Selenium Web driver, as well as to Grid 2.

I try to run a test case, but it gives me the exception "Exception in the thread" main "org.openqa.selenium.WebDriverException: Error sending a new session cannot find: {platform = WINDOWS, browserName = FIREFOX, version = 3.6}"

I started using node and hub using java -jar selenium-server-standalone-2.29.0.jar -role hub command

java -jar selenium-server-standalone-2.29.0.jar -role node -hub% grid register%

Both teams work fine.

I'm not sure when and where I need to use the command line -browser browserName = firefox, version = 3.6, maxInstances = 5, platform = WINDOWS

(Tried to configure node on the official Grid 2 page

Is it because of this? Any help would be greatly appreciated.

Here is my code:

package test; import java.net.URL; import java.net.MalformedURLException; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.WebDriverBackedSelenium; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver; public class Test { public static void main(String[] args) throws MalformedURLException { DesiredCapabilities capability = DesiredCapabilities.firefox(); capability.setBrowserName("FIREFOX"); capability.setPlatform(org.openqa.selenium.Platform.WINDOWS); capability.setVersion("3.6"); // capability.setCapability(""); WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), capability); //WebDriver driver = new FirefoxDriver(); driver.get("http://www.google.com"); } } 
+5
source share
5 answers

To register Node, with a specific browser configuration u, you must use the following line from the command line:

java -jar selenium-server-standalone-2.32.0.jar -role node-hub http://xxx.xxx.xxx.xxx:4444/grid/register -browser browserName = firefly

Replace xxx with the actual IP address

+2
source

I think this is due to the possibility of .setBrowserName ("FIREFOX");

should be function.setBrowserName ("firefox");

Hope this helps.

+1
source

I also ran into the same problem. It was resolved, the problem was in port 4444. which was blocked. Therefore, creating a global IP address for my system and resolving port 4444 worked for me.

0
source

If you are doing a parallel test. Increase the number of threads and increase the memory of the hub

 cat /proc/sys/kernel/threads-max echo 100000 > /proc/sys/kernel/threads-max 
0
source

This is probably exactly what he says: the hub / selenium cannot find a match for the requested capabilities.

I had this problem and an error was received (after formatting):

 java.lang.RuntimeException : org.openqa.selenium.WebDriverException : Error forwarding the new session cannot find : Capabilities[{ proxy = { proxyAutoconfigUrl = null, socksUsername = null, socksPassword = null, autodetect = false, httpProxy = xxxxxxxxxxxx.com : 8080, proxyType = MANUAL, noProxy = xxxxxxxxxxxxx.net, ftpProxy = null, hCode = 1273131486, socksProxy = null, class = org.openqa.selenium.Proxy, sslProxy = xxxxxxxxxxxxxx.com : 8080 }, loggingPrefs = org.openqa.selenium.logging.LoggingPreferences @ 3564e4e9, browserName = MicrosoftEdge, type = regular, version = , platform = ANY } ] 

It turns out that my employees added a new parameter to the capabilities ("type"), and I did not update my .json file, which my Selenium node sets up.

0
source

All Articles