Marc Guillemot wrote:
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"/>
All the use cases we have at the moment involve <invoke> or
<invokeRelative> (custom step yet to be posted). However, it is also
potentially useful for other tasks like <sethiddenfield> or scripting
(<scriptStep> is also yet to be posted).
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-->