Kalebu / alright

Python wrapper for WhatsApp web-based on selenium
https://www.youtube.com/watch?v=yitQTt-NukM
MIT License
355 stars 109 forks source link

find_element_by_xpath has been removed from selenium #102

Closed leggewie closed 1 year ago

leggewie commented 1 year ago

find_elementsby* methods have been removed from selenium 4.3.0. find_by_username now fails.

>>> messenger.find_by_username("NEO")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/leggewie/bin/alright/lib/python3.10/site-packages/alright/__init__.py", line 166, in find_by_username
    opened_chat = self.browser.find_elements_by_xpath(
AttributeError: 'WebDriver' object has no attribute 'find_elements_by_xpath'

You should use the find_element method instead now.

leggewie commented 1 year ago

I thought I was running the latest code via a pip install. But it seems like that is not the case. Code inspections suggests this problem was fixed in commit bff87c9b85c66e0917. Time to make another release to pypi.org?

I checked the output of "git tag" and found it hard or rather impossible to understand what code corresponds to what release. I guess it doesn't help if you bump version information in setup.py in a completely unrelated commit such as 1b0b58c4cd299c57edf14.

Kalebu commented 1 year ago

Hi @leggewie

Sure, The latest release was July last year, I guess it is time to make another one and push it to PyPI[ON IT ]

Kalebu commented 1 year ago

I have already published a new release to pypi with new changes update

I will mark this issue as resolved

leggewie commented 1 year ago

Thanks, much appreciated!