using selenium to start firefox suffer KeyError: 'sessionId' - python-3.x

When I'm using selenium to start firefox, it suffers such a problem. I just write a simple demo to test, by failed.

Have you tried to update your Selenium version to version 3.3.0 ?
I had the same problem as yours : changing the proxy settings as mentioned elsewhere did not work, but updating selenium was the solution.

Mac OS X Solution
If updating did not work for other people, i suggest looking at my answer Why doesn't Selenium's response have a sessionId?

Related

Selenium chromedriver is not working(Python)

I am trying to create a program to automate my Chrome browser. But the selenium chrome driver is not working. It opens up chrome for 1-2 seconds and then automatically canceled. Then it gives these errors.
You have a basic syntax problem.
Try this:
from selenium import webdriver
driver = webdriver.Chrome('D:\python projects\chromedriver.exe')
driver.get("https://www.youtube.com")
That error means your Chromdriver.exe is not updated based on your Google Chrom version.
In the error says your version of Google Chrome is 90.0.443.212.
Here: https://chromedriver.chromium.org/ you can download the chromedriver.exe
Download the chromdriver and then replace it, this should do the work.

Selenium does not load site at all

I can't load a site. Selenium starts when I run my code (aka the specified browser opens - in this case Firefox) but absolutely nothing happens! I just have a blank browser. My code is as follows:
from selenium import webdriver
driver = webdriver.Firefox()
driver.get('http://isol.alachuaclerk.org/RealEstate/SearchEntry.aspx')
I can load the site manually in Firefox but Selenium/geckodriver can't. What's going on?!
I still do not know what the issue is. Not really a fix but rolling back a few geckodriver versions solved this. Why the latest geckodriver doesn't load this site but an older version does is beyond me.

No configuration setting found for key 'wdm.geckoDriverVersion' - WebDriverManager

I'm using the webdrivermanager(Java) and I think is configured (pom.xml), because Chrome and IE are working. Only FireFox is showing this menssage "No configuration setting found for key 'wdm.geckoDriverVersion'"
*The exemple works to.
So, Boni or other member can help me with this problem?
Thanks.
EDIT:
I have this error only with PhantomJs and FireFox. The code is the same(examples git). First I thought that would be the POM but Chrome and IE are working. Thanks for your support.
https://i.stack.imgur.com/KJOnO.png
https://i.stack.imgur.com/at3qm.png
It seems that the library used by WebDriverManager for configuration (com.typesafe.config) is not able to find the properties file for some reason. As of WebDriverManager 1.5.0, this file name is webdrivermanager.properties.
In any case, I would use the latest version of WebDriverManager and try again.

Firefox is not loading the url

require 'watir-webdriver'
b=Watir::Browser.new
b.goto 'www.google.com'
I am writing the above code to open the google.com in firefox, but the problem is, control is not leaving the second line even after opening the firefox browser and later it throws the given below error, Can anyone suggest me how to overcome this problem?
/webdriver/firefox/launcher.rb:90:in `connect_until_stable': unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) (Selenium::WebDriver::Error::WebDriverError)
This pops up occasionally and it seems like one of the best options to start with is updating the selenium-webdriver gem. That did the trick for me.
gem update selenium-webdriver
I currently run with selenium-webdriver (2.53.4) with no issues.

Selenium on shared gui-less host

I need to run Selenium (or another webscraping tool that can handle javascript) on a remote linux host (Webfaction). I am using Python.
Is this possible? The server is gui-less so I can't run browsers. Or can I, if I use PyVirtualDisplay?
What about running Selenium with HtmlUnit?
I have tried using Selenium with Selenium/PyVirtualDisplay/ChromeDriver, but keep getting various error messages. So I'm wondering if this is even possible before I continue to debug something impossible.
If you need to handle JavaScript Selenium/Webdriver seems to be a good solution.
If you need to run headless, GhostDriver (instead of ChromeDriver) is an excellent alternative. It is based on PhantomJS, a headless browser based itself on Webkit. It has full JS-support.

Resources