Jump to content
Macro Express Forums

Using "find" to navigate in a browser (chrome)


jbird

Recommended Posts

There must be an easy way to use keyboard shortcuts to navigate in a web page other than mouse location.

I'm trying to use the "find" to find a field/button label then tab from there but find doesn't seem to move tab to the found text so tab order is always at top.

Other ideas to have a stable web page start point?

Link to comment
Share on other sites

It can be done; I've written many macros that use browser find commands to activate links. (It works best of all in Firefox, but Chrome is not bad.)

 

Basic technique:

 

Type CONTROL+f [to initiate fiind]

Type your search term [whatever it is you are searching for]

Type ESC [to cancel out of the find]

 

If you are searching for a link, it should now have focus. Type ENTER to activate it.

 

If you are searching for text to bring you close to a control, Type TAB or SHIFT+TAB to take you to your target.

 

To find the next instance of the search term, Type CONTROL+g

To find the previous instance, Type SHIFT+CONTROL+g

Link to comment
Share on other sites

Works, tho a bit unreliable as it's dependent on web page and text available (which may repeat on page). I find it works better to Find a link then just text strings. Would be nice if we could directly identify weg page 'controls' (fields etc).

 

It takes time, effort, and creativity to get the technique to work reliably.

 

Choosing an appropriate search string is as much art as science. I aim to discover the shortest sequence of keystrokes for the greatest number of situations. Usually a compromise must be struck.

 

Although ME cannot directly search for web controls, there are workarounds. Searching for links instead of other content can help get close. Then Tab (or Shift + Tab) one or more times to navigate to the control. Hunting for pixel colours can be made to work, as well. If a page is marked up with frames, you can use F6 or Shift + F6 to get you the desired frame. Another method is to click on a particular spot on the screen, and then send a series of Tabs, Shift + Tabs, F6, etc.

 

I have a number of macros that use all of the techniques listed above. In some cases, it takes hundreds or thousands of iterations to zero in on a target in a web app: e.g., a repeat loop that check every pixel along a path the width or height of a window.

 

Interestingly, there is little or no speed penalty for a macro going through so many steps; it's math, and computers excel at math. Most of my complex scripts execute in a fraction of a second.

 

However, these complex tasks are much easier to implement in Macro Express Pro because of the possibility of assigning meaningful variable names: %PixelColour% instead of %N[22]%

Link to comment
Share on other sites

 

e.g., a repeat loop that check every pixel along a path the width or height of a window.

Pixel colors are also handy to detect when a screen has changed. For example, you know that a certain color field will appear at a certain location when the next web page loads, so you loop repeatedly checking/waiting for it to appear.

 

Another technique I have found handy is to move the mouse pointer down the page until the pointer style changes, say from arrow to finger, then you know it is on a link that you can click. Of course you have to know approximately where to start because a page may have many links and you don't want to click the wrong one. Or when your mouse pointer has found a link, right-click it and copy link location to clipboard, then examine it to see if it is the one you want. You have to build a delay into the mouse-move repeat loop or you can easily move over the target faster than the pointer can change.

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...
×
×
  • Create New...