|
本帖最后由 xchf 于 2014-2-15 19:32 编辑
网页快捕获取的网页代码如下:
框架源码:
<IFRAME height=115 border=0 src="../login/login.faces" frameBorder=0 width=190 allowTransparency name=loginFrame></IFRAME>
框架元素源码:
<TR><TD vAlign=top colSpan=2 align=middle>
<TABLE style="cs: 0; cp: 0" cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD id=ext-gen27 width="50%" align=right><IMG style="CURSOR: hand" id=form:j_id2 onclick="OM.ajax.action('form',null,'loginBtn',false);return true;" border=0 src="/gtoa/login/../web/images/ico_enter.gif" width=70 height=22> </TD>
<TD style="PADDING-LEFT: 5px" id=ext-gen28 width="50%" align=left><IMG id=form:j_id3 border=0 src="/gtoa/login/../web/images/ico_letter.gif" width=70 height=22> </TD></TR></TBODY></TABLE></TD></TR>
#include <IE.au3>
; #include <IEEx.au3>
$oIE = _IEAttach("http://10.190.1.28/gtoa/web/welcome.do","url")
;_IEQuery通用获取元素对象
; $oFrame = _IEQuery($oIE,"IFRAME",'Name="loginFrame"')
$oIE = _IEFrameGetObjByName($oIE,"loginFrame")
$Ele = _IETagNameGetCollection($oIE,"input",0)
$Ele.value="aaa"
$Ele = _IETagNameGetCollection($oIE,"input",1)
$Ele.value="bbb"
;$Ele = _IETagNameGetCollection($oIE,"TD",12)
;_IELinkClickByIndex($Ele,0)
;$fs = _IEGetObjById($oIE,"ext-gen27")
;$fs.click
Send("{ENTER}")
前面的用户名、密码都已经填入了,就差点登录了,请教各位大牛。 |
|