There are several ways to find if something is already on the screen, this article explains some of the options.
When you are recording a test against a Web application you may have to deal with a popup JavaScript confirm or alert box. This article describes the process for dealing with them.