Jump to content

[solved]$_IESTATUS_InvalidObjectType


realtebo
 Share

Go to solution Solved by realtebo,

Recommended Posts

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
Link to comment
Share on other sites

  • Solution

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");
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...