这应该工作
#include <IE.au3>
Local $sUrl[2] = ["https://auth.api.sonyentertainmentnetwork.com/login.jsp", "https://store.playstation.com/#!/en-us/home/games"]
Local $hoIE = _IECreate($sUrl[0])
Local $hInputID = _IEGetObjByName($hoIE, "j_username")
Local $hPasswordID = _IEGetObjByName($hoIE, "j_password")
Local $hForm= _IEGetObjById($hoIE, "signInForm")
_IEFormElementSetValue($hInputID, "name")
_IEFormElementSetValue($hPasswordID, "password")
_IEFormSubmit($hForm)
Sleep(1000)
_IENavigate($hoIE, $sUrl[1])
编辑:我宁愿使用WinHTTP的,如果我只是做一个登录
EDIT2:这里是一个WinHTTP的登录到网站这是一个任何其他请求你想做的事我会和使用日志。 没有IE没有FF没有戏,没有浏览器都没有。
#include <IE.au3>
#include "WinHttp.au3"
Local $sUrl[2] = ["https://auth.api.sonyentertainmentnetwork.com", "https://store.playstation.com/#!/en-us/home/games"]
Local Const $sUserAgent = "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)"
Local $hOpen = _WinHttpOpen($sUserAgent)
Local $hConnect = _WinHttpConnect($hOpen, $sUrl[0])
Local $sLoginResult = _WinHttpSimpleFormFill($hConnect, "/login.jsp", _
"signInForm", _ ; form id
"signInInput_SignInID", "name", _
"signInInput_Password", "pass")
If @error Then MsgBox(0, "", "Error: " & @error & " Extended: " & @extended)
; Close handles
_WinHttpCloseHandle($hConnect)
_WinHttpCloseHandle($hOpen)
ConsoleWrite($sLoginResult & @CRLF) ; This will be site index just for you.
你到底想达到什么目的? – user2530266
嗨,朋友,我刚刚更新了这个问题。它的链接它的网页:https://store.playstation.com/#!/en-us/home/games 我想单击登录并自动登录到页面。 FF是最好的。我使用IE 8,似乎该网页不能与IE 8一起使用。但是如果FF无法做到,请用IE – iAsk