I wanted to fill a web form automatically. I used Selenium IDE to create a script which ENDS with a command that searches for the specified text in the webpage.
I wanted to take action based on this TEXT. If text = congratulations, then send an e-mail to some address. If not, then click ok button. I don't think the Selenium IDE can do this If-else logic and send mail on its own (Using if / else in selenium ide).
So, I thought of using Java code to "run" this Selenium HTML script, find out if the desired text was found or not - if yes then send mail; otherwise the Java code will "click" the ok button.
Does this approach make sense? Is it possible to do this using Java and some kind of Selenium Java API?