Navigating Chrome - what am I doing wrong ?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
CatParky
Newbie
Posts: 1
Joined: Wed Jun 22, 2016 10:03 am

Navigating Chrome - what am I doing wrong ?

Post by CatParky » Wed Jun 22, 2016 10:55 am

Hi,

I'm just starting to use this software under demo for my company to see if it meets our needs, but I'm falling at the first hurdle... I need to be able to login to a web portal and download some data, but I don't seem to be able to get MS to recognise the login fields, it doesn't error or do anything.

What's wrong with this (anon on purpose ******)

Code: Select all

//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
Let>RP_WAIT=1
Let>RP_WINDOWMODE=3
RunProgram>C:\*******\chrome.exe
GetWindowHandle>New Tab - Google Chrome,hWndParent
FindObject>hWndParent,Chrome_RenderWidgetHostHWND,,1,hWnd,X1,Y1,X2,Y2,result
ObjectSendKeys>hWnd,{"https://www.eonenergy.com/for-your-business/large-energy-users/your-account"}
Press Enter
MouseMove>-843,347
LClick
GetWindowHandle>Your account | Large energy users - E.ON - Google Chrome,hWndParent
FindObject>hWndParent,Chrome_RenderWidgetHostHWND,,1,hWnd,X1,Y1,X2,Y2,result
ObjectSendKeys>hWnd,{"[email protected]"}
I just can't seem to get the login text to output to the login username.

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

Re: Navigating Chrome - what am I doing wrong ?

Post by Marcus Tettmar » Fri Jun 24, 2016 11:23 am

You won't be able to use that method to find HTML elements. They are NOT "windowed controls". Sometimes you can use the UI functions within Chrome. But Image Recognition is probably the simplest - to find the starting point and/or specific controls that need a click - and then of course you can move around the page with keystrokes (TAB from fields to fields etc)
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