Hi Marc
I got an exception, while testing your workaround....
[webtest] INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest:
R_1347.
[config] INFO (com.canoo.webtest.engine.Configuration) - Surfing with
browser Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)
[steps] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: steps
(1/3)
[invoke] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: invoke
(1/3)
[invoke] INFO (com.canoo.webtest.steps.request.AbstractTargetAction) -
-> gotoTarget by URL: config/index.asp
[invoke] INFO (com.canoo.webtest.steps.request.TargetHelper) - getting
response for url: http://<ip>/config/index.asp
[invoke] INFO (com.canoo.webtest.steps.request.TargetHelper) - Setting
password for username: Admin
[invoke] INFO (org.apache.commons.httpclient.HttpMethodBase) - Response
content length is not known
[invoke] INFO
(org.apache.commons.httpclient.auth.AuthChallengeProcessor) - basic
authentication scheme selected
[invoke] INFO (com.canoo.webtest.engine.Context) - Content of window
changed to http://<ip>/config/index.asp
[invoke] INFO (com.canoo.webtest.engine.Context) - Content loaded in
newly opened window, its content will become current response
[invoke] INFO (com.canoo.webtest.engine.Context) - Current form set to
none
[invoke] INFO (com.canoo.webtest.engine.Context) - Current response
now: http://<ip>/config/index.asp
[groovy] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: groovy
(2/3)
[groovy] INFO (com.canoo.webtest.extension.groovy.GroovyInvoker) - No
existing binding for this webtest, creating a new one
[groovy] ERROR (com.canoo.webtest.extension.groovy.GroovyInvoker) -
RuntimeException
[groovy] groovy.lang.MissingPropertyException: No such property:
webClient for class: com.canoo.webtest.extension.groovy.GroovyStep
[groovy] at
groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:730)
[groovy] at
org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java:727)
[groovy] at
org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:206)
[groovy] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:295)
[groovy] at Script1.run(Script1.groovy:2)
[groovy] at groovy.lang.GroovyShell.evaluate(GroovyShell.java:521)
[groovy] at groovy.lang.GroovyShell.evaluate(GroovyShell.java:496)
[groovy] at
com.canoo.webtest.extension.groovy.GroovyInvoker.doExecute(GroovyInvoker.java:40)
[groovy] at
com.canoo.webtest.extension.groovy.GroovyStep.doExecute(GroovyStep.java:27)
[groovy] at com.canoo.webtest.steps.Step.execute(Step.java:130)
[groovy] at org.apache.tools.ant.Task.perform(Task.java:364)
[groovy] at
com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:58)
[groovy] at
com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:39)
[groovy] at com.canoo.webtest.steps.Step.execute(Step.java:130)
[groovy] at org.apache.tools.ant.Task.perform(Task.java:364)
[groovy] at
com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:152)
[groovy] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[groovy] at org.apache.tools.ant.Task.perform(Task.java:364)
[groovy] at org.apache.tools.ant.Target.execute(Target.java:341)
[groovy] at
org.apache.tools.ant.Target.performTasks(Target.java:369)
[groovy] at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[groovy] at
org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[groovy] at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[groovy] at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[groovy] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[groovy] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[groovy] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[groovy] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
[groovy] INFO (com.canoo.webtest.steps.Step) - Running with: Canoo
Webtest: R_1347.
[groovy] INFO (com.canoo.webtest.steps.Step) - Exception thrown from
this class: com.canoo.webtest.engine.StepExecutionException
[groovy] INFO (com.canoo.webtest.steps.Step) - Message was: Error
invoking groovy: No such property: webClient for class:
com.canoo.webtest.extension.groovy.GroovyStep
Exception raised: com.canoo.webtest.engine.StepExecutionException: Error
invoking groovy: No such property: webClient for class:
com.canoo.webtest.extension.groovy.GroovyStep, Step: GroovyStep at
C:\myfiles\requirements\webtest\webtests\modules\Test.xml:25: with
(taskName="groovy")com.canoo.webtest.engine.StepExecutionException: Error
invoking groovy: No such property: fWebClient for class:
com.canoo.webtest.extension.groovy.GroovyStep, Step: GroovyStep at
C:\myfiles\requirements\webtest\webtests\modules\Test.xml:25: with
(taskName="groovy")
at
com.canoo.webtest.extension.groovy.GroovyInvoker.doExecute(GroovyInvoker.java:54)
at
com.canoo.webtest.extension.groovy.GroovyStep.doExecute(GroovyStep.java:27)
at com.canoo.webtest.steps.Step.execute(Step.java:130)
at org.apache.tools.ant.Task.perform(Task.java:364)
at
com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:58)
at
com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:39)
at com.canoo.webtest.steps.Step.execute(Step.java:130)
...
Marc Guillemot
<[EMAIL PROTECTED]
.fr> To
Sent by: [email protected]
[EMAIL PROTECTED] cc
ts.canoo.com
Subject
Re: [Webtest] How to clear cache of
16.06.2006 15:47 'Basic Authentication'?
Please respond to
[EMAIL PROTECTED]
oo.com
Hi Martin,
this is an interesting usecase, you should open an issue for that.
As a workaround, you can add following step before your 2nd <invoke>
<groovy>
step.webClient.credentialsProvider = new
com.gargoylesoftware.htmlunit.DefaultCredentialsProvider()
</groovy>
Marc.
--
View this message in context:
http://www.nabble.com/How-to-clear-cache-of-%27Basic-Authentication%27--t1798306.html#a4900750
Sent from the WebTest forum at Nabble.com.
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest