package com.zuehlke.cap.example.groovywebtest;
import com.canoo.webtest.WebtestCase
class TestGroovyWebTest extends WebtestCase {
public TestGroovyWebTest() {
super();
if(ant == null)
createAntBuilder()
ant.setproxy(
proxyhost:"proxy.mycompany.com",
proxyport:8080,
nonproxyhosts:"localhost|127.0.0.1|*.mycompany.com")
}
void testWebtestOnGoogle() {
webtest("check that WebTest is Google's top 'WebTest' result") {
invoke "http://www.google.com/ncr", description: "Go to Google (in English)"
verifyTitle "Google"
setInputField name: "q", value: "WebTest"
clickButton "I'm Feeling Lucky"
verifyTitle "Canoo WebTest"
}
}
}