Python+selenium, how to design the login module as a public module?

Source: Internet
Author: User

Weekend again, good fun, and can rest for two days! Recently are busy to buy computer things, here to tell you, try not to buy HP's computer, I bought less than a year, now basically is a scrap of iron. Heartache My Money money!

Recently, several test partners asked me, said that they use Python+selenium began to write the login and registration module code, and later prepared to write other modules, found that many modules are first logged in to execute, so ask me, if each module to write in the login,

It's not too much trouble, it should be possible to write a public module. The answer is yes. But whether this public module is the implementation of the login is successful it is OK? Here's how my code is written, such as:

What we need to note here is that we also need to use Driver (webdriver) when we are in other modules. Chrome ()), some small partners add this driver directly in other modules, so execution fails,

Here we just need to login to the module, the "Driver" returnt out of the good. Actually, it's very simple.

More information or software downloads can follow my blog or join the following groups, qq:511213522

We exchange software tests together and progress together.

Python+selenium, how to design the login module as a public module?

Related Article

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.