Python+selenium webdriver Automation Test (i)

Source: Internet
Author: User

As a just contact with Python, the first time programming, the first attempt to do an automated slag, to witness their progress, perhaps every step for others, but for their own, is countless times to take a step forward, very laborious, but also very gratified. Nonsense not much to say, into the subject.

I use Python+selenium webdriver to build an automated framework, for the Python language, unfamiliar, just a cursory look at the book, do not know what to make, and do not know how to make, consult Daniel, directly on the road, do not tangle, actual combat can learn more. Recommend a book, the Zerg "selenium webdriver (Python) Third Edition", Lead me to get started, you can simply write through an automated use case.

The details are not to repeat, to talk about the problems you encountered

The first question is a total headache. Chinese code. I'm using the Pycharm editor, plus #coding=utf8 also useless, various crashes, trying to set the encoding in Pycharm to UTF8 (file---and setting-to-file encoding), when trying to create a new py file, Automatically add encoded conversion statements (file--defualt setting--------and inspections------Encoding specified for file--and Settings UTF8 ), try the above two ways, still can't solve, crash cure happened to see a post, said #coding = UTF8 This sentence must be written in the first line, after the test, sure enough success!! It seems that Python's use is poor ~ later to strengthen Python.

Encoding conversion, be sure to write in the first line!!! Head Write!!! First line!! More important things to say a few times ~

At this point, continue to ~

I also thought, good study of Python, learning almost in the hands of automation, the results Daniel told me, you just do it, do it will be ~ This is the legendary gig ~ haha

Python+selenium webdriver Automation Test (i)

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.