No matching IE instance found

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
nodochau
Pro Scripter
Posts: 135
Joined: Wed Jan 16, 2019 12:59 pm

No matching IE instance found

Post by nodochau » Tue Jul 14, 2020 2:32 pm

Hello,
I create a piece of code to login to the website and doing things. I log in successfully and there is another button that I need to press so that I can get into the field that I want. I used IEGetTags command and I got the error:
"No matching IE instance found". Tried to use IE Element Wizard but still got the same error.
Here is my code:
let>myurl=http://xyz/Illuminator?service=Personalization
IECreate>IE[0]
Wait>.5
IENavigate>IE[0],myurl,
Wait>1
IEGetTags>myurl,input,O,tags
let>k=0
Repeat>k
add>k,1
let>tag=tags_%k%
Position>name=j_username,tag,1,p
Position>name=j_password,tag,1,p1
Position>name=uidPasswordLogon,tag,1,p2
if>p>0
let>kk=k
endif
if>p1>0
let>kkk=k
endif
if>p2>0
let>kkkk=k
endif
Until>k=tags_count
IETagEvent>myurl,input,kk,,xxx
IETagEvent>myurl,input,kkk,,yyy
Wait>.5
IETagEvent>myurl,input,kkkk,click,
//This is a new url after I logged in
Let>mynewurl=https://xyz/Illuminator?service=...
IEGetTages>mynewurl,newurl

Please help!

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1385
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: No matching IE instance found

Post by Dorian (MJT support) » Tue Jul 14, 2020 3:19 pm

If the URL changes, the URL in the browser is not matching the URL in your script. You'd need to use the URL it changes to - or just part of it, such as the domain.

Your script navigates to http://xyz/Illuminator?service=Personalization, for example, and then uses exactly the same URL for the rest of the script. So the URL it's looking for needs to be http://xyz/Illuminator?service=Personalization

If you did something like this...
let>URL1=http://xyz/Illuminator?service=Personalization
let>URL2=http://xyz

IENavigate>IE[0],URL1
log in, etc
....
then..
IEGetTags>URL2,input,O,tags
etc..

..Then your issue would vanish.


or...

let>domain=http://xyz.com
let>page=Illuminator?service=Personalization

IENavigate>IE[0],%domain%/%page%

IEGetTags>%domain%,input,O,tags
Yes, we have a Custom Scripting Service. Message me or go here

nodochau
Pro Scripter
Posts: 135
Joined: Wed Jan 16, 2019 12:59 pm

Re: No matching IE instance found

Post by nodochau » Tue Jul 14, 2020 4:21 pm

Hi Dorian,
Yes my urls are different
the 1st url is http://xyz/Illuminator?service=Personalization
and the 2nd is https://xyz/Illuminator?service=...
You can see myurl and mynewurl.
And if I want to use IEGetURL to get the 2nd url after I log in, what IE_Reference should I use?

Thanks

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1385
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: No matching IE instance found

Post by Dorian (MJT support) » Tue Jul 14, 2020 4:40 pm

Some commands use the URL, some use the IE Reference. You can see which by watching the syntax helper at the bottom. For this script you'd just continue using IE[0]

I'd be inclined to only use the full URL for the IENavigate, and https://xyz/ for everything else that just requires a partial URL, as above.
Yes, we have a Custom Scripting Service. Message me or go here

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1385
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: No matching IE instance found

Post by Dorian (MJT support) » Tue Jul 14, 2020 7:08 pm

I think earlier there was one command I should have recommended, but it wasn't in the forefront of my mind.

If the URL changes, you can simply use IEGetURL to get the new URL. You can then continue to use the same variable for the URL.

Code: Select all

Let>TheURL=https://www.google.co.uk/
IECreate>IE[0]
IENavigate>IE[0],TheURL,res
Wait>1

IEGetURL>IE[0],TheURL
MessageModal>TheURL

Yes, we have a Custom Scripting Service. Message me or go here

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