Selenium2+python Automatic 68-html report garbled problem

Source: Internet
Author: User
Python2 use Htmltestrunner to generate test reports, there will be garbled language output, the main encoding format is not uniform, change the encoding format on the line.

: http://tungwaiyip.info/software/HTMLTestRunner.html

First, Chinese garbled

1. In the test report, MSG custom exception content is garbled in Chinese, as shown in

Second, modify the code

1. Locate htmltestrunner.py file, search: UO =

2. Find the two places in the Red locale encoding

3. Comment out the red area two settings, re-add the encoding format: UO = O.decode (' utf-8 ') UE = E.decode (' Utf-8 ')

4. After the modification, remember to save, re-run, garbled problem solved

Iii. Python3 Reporting Issues

1.python3 's small partner directly with this: http://tungwaiyip.info/software/HTMLTestRunner.html files, is not directly generated reports, need to be slightly modified

2. The modified source files have been packaged and put into QQ group files: 646645429

Selenium2+python Automatic 68-html report garbled problem

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.