Python3 Selenium automated web testing ==> FAQ: PyCharm script does not execute main functions Content Solutions

FAQ:

Scenario: Before you can write python scripts normal execution of the code in the main function does not suddenly run

 

Reason: PyCharm in accordance with the script sets py unittest manner, is operated with only the cases, the code is not running under the main function

 

solution:

 

step1: Press alt + shift + F10 or click the button screenshot


 

step2: select Edit Structure


 

step3: will not want to run in accordance with unitest mode use cases "-" out to


 

step4: Click Save


 

step5: run -> run embodiment can be operated with

 

Guess you like

Origin www.cnblogs.com/wuzhiming/p/11330587.html