I've been using Python's Selenium bindings with PyCharm CE for three years now and never had any problems with its functions.
But now I'm encountering a very weird error when trying to use find_element_by_link_text as in
browser.find_element_by_link_text("Administration").click()
The error reads as followed:
selenium.common.exceptions.JavascriptException: Message: javascript error: this.each is not a function
Other find_element_by functions work perfectly fine.
After updating all my packages including selenium to 4.0 I received this warning in addition to the above:
UserWarning: find_element_by_* commands are deprecated. Please use find_element() instead
warnings.warn("find_element_by_* commands are deprecated. Please use find_element() instead")
I downgraded selenium to 3.141.0 again, but then I just receive the this.eacherror again without any warnings.
I also tried other different approaches given by selenium.dev such as
browser.find_element(By.LINK_TEXT, value="Administration")
but they don't seem to work either.
What has changed? What do I have to change? Why do all other similar find_element functions like id/xpath/visible_text/etc. work? I'm at my wits' end, and I don't want to rewrite all my find_element_by_link_text calls. :(