Can anyone help me with the command to install selenium 4 for python
Please run the following command on the terminal:
pip install selenium==4.0.0.a7
Since the latest alpha release of Selenium 4 was Alpha 7 (4.0.0.a7)
However, you might face an error if you are using the latest Python 3.9.
Here, the installation of Selenium 4.0.0.a7 on Windows is dependent on MS C++ Build Tools. So, you need to upgrade the setuptools package by running the following command on the terminal:
pip install --upgrade setuptools
Then, install C++ Build Tools for Visual Studio 2019, post which install Selenium 4.0.0.a7 again.
Hope this helps!