-
Notifications
You must be signed in to change notification settings - Fork 33
Selenium 4.3.0 has deprecated find_element_by*()
methods
#104
Comments
See API docs here: https://www.selenium.dev/selenium/docs/api/py/index.html?highlight=find_element and the [SO post](https://stackoverflow.com/questions/72773206/selenium-python-attributeerror-webdriver-object-has-no-attribute-find-el) I'll have a quick look to see if there are any other changes. Attempts to address altair-viz#104
Yup. I got this too. File ~/.local/share/virtualenvs/news-homepages-Qlfa7zLV/lib/python3.9/site-packages/altair_saver/savers/_selenium.py:267, in SeleniumSaver._extract(self, fmt)
265 driver.get(url)
266 try:
--> 267 driver.find_element_by_id("vis")
268 except NoSuchElementException:
269 raise RuntimeError(f"Could not load {url}")
AttributeError: 'WebDriver' object has no attribute 'find_element_by_id' |
This error is now surfacing in Altair's unittests. |
This should (hopefully) fix the failing HTML & PDF exporter tests in `test_reports.py`. See altair-viz/altair_saver#104 and vega/altair#2624 Closes DEV-7078
This should (hopefully) fix the failing HTML & PDF exporter tests in `test_reports.py`. See altair-viz/altair_saver#104 and vega/altair#2624 Closes DEV-7078
This should (hopefully) fix the failing HTML & PDF exporter tests in `test_reports.py`. See altair-viz/altair_saver#104 and vega/altair#2624 Closes DEV-7078
This should (hopefully) fix the failing HTML & PDF exporter tests in `test_reports.py`. See altair-viz/altair_saver#104 and vega/altair#2624 Closes DEV-7078
Workaround: pip install selenium==4.2.0 |
thanks this fixed the issue with |
I'm encountering
I'm working inside a conda distribution so attempting to downgrade my selenium fails
How can I work around this? I have chrome 110 installed and the correct chromedriver for that version of chrome. ================= update: |
@soilstack Have you specified to use the |
Since Altair 5.2, the functionality of Altair Saver is now available in Altair via the vl-convert package. Most of the functionality has been available since 5.0, and the main addition in 5.2 was PDF export. See the docs on how to save charts for more details We are going to archive this repo, so I'm closing all the open issues and PRs before doing so. Try out the new options for saving charts mentioned above and if you run into issues, please open an issue directly in the altair or vl-convert repo. |
Hi,
Just filing this issue - doing
chart.save()
results in this error:The important bit is:
This seems to have shown up on StackOverflow as well and the fix seems relatively simple. Let me see if I can submit a PR with the fix.
The text was updated successfully, but these errors were encountered: