web page does not load using web recorder

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
theonex
Junior Coder
Posts: 44
Joined: Thu May 10, 2012 12:32 pm

web page does not load using web recorder

Post by theonex » Wed Dec 24, 2014 10:49 pm

hi

am trying to automate a log in for this web site https://www.hpsmarts.com/app#/en/login
i normally use the web recorder to do this however the above web site does not load in web
recorder.

Let>FrameName={""}
Let>FormName={"loginFrm"}
Let>FieldName={"fEmail"}
Let>FieldValue=={"[email protected]"}
IE_FormFill>%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r

Let>FrameName={""}
Let>FormName={"loginFrm"}
Let>FieldName={"fPassword"}
Let>FieldValue={"password123456*"}
IE_FormFill>%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r

Let>FrameName={""}
Let>FormName={""}
Let>TagValue={""}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue,r

using the above code i can get the email and password boxes filled however i cant get the login button to work.
i also tried to manually click the login button after the boxes are filled by the code above but it says user and password invalid when they are both correct. any help is appreciated



:D :)

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

Re: web page does not load using web recorder

Post by Marcus Tettmar » Mon Dec 29, 2014 10:37 am

Indeed, there's something odd about this site and it's not rendering in WebRecorder. But you can use the IE Wizard and IE's developer tools. Here's a quick video showing how I do it:

http://vids.mjtnet.com/watch/c2lU6aeuLn

Note that the wizard couldn't identify the button so I switched to IE's Developer Tools to find an attribute to use.

Here's the working code I produced:

Code: Select all

IETagEventByAttrib>{"https://www.hpsmarts.com/app#/en/login"},INPUT,ID=fEmail,,[email protected]

IETagEventByAttrib>{"https://www.hpsmarts.com/app#/en/login"},INPUT,ID=fPassword,,password123456

IETagEventByAttrib>{"https://www.hpsmarts.com/app#/en/login"},INPUT,title=Login,click,
I use the wizard a lot more than WebRecorder. Eventually I see the wizard replacing WebRecorder altogether.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

theonex
Junior Coder
Posts: 44
Joined: Thu May 10, 2012 12:32 pm

Re: web page does not load using web recorder

Post by theonex » Wed Dec 31, 2014 2:15 pm

thanks for the reply marcus

i have started using the IE wizard too it gives more control of the script and it is better the the webrecorder.

i just run into one problem

IETagEventByAttrib>{"https://www.hpsmarts.com/app#/en/traini ... nertext=HP Printer, HP Paper & HP Ink,click,
WAIT>0.02

the "innertext=HP Printer, HP Paper & HP Ink" has a comma , which is preventing the click from being carried out and work around this

thanks

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

Re: web page does not load using web recorder

Post by Marcus Tettmar » Sun Jan 04, 2015 4:41 pm

Sure:

Code: Select all

Let>value=HP Printer, HP Paper & HP Ink
IETagEventByAttrib>{"https://www.hpsmarts.com/app#/en/training/module/20/quiz/106"},A,innertext=%value%,click,
Or:

Code: Select all

IETagEventByAttrib>{"https://www.hpsmarts.com/app#/en/training/module/20/quiz/106"},A,{"innertext=HP Printer, HP Paper & HP Ink"},click,
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
Sign up to our newsletter for free automation tips, tricks & discounts