Using IETagEventByAttrib with a Variable

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
FluffySniper
Newbie
Posts: 1
Joined: Wed Sep 17, 2014 8:13 pm

Using IETagEventByAttrib with a Variable

Post by FluffySniper » Wed Sep 17, 2014 8:47 pm

I am doing the following:

Code: Select all

Let>URLCitrixMain={"http://citrix"}
Let>URLCitrixLogin={"http://citrix/Citrix/XenApp/auth/login.aspx"}

IECreate>IE[0]
IENavigate>IE[0],%URLCitrixMain%,ie_result
IETagEventByAttrib>%URLCitrixLogin%,INPUT,ID=user,,test-user
With the above code I get an error stating, "No matching IE instance found".

This code works without issue.

Code: Select all

Let>URLCitrixMain={"http://citrix"}

IECreate>IE[0]
IENavigate>IE[0],%URLCitrixMain%,ie_result
IETagEventByAttrib>{"http://citrix/Citrix/XenApp/auth/login.aspx"},INPUT,ID=user,,test-user
Is this acting as designed?

I have the most current version of Macro Scheduler.

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

Re: Using IETagEventByAttrib with a Variable

Post by Marcus Tettmar » Fri Sep 19, 2014 6:50 am

Once I've allowed time for the page to load this works fine for me. With your script as it stands you are trying to extract from the tag before the page has finished loading. I think that's your issue.

This works for me. Obviously I had to use a different web site that I have access to, but it works fine.

Code: Select all

Let>URLCitrixMain={"https://www.mjtnet.com"}
Let>URLCitrixLogin={"https://www.mjtnet.com"}

IECreate>IE[0]
IENavigate>IE[0],%URLCitrixMain%,ie_result
IEWaitDocumentComplete>IE[0],ie_res
IETagEventByAttrib>%URLCitrixLogin%,INPUT,NAME=q,,test-user
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

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