Jump to content

AutoIt can not get new url changed by JS


Go to solution Solved by Maintel,

Recommended Posts

Hello

 

with autoit I can not get URL of

$oIE = _IECreateEmbedded()
 

Site is loaded, I do few clicks with AutoIt etc, then I click on a href (_IELinkClickByText), which started a JavaScript, the page is loaded, but I'm still getting the old URL with:

 

$frameFrameContent = _IEFrameGetObjByName($oIE, 'FrameContent')
$frameUrl = _IEPropertyGet($frameFrameContent, 'locationurl')
In fact I need get the content of that frame, but it is also not working, I think I'm also getting the html from the previous step in browsing:

 

$urldata = _IEDocReadHTML($frameFrameContent)
 

 

So how to refresh, or what I need to do, to get the actual frame url and html?

 

this is the JS used to change the URL in that frame:

 

dlg = "DlgCtrCarSelection";
process = "CarSelection";
top.FrameContent.location.href=baseUrl+'?dlg='+dlg+'&action=Enter&process='+process+'&loop=true';
Edited by Maintel
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...