Java and Selenium for web form filling?

一曲冷凌霜 提交于 2019-11-29 17:09:52

You can't do this reliably in Selenium IDE. The real way to do this is to use Java + Selenium WebDriver, where things get pretty easy:

// acquire text
if (acquire.equals("congratulations")) {
    sendMail("Something, tada badum tss!");
} else {
    driver.findElement(By.id("myButton")).click();
}

The mail sending part can be done in thousands of ways and depends on how you want to do it. The basic point where to start is the JavaMail Webpage. If you're uncomfortable with it, you may also look at the most common wrappers for it: Apache Commons Email and Jodd.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!