Tag Archives: Pycharm Element Locate Error

[Solved] Pycharm Element Locate Error: DeprecationWarning: find_element_by_* commands are deprecated.

Using find_element_by_id() in pycharm element error: deprecationwarning: find_element_by_* commands are deprecated.

Reason: Selenium uses version 4.0
Solution: instead of using version 4.0, use version 3.3.1.

How to Solve:
1. Uninstall selenium 4.0. Run CMD as an administrator, enter PIP uninstall selenium, and then enter y to confirm the deletion of selenium 4.0. After the deletion is successful, enter PIP install selenium = = 3.3.1 to specify the installation of version 3.3.1. Confirm that the installation is successful.

2. Delete selenium in pycharm. Open pycharm, select file, and then click settings.

3. Find selenium 4.0 and delete it. Select Python interpreter in settings, select selenium, and click the “-” sign to remove selenium.

4. Install selenium 3.3.1. Click the “+” sign, then enter selenium, search for selenium, check specify version, then select 3.3.1, then click Install Package, and wait for the installation to succeed.