Selenium Server ChromeDriver only supports Chrome version 80 - selenium-webdriver

I have Selenium Server 3.141.59 installed. I run it as a node via command
java -jar selenium-server-standalone-3.141.59.jar -role node -hub http://192.168.137.1:4444/grid/register/
Test code in Java creates WebDriver this way
System.setProperty("webdriver.chrome.driver", "chromedriver.exe"); // Path to version 88
this.driver = new RemoteWebDriver("http://127.0.0.1:4444/wd/hub");
Test ends up with error: SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 80
How can I force Selenium Server to use project local driver?
Current version of Chrome is 88.

Related

This site can't be reached error while trying to run selenium WebDriver script with selenium docker chrome node

I am trying to run selenium tests on docker with selenium docker chrome node. We are running this on windows 7. Since docker does not support windows 7, we are using vagrant to create linux box and then run selenium hub and selenium node/chrome using docker on the linux box.
When I try to run selenium script using below code, I get "This site can't be reached" error. However chrome session gets created successfully and driver launches the website. But the site displays error as "This site can't be reached"
ChromeOptions options = new ChromeOptions();
WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), options);
driver.manage().timeouts().implicitlyWait(90, TimeUnit.SECONDS);
driver.get("http://www.google.com");
My company is using proxy server. I have set the proxy settings in vagrant vm box and docker containers also. So when I use "curl www.google.com" on linux box and docker selenium containers,I get the response back successfully.
When I can launch the website successfully on containers and linux box, I am not sure why website is not rendered when launched through selenium WebDriver.
I have tried launching the WebDriver with proxy settings as below but same error is present
Proxy proxy = new Proxy();
proxy.setProxyType(Proxy.ProxyType.MANUAL)
proxy.setHttpProxy("<username>:<password>:<proxy_url>)
ChromeOptions options = new ChromeOptions();
options.setCapability("proxy", proxy);
WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), options);
driver.manage().timeouts().implicitlyWait(90, TimeUnit.SECONDS);
driver.get("http://www.google.com");

Get error org.openqa.selenium.firefox.NotConnectedException when running the selenium code

getting the below error
org.openqa.selenium.firefox.NotConnectedException
Firefox : 32.0
Eclipse : Version: Neon.1a Release (4.6.1)
Upgrade your firefox You need to install geckodriver from this link:
Gecko driver download from here
and then set the setProperty()
System.setProperty("webdriver.gecko.driver", "E:\\software and tools\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
If you are using selenium jar 2.53 and browser firefox 45.0, then no need to set gecko driver:
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");

unable to Launch Selenium Script in Grid

i have started selenium server hub by running command :
java -jar selenium-server-standalone-3.4.jar -port 4444 -role hub
i have also connected node by running the command : java -jar selenium-server-standalone-3.4.0.jar -role node -hub http://XXX.XXX.XXX.XXX:4444/grid/register/ -browser -browserName=firefox -port 5580
in grid console its showing v:null(don't know why?).
i am runing below code to run selenium :
public static void main(String[] args) throws MalformedURLException, InterruptedException{
String URL = "http://www.DemoQA.com";
String Node = "http://localhost:4444/wd/hub";
DesiredCapabilities cap = DesiredCapabilities.firefox();
cap.setBrowserName("firefox");
cap.setPlatform(Platform.WIN10);
driver = new RemoteWebDriver(new URL(Node), cap);
driver.navigate().to(URL);
Thread.sleep(5000);
driver.quit();
}
`
gettinf these errors, someone please help with these?.
many thanks in adc
Grid console shows no instance for Firefox is the issue you faced. There seems to be some issue with your node.
Check the node registration command.
java -jar selenium-server-standalone-3.4.0.jar -role node -hub http://XXX.XXX.XXX.XXX:4444/grid/register/ -browser browserName=firefox,platform=WINDOWS,maxInstances=2
Try removing the - before browserName in the command.
The error message Error forwarding the new session cannot find is the Grid's way of telling you that whatever you requested for, the hub couldn't find any node that supports that capability.
In your case, when you did this
DesiredCapabilities cap = DesiredCapabilities.firefox();
cap.setBrowserName("firefox");
cap.setPlatform(Platform.WIN10);
You are basically telling the hub that you need a node that can support a browser with its name as firefox and the node should be running on a Windows 10 Operating system.
But in your node starting command, you used this
java -jar selenium-server-standalone-3.4.0.jar -role node -hub http://XXX.XXX.XXX.XXX:4444/grid/register/ -browser -browserName=firefox -port 5580
which means you registered a node which supports firefox browsers, to the Hub, but you never mentioned anything about the platform. So the node assumes the platform to be "any".
Now when you created a new RemoteWebDriver instance, the Hub tried matching the requested capabilities with the available capabilities of every node. Since it didn't find any node that runs on Windows 10 and supports firefox (Remember you only have a node that supports firefox and whose platform is not set), the matching fails because "ANY" is not a match with "WIN10".
To fix the problem, please remove the line cap.setPlatform(Platform.WIN10); and try again.
PS :
The line DesiredCapabilities cap = DesiredCapabilities.firefox(); already figures out the browser name, so you don't need to explicitly set the browser name via cap.setBrowserName("firefox");

Which version of firefox is compatible with Selenium 3.3.1 without use of gecodriver

I want to run scripts on Firefox having selenium webdriver version installed as 3.3.1 but w/o any use of geco driver.
kindly help as I am working on client machine
No, you cannot work with Selenium 3.3.1 without using geckodriver.
Selenium 2.53 was the last version which worked without gecko driver with Mozila Firefox (till version 47.x)
To work with Selenium 3.3.1 you need to mandatory download gecko driver v0.15.0 from here and save it. Upgrade your Mozila Firefox to 53.x
Note that: For gecko driver v0.15.0 you must upgrade to Selenium 3.3 since this release aligns HTTP responses with the WebDriver standard.
Next you need to provide the absolute path of the gecko driver in your code. Your code will look like:
System.setProperty("webdriver.gecko.driver", "C:\\Utility\\BrowserDrivers\\geckodriver.exe");
FirefoxDriver driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.get("https://www.facebook.com/");
driver.findElement(By.name("email")).sendKeys("your_username");
Let me know if this answers your question.

WebDriverException: Message: Missing 'marionetteProtocol' field in handshake

I'm currently trying to run a robotframework test scripts locally (Ubuntu 12.04 LTS 64 bit). The issue that I faced was not able to launch FF browser in Open Browser. Below is the details/specs of the setup that I have.
Firefox (v26.0)
Selenium2Library
selenium-server-standalone-2.53.1.jar
geckodriver-v0.9.0
Please note that I used same machine as hub and node (selenium grid)
Here the command to launch my hub :
java -jar selenium-server-standalone-2.53.1.jar -role hub -port 4444
While here's the command to register my node :
java -jar selenium-server-standalone-2.53.1.jar -role node -hub http://localhost:4444/grid/register -trustAllSSLCertificates
I did what is per told in https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver (add wires executable in the PATH)
I also did :
${ff default caps} Evaluate sys.modules['selenium.webdriver'].common.desired_capabilities.DesiredCapabilities.FIREFOX sys,selenium.webdriver
Set To Dictionary ${ff default caps} marionette=${True}
Create Webdriver Firefox executable_path=\home\my\wires
Open Browser ${HOMEPAGE} ff None ${HUB}
As a result, the FF browser launch, but not opening the URL ${HOMEPAGE}. I've been googling around and stuck in this issue for so long. Please help..
https://github.com/mozilla/geckodriver/releases
firefox version is too low , update to 48 is OK
python 2.7
selenium 3.0.1
geckodriver v0.11.0.exe
firefox 48.0

Resources