Jump to content

Website still loading html while not loading


Go to solution Solved by JohnOne,

Recommended Posts

Hey All,

Have a website that when I navigate to a page, the information isn't complete and has a little loading animation on the website so I need to figure out a better solution than _ieloadwait.

Anyone ever try doing something like telling the script to wait until a form, element or table is available before continuing their script.  Was curious how someone utilizes that or if a different method was easier.

Thank you very much!

Link to comment
Share on other sites

Hey Edano,

 So instead of a sleep function I want to have it wait until it can find the $oForm listed below, if that's possible.

$_IEAction($railtrace, "click")
_IELoadWait($oIE)
Sleep(5000)
$oFrame = _IEFrameGetObjByName($oIE, 'module')
$oForm = _IEFormGetObjByName($oFrame, 'ClEquipmentTraceProfileForm')
$entry = _IEFormElementGetObjByName($oForm, 'equipment')
$method = _IEFormElementGetObjByName($oForm, 'delivery')
$output = _IEFormElementGetObjByName($oForm, 'outputType')
_IEFormElementSetValue($entry, "HJCU137135")
_IEFormElementOptionSelect($output, "csv", 1, "byValue")
_IEFormElementOptionSelect($method, "D", 1, "byValue")
_IEAction($entry, "focus")
_IELoadWait($oIE)
Link to comment
Share on other sites

  • Solution

_IEErrorHandlerRegister("MyErrFunc")

Do
   Sleep(100)
   $oForm = _IEFormGetObjByName($oFrame, 'ClEquipmentTraceProfileForm')
Until IsObJ($oForm)



Func MyErrFunc()
    Return
EndFunc   ;==>MyErrFunc

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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...