Hello Marc,
the webtest report noticed broken links and most of this broken links are *.jsp-files. But the files are working. So what's the matter ? Greetings Alex Date: Tue, 15 Apr 2008 21:41:01 +0200 From: Marc Guillemot <[EMAIL PROTECTED]> To: [email protected] Subject: Re: [Webtest] Test of JSP-pages Reply-To: [email protected] Reply-To: Marc Guillemot <[EMAIL PROTECTED]> Hi, why can't you do that? verifyLinks checks the links, no matter what the file extension of the targeted page is. Cheers, Marc. -- Blog: http://mguillem.wordpress.com Uhlig Alexander wrote: > Hi all, > > my problem is that I cannot check with verifyLinks homepages with the > ending *.jsp. Can anybody help me ? > > Thanks > > Alex > _______________________________________________ > WebTest mailing list > [email protected] > http://lists.canoo.com/mailman/listinfo/webtest > --__--__-- Message: 4 Date: Tue, 15 Apr 2008 21:45:25 +0200 From: Marc Guillemot <[EMAIL PROTECTED]> To: [email protected] Subject: Re: [Webtest] How to store the source code from a response page. Reply-To: [email protected] Reply-To: Marc Guillemot <[EMAIL PROTECTED]> If you get > Exception > groovy.lang.MissingMethodException > Message > No signature of method com.gargoylesoftware.htmlunit.xml.XmlPage.asXml() is > applicable for argument types: () values: {} this means that the content of your current page is not html but xml. Is it really what you expected? More generally, I doesn't make so much sense to validate the html generated by HtmlPage.asXml() as it is already the result of a parse operation with tag balancing, etc. It would make more sense to check the original response from the server that can be accessed with step.context.currentResponse.webResponse.contentAsString Cheers, Marc. -- Blog: http://mguillem.wordpress.com dariusch wrote: > Hi, > > if i use these code snippel: > > <groovy description="Store the html of the page"> > def document = step.context.currentResponse.asXml() > def props = step.getWebtestProperties( step.PROPERTY_TYPE_DYNAMIC ) > ; > props.putAt("htmlPage",document) > </groovy> > > i get this error message: > > Exception > groovy.lang.MissingMethodException > Message > No signature of method com.gargoylesoftware.htmlunit.xml.XmlPage.asXml() is > applicable for argument types: () values: {} > > Is htmlPage a dynamic property? I saw something here: > > http://www.nabble.com/getting-started-tt16373515.html#a16545352 > > But it dosen't work. > > Thanks, > Dariusch > > > > > > dariusch wrote: >> Hi, >> >> if i use value="#{htmlPage}", inside the inputField is the string >> #{htmlPage} and not the html code. >> >> so this solution dosen't work! >> >> Dariusch >> >> >> Florent Blondeau wrote: >>> Hi Dariusch, >>> >>> if i use these groovy steps, where are the html code, inside the document >>> property? >>> >>> Nope, it should be in the htmlPage property, so your code should be : >>> >>> <setInputField description='set textarea with feeds' >>> htmlId='fragment' >>> value="#{htmlPage}"/> >>> >>> Florent >>> >>> Pingwy >>> 27, rue des arènes >>> 49100 Angers >>> >>> >>> >>> dariusch a écrit : >>>> Hello, >>>> >>>> if i use these groovy steps, where are the html code, inside the >>>> document >>>> property? >>>> I will do this: >>>> >>>> groovy(description:"Store the html of the page",""" >>>> def document = step.context.currentResponse.asXml() >>>> def props = step.webtestProperties >>>> props.putAt("htmlPage",document) >>>> """) >>>> <invoke description="goto W3C page" >>>> url="http://validator.w3.org/#validate_by_input" /> >>>> <setInputField description='set textarea with feeds' >>>> htmlId='fragment' >>>> value="#{document}"/> >>>> <clickButton description="Submit the simple feedvalidation" >>>> xpath="//[EMAIL PROTECTED]'validate-by-input']//[EMAIL >>>> PROTECTED]'Check']"/> >>>> >>>> I think, to set the value inside setInputField over the #{document} is >>>> not >>>> correct. >>>> >>>> What is my mistake? >>>> >>>> Thanks, >>>> Dariusch >>>> >>>> >>>> >>>> Florent Blondeau wrote: >>>> >>>>> Hi Dariusch, >>>>> >>>>> You can get the html via a groovy step >>>>> >>>>> groovy(description:"Store the html of the page",""" >>>>> def document = >>>>> step.context.currentResponse.asXml() >>>>> def props = step.webtestProperties >>>>> props.putAt("htmlPage",document) >>>>> """) >>>>> >>>>> or >>>>> <groovy description="Store the html of the page"> >>>>> def document = >>>>> step.context.currentResponse.asXml() >>>>> def props = step.webtestProperties >>>>> props.putAt("htmlPage",document) >>>>> </groovy> >>>>> in a less groovy way... >>>>> >>>>> Then you have your html code (cleaned up with Tidy) in the htmlPage >>>>> property >>>>> >>>>> Hope that helps >>>>> >>>>> Florent >>>>> >>>>> Pingwy >>>>> 27, rue des arènes >>>>> 49100 Angers >>>>> >>>>> >>>>> >>>>> dariusch a écrit : >>>>> >>>>>> Hi, >>>>>> >>>>>> if i use storexpath with ='/', i get the text without the elements, >>>>>> but i >>>>>> need all. >>>>>> >>>>>> Someone has an idea? >>>>>> >>>>>> Dariusch >>>>>> >>>>>> >>>>>> dariusch wrote: >>>>>> >>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> i just want to store all source code from a response page. It is >>>>>>> possible >>>>>>> to do that (inside a variable)? I need this, because i will check >>>>>>> these >>>>>>> sources it is valid (the page is an rss-feed). >>>>>>> >>>>>>> Thanks >>>>>>> Dariusch >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>> >> > --__--__-- Message: 5 Date: Tue, 15 Apr 2008 21:46:47 +0200 From: Marc Guillemot <[EMAIL PROTECTED]> To: [email protected] Subject: Re: [Webtest] autorefresh vs. previousresponse Reply-To: [email protected] Reply-To: Marc Guillemot <[EMAIL PROTECTED]> Hi, I don't see why it should make such a difference. If you're able to reproduce the problem, please open an issue with the necessary information. Cheers, Marc. -- Blog: http://mguillem.wordpress.com Hesteric Roman - Together SK wrote: > Hi Marc, > > We are using previousresponse in macro-step "clickAllLinks" to > check if all our links in page "work" properly ... > > Macro looks like: > > . > . > . > > <repeat > xpath="//a[contains(@href,'ID=')][not(contains(@href,'ID=&'))][not(c > ontains(img/@src,'fk.gif'))] bla.. bla ... " counterName="curLink"> > <storeXPath xpath="$curLink" property="uri" /> > <invoke description="Click next link" url="#{uri}"/> > <not description="the word 'wurde in der Zwischenzeit' should > not appear in the page"> > <verifyText description="search for the problem, case > insensitiv" text="wurde in der Zwischenzeit" regex="false"/> > </not> > <previousresponse/> > </repeat> > > . > . > . > > After clicking and checking result, we use previousresponse to > navigate <Back> to root page and so on - and that is problem using > autorefresh, because in both cases we get various results because of > redirect based on response body, IMHO. > > > Roman. > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Marc Guillemot > Sent: Thursday, April 10, 2008 11:50 AM > To: [email protected] > Subject: Re: [Webtest] autorefresh vs. previousresponse > > Hi, > > at which place do you use previousResponse? Which page do you get in > both cases? > > Cheers, > Marc. --__--__-- Message: 6 Date: Tue, 15 Apr 2008 21:49:31 +0200 From: Marc Guillemot <[EMAIL PROTECTED]> To: [email protected] Subject: Re: [Webtest] DataDriven appears to lose the previously loaded page prior to its appearance Reply-To: [email protected] Reply-To: Marc Guillemot <[EMAIL PROTECTED]> at which place do you get this error message? What is <previousPage/>? Cheers, Marc. -- Blog: http://mguillem.wordpress.com George Policello wrote: > I forgot the error message. > > No current response available! Is previous invoke missing? > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of George Policello > Sent: Thursday, April 10, 2008 1:02 PM > To: [email protected] > Subject: [Webtest] DataDriven appears to lose the previously loaded page > prior to its appearance > > DataDriven appears to lose the previously loaded page prior to its > appearance. > > See the code below for accurate description of what I want to > accomplish. > > QUESTION: > ========= > How can the following goal be accomplished? > > GOAL: > ===== > * Read in a gateway page. > * Cycle through a list of XPaths that take me to lower and lower levels > of the Site. > * The XPaths should be externally stored (not in the test engine), and > have a destination Title and TitleRegex associated with each one. > > Current understanding: > ====================== > * Separate <webtest> blocks are independent. > * <dataDriven> works as below in the sense it reads the *.xls file just > fine. > * <dataDriven> does not have the previous file from the <invoke> > available once it starts. > * Putting in random <previousPage> tasks did not work. > > CODE > =========================================================== > <webtest name='Dig in Site: ${homePage}' > > <config haltonerror='false' haltonfailure='false' > > <option name='ThrowExceptionOnScriptError' value='false' /> > <option name='ThrowExceptionOnFailingStatusCode' value='false' /> > </config> > > <invoke url='${homePage}' description='Go to Gateway Page' /> > <verifyTitle text='MEdia' regex='true' /> > <!-- <previousPage/> --> > <dataDriven tableContainer="XPaths.xls" > > <!-- <previousPage/> --> > <clickLink xpath="${XPath}" description="Click to ${Title}" /> > <verifyTitle text="${TitleRegex}" regex='true' /> > </dataDriven> > > </webtest> > =========================================================== > > _______________________________________________ > WebTest mailing list > [email protected] > http://lists.canoo.com/mailman/listinfo/webtest > _______________________________________________ > WebTest mailing list > [email protected] > http://lists.canoo.com/mailman/listinfo/webtest > --__--__-- _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest End of WebTest Digest _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

