Jump to content
Nareshm

Click on Button in Webpage using IEaction not working ?

Recommended Posts

Nareshm

Please see what is wrong in my code

#include <IE.au3>
$sData = ClipGet()
$oIE=_IECreate("https://efps.gujarat.gov.in/webBillingApp2/BillDetails/eFPSBill", 1)
$oObj = _IEGetObjByName($oIE,"userRationCard")
_IEPropertySet($oObj,"innertext",$sData)
$btnrationnext = _IEGetObjById($oIE,"btnrationnext")
_IEAction($btnrationnext,"click")

_IELoadWait($btnrationnext, "https://efps.gujarat.gov.in/webBillingApp2/BillDetails/ValidateRationCardDetails"); (Default) Wait for page load to complete before returning
 $btnmemberselect = _IEGetObjById($oIE,"btnmemberselect")
_IEAction($btnmemberselect,"click")

_IELoadWait("https://efps.gujarat.gov.in/webBillingApp2/BillDetails/GetEntitlement"); (Default) Wait for page load to complete before returning
 $btnnext = _IEGetObjById("https://efps.gujarat.gov.in/webBillingApp2/BillDetails/GetEntitlement","btnnext") 
_IEAction($btnnext,"click") ;(not working click on this)

Exit

 

Share this post


Link to post
Share on other sites
Danp2

When asking for help on an issue such as this, it would be beneficial to also include the results from the Scite output window so that we can see any errors that occurred.

Looking at your code, I see several issues --

1) Your calls to _IELoadWait are coded incorrectly. They should look like this --

_IELoadWait($oIE)

2) Similar issue with _IEGetObjById. It should instead look like this --

$btnnext = _IEGetObjById($oIE,"btnnext")
  • Like 1

Share this post


Link to post
Share on other sites
Nareshm
21 hours ago, Danp2 said:

When asking for help on an issue such as this, it would be beneficial to also include the results from the Scite output window so that we can see any errors that occurred.

Looking at your code, I see several issues --

1) Your calls to _IELoadWait are coded incorrectly. They should look like this --

_IELoadWait($oIE)

2) Similar issue with _IEGetObjById. It should instead look like this --

$btnnext = _IEGetObjById($oIE,"btnnext")

But i am wait for "https://efps.gujarat.gov.in/webBillingApp2/BillDetails/GetEntitlement" not https://efps.gujarat.gov.in/webBillingApp2/BillDetails/eFPSBill, i am using $oIE = https://efps.gujarat.gov.in/webBillingApp2/BillDetails/eFPSBill

Share this post


Link to post
Share on other sites
Danp2

Sorry, but it's doesn't work like that. Even if the URL changes after you click the button, you still want to use

_IELoadWait($oIE)

where $oIE is the reference to the IE object obtained via _IECreate or _IEAttach, not to a string constant.

Share this post


Link to post
Share on other sites
Nareshm
6 minutes ago, Danp2 said:

Sorry, but it's doesn't work like that. Even if the URL changes after you click the button, you still want to use

_IELoadWait($oIE)

where $oIE is the reference to the IE object obtained via _IECreate or _IEAttach, not to a string constant.

Thanks its working fine

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

×