Jump to content
Sign in to follow this  
dar100111

Website still loading html while not loading

Recommended Posts

dar100111

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
dar100111

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
Edano

probably you have to find an individual solution, since some websites are built in this way to prevent automation.


[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites
dar100111

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
JohnOne

_IEErrorHandlerRegister("MyErrFunc")

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



Func MyErrFunc()
    Return
EndFunc   ;==>MyErrFunc

Edited by JohnOne
  • Like 2

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

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
dar100111

Sweet.  Thanks John! 

Share this post


Link to post
Share on other sites
Edano

yes. that is a nice solution


[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

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  

×