Queener Posted September 20, 2013 Share Posted September 20, 2013 I'm only doing this for testing before I jump to the project, but I'm not able to get the input to be change. Here's the info from element inspect <input name="username" id="username" value="" autocapitalize="off" autocorrect="off" autocomplete="off" class="txt create_input valid" type="text"> here's what I tested so far: $title = "The Sign-in" $user = "test" if WinWaitActive($title, "") Then sleep(2000) WinSetState($title, "", @SW_MAXIMIZE) WinActivate($title, "") sleep(5000) $oInput = _IEGetObjById($oIE, "username") _IEFormElementSetValue($oInput, "NewText") sleep(2000) MsgBox(1,"test","done") Exit EndIf It worked all the way to maximizing the windows then it couldn't set new value. It just skipped that part and go into msgbox. Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.") Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 20, 2013 Moderators Share Posted September 20, 2013 So, you know it is getting to a certain point. Have you added any error checking, to see why it is failing? Like checking that $oInput exists? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Queener Posted September 20, 2013 Author Share Posted September 20, 2013 I'm not sure if this is the right way to add the error handling, but I get 0Not Exist using this code: if @error Then MsgBox(1, "Error", $oInput & "Not Exist") Exit EndIf Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.") Link to comment Share on other sites More sharing options...
allSystemsGo Posted September 20, 2013 Share Posted September 20, 2013 (edited) My experience with various _IEGET functions have always been used with div containers. Is there a div container for this input field? Try these functions $iQuery=_IEFormElementGetObjByName($iForm,"inputid") $iZip=_IEFormElementSetValue($iQuery,$$var) Edited September 20, 2013 by allSystemsGo Link to comment Share on other sites More sharing options...
Queener Posted September 20, 2013 Author Share Posted September 20, 2013 I do not think it's has div container. It does contain div for the header and footer, but not the body. Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.") Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now