 		console.log "Waiting #{seconds} seconds"
 		fn = =>
 			console.log "Wait complete"
-			@owner.socket.send JSON.stringify({ Response: "ActionCompleted" })
+			@CompleteAction()
 		setInterval fn, (seconds * 1000)
 
 	WaitMilliseconds: (command) ->

		if !success 
			@owner.throw "Could not find option"

		@owner.socket.send JSON.stringify({ Response: "ActionCompleted" })

	TakeScreenshot: (command) ->
		fs = require 'fs'
		filename = new Date().getTime() + 'screenshot.png'
		page.render filename
		@owner.socket.send JSON.stringify({ Response: "ActionCompleted", Result: filename })

	Wait: (command) ->
		# Note this is currently implemented by the CommandProvider

		page.sendEvent 'mousemove', dstOffset.left, dstOffset.top
		page.sendEvent 'mouseup', dstOffset.left, dstOffset.top

		@CompleteAction()

	SelectText: (command) ->
		selector = command.selector if command.selector?
