pycharm reports error when running python script recorded by appium desktop: selenium.common.exceptions.InvalidSelectorException: Message: Locator Strategy 'css selector' is not supported for this session

The recorded python script can be run in python, but the error is reported in pycharm: selenium.common.exceptions.InvalidSelectorException: Message: Locator Strategy 'css selector' is not supported for this session.

 

 

 

Troubleshoot one:

Check whether the environment is configured correctly:

1. Click file—setting

 

 

 2. Click on the project you just started (I built pythondate1), click on project interpreter, check the project interpreter on the right, if not, press the setting button next to it or drop down to find Show All, add the program you want to run the script ;

3. Add the following packages in the project interpreter display box, add appium-python-client, you can execute after running python: pip install Appium-Python-Client, you can also add;

 

 

 4. Go to the implementation again, if you still get an error,

Troubleshooting question two:

1. Whether the script name and content conflict

 

 2. Is the appium in the script not selenium

 

 3. Run the script again (don't disconnect the connected App), the operation is successful.

 

Guess you like

Origin www.cnblogs.com/lilibar/p/12724555.html