[Webtest] Re: Custom Step StoreEncodedXPath added to the community site

Marc Guillemot webtest@lists.canoo.com
Mon, 09 Aug 2004 14:41:29 +0200

as far as I understand, the extracted link will then be used in an <invoke ...>.
What with an additional "encodeUrl" attribute for <invoke ../>?

<storexpath stepid="Extract badly formatted link" xpath="//a[@id='x']/@href'" property="theUrl1"/>
<invoke url="#{theUrl1}" encodeUrl="true"/>


Roman Moukhine [ram] wrote:
> Hello everybody
> I have a suggestion.
> Either we should include this step instead of StoreXPath and provide respectivly <storeregex> (like original but with "enc" attribute)  or we should extract encoding in separate step. That could improve granularity and reusablity:
>  <storexpath stepid="Check for link" xpath="//a[@id='x']/@href'" property="theUrl1"/>
> <urlencode text="#{theUrl1}"  toproperty="urlencoded" /> <!-- store encoded into new property-->
> <urlencode text="#{theUrl1}"  toproperty="theUrl1" /> <!-- replace with urlencoded value-->
> best regards
> -ram
> ----- Original Message ----- 
> From: "Paul King" <paulk@asert.com.au>
> Newsgroups: gmane.comp.web.canoo.webtest
> Sent: Saturday, August 07, 2004 11:57 AM
> Subject: Custom Step StoreEncodedXPath added to the community site
>> From the description:
>>This custom step provides the same functionality as StoreXPath but 
>>URLEncodes the result of the XPath expression before storing it. This is 
>>useful if you are doing further processing with the stored XPath result 
>>in situations where lack of encoding (e.g. URLs containing spaces) may 
>>break subsequent usage. It helps mimic what most browsers are likely to 
>>do if given a URL.
>>This would be a good candidate to merge into the main distribution but I 
>>haven't had time to look into the details of writing the necessary 
>>tests. The same 'enc' attribute would also be useful for storeregex.
>>Cheers, Paul.Yzfj)b	b՞m7Xhm+-Ƨ(Ybا~y^
> st==