// Get the element that has the tooltip
var elementWithTooltip = document.getElementById('element-id');
// Get the text content of the tooltip
var tooltipText = elementWithTooltip.getAttribute('title');
// Display the tooltip text in the console
Note that this code assumes that the tooltip text is stored in the title attribute of the element. If the tooltip is implemented using some other technique, the code may need to be modified accordingly.
// Code to execute the spy object here
}, 1000); // Delay for 1 second (1000 milliseconds)
Again, the specific delay time may need to be adjusted based on the implementation details of the tooltip.