Jump to content

How to Input password in this box?


Recommended Posts

The following code is a password input in a webpage:

<OBJECT class=objectPw id=Password_Edit onkeydown=if(event.keyCode==13){try{this.form.submit.click();}catch(e){}} onfocus="JQ('#warningBox').show()" tabIndex=2 codeBase=https://img.alipay.com/download/2121/aliedit.cab#Version=2,1,2,1 data=data:application/x-oleobject;base64,VUKKSDYys0SPJ/oa7KqIRAADAAAfEwAAlQIAAAsA//8LAP//CABuAAAAMwBEAEUAUwBfADIAXwAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAw
ADAAMABfADAARQA1AEUAOQA5ADUARQBFAEQAMAA0ADYARAA2ADIAAAATABMAAAALAAAACABuAAAAMwBEAEUAUwBfADIAXwAwADAA
MAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABfADAARQA1AEUAOQA5ADUARQBF
AEQAMAA0ADYARAA2ADIAAAALAAAAEgAEAAgAAAAAAAgAAAAAAA== border=0 classid=clsid:488A4255-3236-44B3-8F27-FA1AECAA8844 name=Password_Edit></OBJECT>

I want input some text in this box, however, I tried many kinds of methods, All of it doesn't works

$oPassword = _IEGetObjByName($oIE,"Password_Edit")
_IEPropertySet($oPassword,"innertext","654321")

Show that:

$oTemp.innerText = $newvalue

$oTemp.innerText = $newvalue^ ERROR

$oPassword = _IEGetObjByName($oIE,"Password_Edit")
$hIE = _IEPropertyGet($oIE, "hwnd")
WinActivate($hIE)
_IEAction($oPassword,"focus")
ControlSend($hIE, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "654321")
ConsoleWrite(@error&@crlf)

It also not work!

And I think that _IEGetObjByName is working properly to get the object of input, but It hard to set the value of this input box!

Any ideas? Thank you for your help!

Link to comment
Share on other sites

<OBJECT class=objectPw

It is an activeX control, not an HTML element. You may be able to interact with it, but there is no standard way of doing so... it all depends on the methods and properties exposed by the control -- try to find documentation. Otherwise you'll need to resort to sending keys.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

<OBJECT class=objectPw

It is an activeX control, not an HTML element. You may be able to interact with it, but there is no standard way of doing so... it all depends on the methods and properties exposed by the control -- try to find documentation. Otherwise you'll need to resort to sending keys.

Dale

You are right, because this is a secure website, so it isn't allow me input the password directly, and sending keys is also doesn't works, May be this ActiveX control block the simulated keys.

I find a tool that can be input the text in any password input box, but I don't know how to realized this in Au3

Thanks for your reply!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...