Click "Next" in Google Scholar

I'm trying to click on the Next button in Google Scholar.

image

I'm using the "Click Safari Link" action:

image

Buy Keyboard Meastro cannot find the link:

image

Here is what the markup looks like when I use Inspect Element:

image

Does anyone have any suggestions for how to get to click that pesky link?

thanks in advance.

/bangersandmash

Hey Jeff,

Hmm...

The Click Safari Link action found links on the test page I used on Google Scholar.

Can you provide the URL of the page that's failing?

Do you have “Allow JavaScript from Apple Events” activated in Safari's Develop Menu?

-Chris

Hi Chris,

Here's the URL:

https://scholar.google.ca/scholar?cites=4611939203796302875&as_sdt=2005&sciodt=0,5&hl=en

I do have "Allow JavaScript from Apple Events" turned on -- it works on other pages. It even works on regular Google pages, just not on Google Scholar.

Hey Jeff,

Okay. That page gives me the exact same problem you have, so we have a place to start.

This page is relatively easy to parse for the next URL, but I'm going to show you how to brute-force things simply from observing how Google Scholar's URL changes as you hit the next button.

Your original URL:

https://scholar.google.ca/scholar?cites=4611939203796302875&as_sdt=2005&sciodt=0,5&hl=en

The next URL:

https://scholar.google.ca/scholar?start=10&hl=en&as_sdt=2005&sciodt=0,5&cites=4611939203796302875&scipsc=

In the macro below I've done a little find/replace and a calculation to iterate to the next incremental URL.

In the next episode I'll use a “simple” JavaScript to get the next URL.

-Chris


Google Scholar – Iterate Search Results to ‘Next’ v1.00.kmmacros (6.8 KB)

Hey Jeff,

Here's a much simpler macro using an Xpath in JavaScript find the next button's URL; it then prompts the front window to go to the newly found URL.

Both macros are fragile in that they're dependent upon what Google does. If Google changes their syntax anywhere the macros might bread, and you'll have to fix them.

I wouldn't expect Google to change anything soon, but you never know.

-Chris


Google Scholar – Iterate Search Results to ‘Next’ v2.00 (JavaScript Version).kmmacros (5.1 KB)

Wow! Thanks, Chris. this seem to do the trick! Much appreciated!

1 Like