Robotframework-----The second time the case is executed, the Log window does not display data

Source: Internet
Author: User

The second time the case is executed, the Log window does not display data, such as

Cause: When the case runs, the IEDriverServer.exe or Chromedriver.exe process is still running after you run it using IE or the Chrome browser.

Solution:

Method one: In Task Manager, end the post IEDriverServer.exe or chromedriver.exe process

Method Two:

Save the following code as a batch and run it manually after each run:

taskkill/f/im Chromedriver.exe

taskkill/f/im IEDriverServer.exe

Method Three: Encapsulation into keywords

Step1:

def close_process (self, process_name):
"" "Close a process by process name." "
If Process_name[-4:].lower ()! = ". exe":
Process_name + = ". exe"
Os.system ("taskkill/f/im" + process_name)

Step2:

Save the above file to the Py file, then reference it in ride and create the keyword

Teardown
Close Process Chromedriver #谷歌

Close Process Iedriverserver #IE

Step3:

Add teardown to test setting:

Settings * * *
Test Teardown Teardown

Robotframework-----The second time the case is executed, the Log window does not display data

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.