First of all, I did not use this script malicious collection of worry-free money, do not seal my account ah, oh, I remember to find a oschina in the past to get a worry-free money script, but it is said to have been lovelorn, recently read a bit about selenium book, this thing is to do web testing, It is said to be very bad, so Balabala looked at a point, and then try to write a script to see if you can automatically receive the worry-free currency, hehe 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0015.gif "alt= "J_0015.gif"/>, I hereby show that the second script is only learning to use, we do not maliciously collect worry-free coins OH:
The following look at the script, the script itself, for my account early thought, I do not say the specific use of methods and configuration environment, I only paste code, do not seal my account:
#coding =utf-8#!/usr/bin/env pythonfrom Selenium import webdriverimport timebrowser=webdriver. Chrome () url= ' http://home.51cto.com/index.php ' browser.get (URL) username= ' world77 ' password= ' q******* ' Browser.find _element_by_name (' email '). Send_keys (username) browser.find_element_by_name (' passwd '). Send_keys (password) Browser.find_element_by_class_name (' loginbtn '). Click () #browser. Find_element_by_class_name (' Popup_close '). Click () #browser. Find_element_by_class_name (' Hand '). Click () browser.find_element_by_id (' Signto '). Click () #browser. Find _element_by_link_text (U "Collect 2 worry-free coins") #browser. Find_element_by_link_text (U "has been picked up for 1 days") print "Login 51cto success ..." Time.sleep () browser.close () print "Test finished ..."
If interested, you can try it yourself, anyway, the experiment is normal can be picked up oh ...
This article is from "You are a passer-by or fearless" blog, please be sure to keep this source http://world77.blog.51cto.com/414605/1576607
Python with selenium automatic collection of worry-free money scripts