« Return to Thread: using option step in groovy syntax

Re: using option step in groovy syntax

by aldana :: Rate this Message:

Reply to Author | View in Thread

I had a look at the test superclass and indeed there is no option() method available (in contrast to config() and webtest()).

never the less following fails also (it does not know the option tag):
def ant=createAntBuilder()
ant.option(....)

I hope I don't need to import the taskdef explicitly with length yucky ant lib loading code... Is there a reason why WebtestCase does not offer an option() method?

aldana wrote:
hi,

I am playing around with webtest and first impressions are very good. but several pages are making problems with JS-errors so I want to set js-exception detection switched off (see http://webtest.canoo.com/webtest/manual/option.html).

I tried following but webtest gives me exception when while executing the option step, what is the correct way to use the option step in groovy:

class FirstWebTest extends WebtestCase {

  void testLogin() {
    //fails
    option name: "ThrowExceptionOnScriptError", value: "false"

    webtest("My first test") {
      group(description: "login to xxx") {
         //... test steps        
      }
    }
  }
}

thanks
manuel aldana
aldana((at))gmx.de
software-engineering blog: http://www.aldana-online.de

 « Return to Thread: using option step in groovy syntax