Can not get Safari to quit

I have set the following script up as a test script but can not get aSafari to quit. Safarie needs to quit to do repeat testing.

set theDelay to 10 -- the time in seconds the script will wait to let a web page load

tell application "GetWebPage"
	launch
	delay theDelay
	tell application "GetWebPage"
		quit me
	end tell
end tell

tell application "Safari"
	quit me
end tell

The “GetWebPage” is an Automator application that needs to be used. When it runs it launches Safari and goes to 10 websites.
Can someone help me? I would love to do it myself but I have been banging my head for 3 days now. Thanks

I haven’t used the automator app you mentioned, but this will close Safari

tell application "Safari" to quit

When you say me, your script stops talking to Safari and instead talks to itself (or the application [e.g. Script Editor] running the script, depending on how the script is run). So, you shouldn’t talk to yourself. :wink:

Any of these should work:

tell application "Safari"
	quit me
end tell

-- or
tell application "Safari" to quit

-- this works for activate, launch, and quit
quit application "Safari"

Same goes for your “GetWebPage” Automator action. You’ll want to tell IT to quit, not the script.

Thanks for the help. I did get the script to do what I wated and more.