Jump to content
Sign in to follow this  
dar100111

Website still loading html while not loading

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!

Share this post


Link to post
Share on other sites

Hey John!  thanks for the quick response.  So If I'm looking for a certain form and I set it to a variable like $oForm, how to you incorporate the code?

@error ?

Thank you very much for the help!

Share this post


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

Share this post


Link to post
Share on other sites

_IEErrorHandlerRegister("MyErrFunc")

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



Func MyErrFunc()
    Return
EndFunc   ;==>MyErrFunc

Edited by JohnOne

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
Sign in to follow this  

×
×
  • Create New...