Jump to content
Macro Express Forums

Click in browser fails to set text cursor


Recommended Posts

My macro is to fill in a web browser form. I had some problems when using tabs so now I'm clicking the mouse cursor instead. But when I click in any text box the macro consstently fails to display the text cursor. So the subsequent Text Type command also fails.

 

There would be no point in specifying the URL as it's the support forum for Magix Move Edit Pro and would require registration and login. But does this behaviour ring any bells for anyone please? Any likely causes? Even though it seemes redundant I tried adding a Window Activate command, a Wait for Window Title, but no change. A double left click doesn't work, nor a Left Mouse down and up.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

It sounds like a timing issue, particularly if the Web page has JavaScript running in the background. Try this:

 

Mouse Move ...

Wait a little

Left Click

Wait a little

Text Type ...

 

Don't bother with commands like "Move Mouse to Text Cursor Position" in IE or Firefox. They don't work the way you would expect.

 

An approach I have started using with Web based forms is to get the focused control, left click (0,0)relative to the control (which is the upper left corner of the content viewport), and then do all manner of mouse clicks, tab presses, and pixel searches to do to what I want to do.

 

The approach is proving to be more reliable than I would have thought. Certainly better than clicking relative to the window or screen. It feels like a hack, but the scripts work nicely.

Link to comment
Share on other sites

Alan's approach is well worth a try. Another method I have used successfully with some web forms, is to click once just to the left of the target field, then Text Type <TAB> into the field.

 

Thanks both. I ended up using both techniques. To resolve the immediate text cursor problem I had to add an exceptionally long delay (5 seconds).

 

Later, to get the whole page displayed, I had to click in an empty part of the window before text typing the END key.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...