Applescript use google chrome to extract text
问题 I'm extracting text from a page on safari, everything work fine, However I can't adapt this script to Google Chrome Here is the Safari code to getInputByClass2(theClass, num) tell application "Safari" set input to do JavaScript " document.getElementsByClassName('" & theClass & "')[" & num & "].innerHTML;" in document 1 end tell return input end getInputByClass2 Here is the Chrome code to getInputByClass2(theClass, num) tell application "Google Chrome" set input to do JavaScript " document