Using Java you can use the framework Selenium. After writing a script, it opens the browser and "has a life of its own".
At first, Selenium is a framework for testing web graphical user interface, but nothing prevents you from using it to automate tasks.
On the blog of Dyego Costa and has the following example of how to use Selenium, to get an idea of how easy it is. In the example he does a google search:
[TestMethod]
public void MeuTesteSuperMassaSoQueNao()
{
// Usando o firefox
IWebDriver driver = new FirefoxDriver();
// acessa a página do google
driver.Navigate().GoToUrl("http://www.google.com/");
// Vai no campo de busca, escreve "Cheese" e aperta enter
IWebElement query = driver.FindElement(By.Name("q"));
query.SendKeys("Cheese");
query.Submit();
// Configura um timeout
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
// Espera até o título da página tiver cheese, tá pronto (ou o timeout acontencer)
wait.Until((d) => { return d.Title.ToLower().StartsWith("cheese"); });
// Essa parte é o teste - pode ignorar, já que tu não quer testar nada
driver.Title.Should().Contain("cheese");
// fecha o browser
driver.Quit();
}
If you prefer ruby, the watir is very simple and yummy to use.
Thank you, I’ll take a look at this, as soon as possible I give the feedback.
– Killer
@rodrigokiller the orders
– fotanus
as I am testing Lua, I will test http://luaselenium.sourceforge.net/ which seems to be the Selenium client for Lua.
– Killer
@Rodrigokiller cool, I gave a wanted and had not found :-)
– fotanus