【发布时间】:2016-02-27 11:37:44
【问题描述】:
尝试使用 AutoIT 自动填写亚马逊卖家中心的输入字段。一切都很好,但也许页面加载速度很慢,但我发送到表单输入元素的字符串被截断了。这是我的代码:
#include <IE.au3>
$oIE = _IECreate()
_IENavigate($oIE, "https://sellercentral.amazon.com/hz/home")
Local $oAddress = _IEPropertyGet($oIE, "locationurl")
ConsoleWrite($oAddress & @CRLF)
$oSignin = "https://sellercentral.amazon.com/gp/sign-in/sign-in.html?destination=https%3A%2F%2Fsellercentral.amazon.com%2Fhz%2Fhome"
if $oAddress = $oSignin Then
ConsoleWrite("Sucess! Connected!" & @CRLF)
Else
ConsoleWrite("You are not on the sign in page")
EndIf
_IELoadWait($oIE)
Local $oForm = _IEFormGetObjByName($oIE, "signinWidget")
Local $oInputFile = _IEFormElementGetObjByName($oForm, "username")
; Assign input focus to the field and then send the text string
_IEAction($oInputFile, "focus")
; Select exisiting content so it will be overwritten
_IEAction($oInputFile, "selectall")
Send("12345678@asdfasdfdasfasd.com")
【问题讨论】:
标签: forms internet-explorer automation autoit