Jump to content
Nareshm

Wait Until webpage Loaded in internet explorer

Recommended Posts

Nareshm

which function is use for wait webpage in IE?

My code is like :

#include <IE.au3>
$sData = ClipGet()
$oIE=_IECreate("https://abcd.com/efghi", 1)
$oObj = _IEGetObjByName($oIE,"userno")
_IEPropertySet($oObj,"innertext",$sData)
$oObj = _IEGetObjById($oIE,"btnnext")
_IEAction($oObj,"click")

Then wait until "https://abcd.com/finish" is loaded

then i want to use code like this :

$oObj = _IEGetObjById($oIE,"btnselect")
_IEAction($oObj,"click")
Exit

How can i do this ? please someone help

Share this post


Link to post
Share on other sites
Subz

_IELoadWait

Share this post


Link to post
Share on other sites
Nareshm
1 hour ago, Subz said:

_IELoadWait

what after _IELoadwait?

Share this post


Link to post
Share on other sites
Subz

Not sure what you mean, you just add _IELoadWait after loading your page and then once its loaded it will continue on with your code, see help file for more info.

#include <IE.au3>
$sData = ClipGet()
$oIE=_IECreate("https://abcd.com/efghi", 1)
_IELoadWait($oIE)
$oObj = _IEGetObjByName($oIE,"userno")
_IEPropertySet($oObj,"innertext",$sData)
$oObj = _IEGetObjById($oIE,"btnnext")
_IEAction($oObj,"click")

Share this post


Link to post
Share on other sites
Nareshm
1 minute ago, Subz said:

Not sure what you mean, you just add _IELoadWait after loading your page and then once its loaded it will continue on with your code, see help file for more info.

#include <IE.au3>
$sData = ClipGet()
$oIE=_IECreate("https://abcd.com/efghi", 1)
_IELoadWait($oIE)
$oObj = _IEGetObjByName($oIE,"userno")
_IEPropertySet($oObj,"innertext",$sData)
$oObj = _IEGetObjById($oIE,"btnnext")
_IEAction($oObj,"click")

But i not wait for https://abcd.com/efghi, i want to wait for defferent page

Share this post


Link to post
Share on other sites
Subz

If its opening in the same page then you can still use the $oIE object so after _IEAction($oObj, "Click") just add another _IELoadWait or Add a Sleep(5000) function.

Share this post


Link to post
Share on other sites
Nareshm
Just now, Subz said:

If its opening in the same page then you can still use the $oIE object so after _IEAction($oObj, "Click") just add another _IELoadWait or Add a Sleep(5000) function.

How Can i use this ?
My Full Code is :

#include <IE.au3>
$sData = ClipGet()
$oIE=_IECreate("https://efps.gujarat.gov.in/webBillingApp2/BillDetails/eFPSBill", 1)
$oObj = _IEGetObjByName($oIE,"userRationCard")
_IEPropertySet($oObj,"innertext",$sData)
$oObj = _IEGetObjById($oIE,"btnrationnext")
_IEAction($oObj,"click")
;"https://efps.gujarat.gov.in/webBillingApp2/BillDetails/ValidateRationCardDetails" -This is website for waiting full loaded.
 $oObj = _IEGetObjById($oIE,"btnmemberselect")
_IEAction($oObj,"click")
Exit

 

Share this post


Link to post
Share on other sites
Subz
#include <IE.au3>
$sData = ClipGet()
$oIE=_IECreate("https://efps.gujarat.gov.in/webBillingApp2/BillDetails/eFPSBill", 1)
_IELoadWait($oIE)
$oObj = _IEGetObjByName($oIE,"userRationCard")
_IEPropertySet($oObj,"innertext",$sData)
$oObj = _IEGetObjById($oIE,"btnrationnext")
_IEAction($oObj,"click")
;~ You can use _IELoadWait or Sleep to wait for the page to load
_IELoadWait($oIE)
Sleep(5000)
;"https://efps.gujarat.gov.in/webBillingApp2/BillDetails/ValidateRationCardDetails" -This is website for waiting full loaded.
 $oObj = _IEGetObjById($oIE,"btnmemberselect")
_IEAction($oObj,"click")
Exit

 

Share this post


Link to post
Share on other sites
Nareshm
2 minutes ago, Subz said:
#include <IE.au3>
$sData = ClipGet()
$oIE=_IECreate("https://efps.gujarat.gov.in/webBillingApp2/BillDetails/eFPSBill", 1)
_IELoadWait($oIE)
$oObj = _IEGetObjByName($oIE,"userRationCard")
_IEPropertySet($oObj,"innertext",$sData)
$oObj = _IEGetObjById($oIE,"btnrationnext")
_IEAction($oObj,"click")
;~ You can use _IELoadWait or Sleep to wait for the page to load
_IELoadWait($oIE)
Sleep(5000)
;"https://efps.gujarat.gov.in/webBillingApp2/BillDetails/ValidateRationCardDetails" -This is website for waiting full loaded.
 $oObj = _IEGetObjById($oIE,"btnmemberselect")
_IEAction($oObj,"click")
Exit

 

Thanks

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

×