15 Aug 2011

Python调用ie提交form

收藏到CSDN网摘



利用python提交网页 import win32com.client
import time
ie6=win32com.client.Dispatch("InternetExplorer.Application")
ie6.Navigate("http://localhost/skyenet/")
ie6.Visible=1
while ie6.Busy:
time.sleep(1)

document=ie6.Document
document.getElementById("username").value="alibaba"
document.getElementById("password").value="zhimakamen"
document.forms[0].submit()

No comments :

Post a Comment