problems using IEExtractTagByName with IE11

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
pneves
Newbie
Posts: 19
Joined: Mon Jan 25, 2010 10:59 am

problems using IEExtractTagByName with IE11

Post by pneves » Thu Feb 06, 2014 1:03 pm

I am having a problem with IEExtractTagByAttrib or IEExtractTagByName on IE11.

If I use any of this functions:

Code: Select all

IEExtractTagByAttrib>%IE[0]%,{""},{"input"},{"name"},{"b0"},0,vb0
IEExtractTagByName>%IE[0]%,,INPUT,b1,0,vb1
It works on IE9 but not on IE11

I inspected the html code:
http://www3.duarteneves.pt/pub/mjtnet-MP-IE9.txt
http://www3.duarteneves.pt/pub/mjtnet-MP-IE11.txt
and I see the tags on both

Code: Select all

IE9 input class="pinButton" onclick="doclick('FQAR');" name="b0" value="6" type="button"
IE11 input name="b0" class="pinButton" onclick="doclick('NHXE');" type="button" value="6">
In case you want to acces sthe web site here you have it.
http://get-to-post.nickj.org/?https://n ... adCert&off

I would appreciate any help.
How can I debug this situations ?

Thanks,

Pedro

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Feb 06, 2014 1:22 pm

I'm running IE11 here and your code worked for me:

IEExtractTagByName>%IE[1]%,,INPUT,b1,0,vb1

This code opens up the page and always reports the correct number for button 1 (second button):

Code: Select all

// Generated by MacroScript WebRecorder 4.01
// Recorded on  Thursday, February 6, 2014, at 01:18 PM

//Move the mouse cursor out of harm's way to avoid causing mouseover events to interrupt
MouseMove>0,0

//Enable automatic downloads to My Documents dir, modify path if required
IEOnDownload>1,,ie_res

//Set timeout for ClickTag and FormFill to 10 seconds, increase if pages load more slowly
IESetTimeout>10,ie_res

IECreate>IE[1]

IENavigate>%IE[1]%,http://get-to-post.nickj.org/?https://net24.montepio.pt/Net24-Web/func/acesso/net24eLoginTV.jsp?loginid_IN=111111111&pageCWS=https://www.montepio.pt/SitePublico/pt_PT/empresas.page&radCert&off,ie_res

IEWaitDocumentComplete>%IE[1]%,ie_res

Wait>2

IEWaitDocumentComplete>%IE[1]%,ie_res

/*

IEFormFill>%IE[1]%,{""},{""},{"CLASSNAME:fldCheckConfirmation"},{""},0,ie_res

IEClickTag>%IE[1]%,{""},{""},{"INPUT"},{"CHECKBOX"},{""},ie_res


*/

IEExtractTagByName>%IE[1]%,,INPUT,b1,0,vb1
MessageModal>vb1
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

pneves
Newbie
Posts: 19
Joined: Mon Jan 25, 2010 10:59 am

Post by pneves » Thu Feb 06, 2014 3:27 pm

Yes that works for me.
The problem is that, on my script instead of:

Code: Select all

IENavigate>%IE[1]%,http://get-to-post.nickj.org/?https://net24.montepio.pt/Net24-Web/func/acesso/net24eLoginTV.jsp?loginid_IN=111111111&pageCWS=https://www.montepio.pt/SitePublico/pt_PT/empresas.page&radCert&off,ie_res
I use:

Code: Select all

IENavigate>%IE[1]%,http://www.montepio.pt/SitePublico/pt_PT/empresas.page?,ie_res
IEWaitDocumentComplete>%IE[1]%,ie_res
IEFormFill>%IE[1]%,{""},{"loginForm"},{"loginid_IN"},{"111111111"},0,ie_res
IEClickTag>%IE[1]%,{""},{"loginForm"},{"INPUT"},{"ID"},{"btnLoginSubmit"},ie_res

I posted the link "http://get-to-post.nickj.org/...." on the forum to simplify the access to the page. But I don't want to use it on my script, because I would have to rely on another website.

What could be happening ?
Another question, does mjtnet allow to navigate to a webpage requesting a POST ?
Something like

Code: Select all

IENavigate>%IE[1]%,http://www.teste.com,POST,loginid_IN=111111111,ies_res
Thanks,
Pedro

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Feb 06, 2014 3:30 pm

We've established there is nothing wrong with the ExtractTag so long as the tag is there and visible. Therefore I expect the issue is that you are calling it too soon and the page is not yet ready.

No, you can't do a POST via a navigate. The IE functions emulate user activity so that isn't possible. The only way to do a POST therefore is to submit a form.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

pneves
Newbie
Posts: 19
Joined: Mon Jan 25, 2010 10:59 am

Post by pneves » Thu Feb 06, 2014 3:46 pm

Marcus Tettmar wrote:We've established there is nothing wrong with the ExtractTag so long as the tag is there and visible. Therefore I expect the issue is that you are calling it too soon and the page is not yet ready.
Even if I wait 10 seconds ExtractTag will not work.
I tested just by changing the way I get to the page, and I get different results.

It seems that IE11 or mjtnet is not refreshing the DOM.

This is the code I use to test.

Code: Select all

// COMPILE_OPTS|\\fs01\dnladmin\programas-NAOAPAGAR\Macro Scheduler\dnl\teste.exe||CONSOLE=0|INCLUDES=1||RUNTIMES=1|BMPS=1

// Generated by MacroScript WebRecorder 4.01
// Recorded on  Thursday, February 6, 2014, at 01:18 PM

//Move the mouse cursor out of harm's way to avoid causing mouseover events to interrupt
MouseMove>0,0

//Enable automatic downloads to My Documents dir, modify path if required
IEOnDownload>1,,ie_res

//Set timeout for ClickTag and FormFill to 10 seconds, increase if pages load more slowly
IESetTimeout>10,ie_res



IECreate>IE[1]
///*
IENavigate>%IE[1]%,http://www.montepio.pt/SitePublico/pt_PT/empresas.page?,ie_res
IEWaitDocumentComplete>%IE[1]%,ie_res
IEFormFill>%IE[1]%,{""},{"loginForm"},{"loginid_IN"},{"111111111"},0,ie_res
IEClickTag>%IE[1]%,{""},{"loginForm"},{"INPUT"},{"ID"},{"btnLoginSubmit"},ie_res
//*/
//IENavigate>%IE[1]%,http://get-to-post.nickj.org/?https://net24.montepio.pt/Net24-Web/func/acesso/net24eLoginTV.jsp?loginid_IN=111111111&pageCWS=https://www.montepio.pt/SitePublico/pt_PT/empresas.page&radCert&off,ie_res


IEWaitDocumentComplete>%IE[1]%,ie_res
Wait>10
IEWaitDocumentComplete>%IE[1]%,ie_res
IEExtractTagByName>%IE[1]%,,INPUT,b1,0,vb1
MessageModal>vb1

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Feb 06, 2014 3:49 pm

Guess what? Your code works for me.

Just run it three times, got the correct button value each time.

I'm running IE11 on Windows 8 x64.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

pneves
Newbie
Posts: 19
Joined: Mon Jan 25, 2010 10:59 am

Post by pneves » Thu Feb 06, 2014 3:56 pm

Marcus Tettmar wrote:Guess what? Your code works for me.

Just run it three times, got the correct button value each time.

I'm running IE11 on Windows 8 x64.
Thanks Marcus.
On my machine (win7 IE11) is not working (I have tried more than 10 times).
I am going to debug the problem and when I get to the solution of it, I will post it here.

pneves
Newbie
Posts: 19
Joined: Mon Jan 25, 2010 10:59 am

Post by pneves » Thu Feb 06, 2014 9:49 pm

pneves wrote: I am going to debug the problem and when I get to the solution of it, I will post it here.
The problem exists on:
Win7, IE11,FlashPLayerDisabled
It does not exists:
Win8, IE11
Win7, IE9

I got it to work with:
Win7, IE11,FlashPLayerEnabled
but its not 100% safe.
I will leave it working like this, and if it fails I will install IE9.

I just wanted to post some information in case someone else faces this problem.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts