Sign in to follow this  
Followers 0
Maintel

AutoIt can not get new url changed by JS

2 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



Ok solved by

Sleep('100')

 

Looks like _IELoadWait called automatically by _IELinkClickByText is not working in this case.

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  
Followers 0