Can't find WebKit

Tried to create a simple AppleScript program to list all open Safari URL’s - here is what I tried (Safari is either on High Sierra, Mojave or Ventura):

tell application “WebKit”

get URL of every tab of every window

end tell

But ScriptDebuggger 7 says it can’t find WebKit – is that normal? How do I resolve the issue or is there an easier way in Script Debugger 7?

Thanks…

-bob

ps - sorry for the incorrectly formatted script code - can’t remember how to do it correctly…

Forgive me if I’m being dense, but I’m unclear why you’re talking to WebKit which, so far as I know, isn’t a valid target. This works:

tell application "Safari" to ¬
	set _URLs to URL of tabs of every window

I got the WebKit code from a Google search and gave it a try.

Thanks … tried your example and I see the list of URL’s in the Script Debugger Result pane so that is what I needed - thanks very much…

WebKit scripting may require more effort.

http://piyocast.com/as/archives/9766