Any way to use JavaScript to access/activate a Google SERP Instant Preview button?
When looking at a Google search results page, such as http://www.google.com/search?q=test, is there any way to access (and thus开发者_开发百科 activate) the 'Instant Preview' button for the first search result via JavaScript? Such as in the document.?.? format? The button has a <button>
tag, but doesn't appear to lie within a tag. Each one looks like this: <button class="vspib"></button>
I'm asking because I'm writing an Applescript that is automating input into and selection from Google, and I want to turn on the instant preview programatically (i.e. with a 'do JavaScript ...' line).
Also, just so there's no confusion, yes, I really want to be automating Google visually, so that one can watch the screen and see it automated. I do not want to just find a way to automate queries (I know I could do that many other ways).
The JavaScript will be. document.getElementsByClassName('vspib')[0].click();
精彩评论