realtebo

[solved]$_IESTATUS_InvalidObjectType

4 posts in this topic

#1 ·  Posted (edited)

I'm doing this

#include <IE.au3>



Call ("SignIn");



Func SignIn ()

   Global $browser = _IECreate('domain.tld');



   Local $username = "my-username";

   Local $password = "my-pwd";



   Local $username_field     = _IEFormElementGetObjByName ( $browser, "username" );

   Local $pwd_field          = _IEFormElementGetObjByName ( $browser, "pwd" );

   Local $submit_btn         = _IEGetObjById ( $browser, "login-button-container");



   _IEFormElementSetValue ($username_field, $username);

   _IEFormElementSetValue ($pwd_field, $password);

   _IEAction ( $browser, "click");



EndFunc

It works, but in AutoIt console I got this

 

 

--> IE.au3 T3.0-1 Error from function _IEFormElementGetObjByName, $_IESTATUS_InvalidObjectType
--> IE.au3 T3.0-1 Error from function _IEFormElementGetObjByName, $_IESTATUS_InvalidObjectType
--> IE.au3 T3.0-1 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-1 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-1 Error from function _IEAction(click),  $_IESTATUS_InvalidObjectType

 

Why?

Edited by realtebo

Share this post


Link to post
Share on other sites



I was misunsing the objects

 Local $form                 = _IEFormGetObjByName($browser, "loginForm");

   Local $username_field     = _IEFormElementGetObjByName ( $form, "username" );
   Local $pwd_field            = _IEFormElementGetObjByName ( $form, "password" );
   Local $submit_btn         = _IEGetObjById ( $browser, "login-button-container");

Share this post


Link to post
Share on other sites

Hello!

Welcome to the forum, and good job on correcting your code. Also good job on naming the thread Solved, but you can also mark your post as best answer, and the forum mark your thread answered!

Best of luck with your future endeavors!

Share this post


Link to post
Share on other sites

Thanks for this suggestions... It since a long time I'm lurking this forum but only today I'm really starting to experimenting

Share this post


Link to post
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