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?