I was wondering if I can use the
*storeLinkParameter*
with an xpath. It seems that only identifies elements through id

http://webtest.canoo.com/webtest/manual/storeLinkParameter.html

Thanks,

Hernan

2009/10/13 Hernan Castagnola <[email protected]>

> I need to check if some links in the site I am testing have the
> rel=nofollow attribute or not.
> This is how I am doing this:
>
>   storeXPath description:"Stores nofollow value" ,
> xpath:"//d...@id='home']/d...@class='column']/d...@class='block' and
> @id='c-185']/d...@class='cb']/d...@class='i1']/d...@class='i2']/h...@class='i3']/a/@rel",
> property:"rel"
>
>  verifyProperty name:"rel" , value:'nofollow'
>
>
> I am not sure why but the store xpath method is returning the following
> error:
>
> No match for xpath expression
> <//d...@id='home']/d...@class='column']/d...@class='block' and
> @id='c-185']/d...@class='cb']/d...@class='i1']/d...@class='i2']/h...@class='i3']/a/@rel>
>
> How ever when I check it with the xpather
> "//d...@id='home']/d...@class='column']/d...@class='block' and
> @id='c-185']/d...@class='cb']/d...@class='i1']/d...@class='i2']/h...@class='i3']/a"
> it finds the element.
>
> I have been following some 2007 therads about this and it seems they solved
> it adding an id to the element, but I can't do that.
>
> Another theory was that it was failing because there is no rel attribute
> for that link. So I thought that the webtest instead of setting the property
> to null (when the property is not present) it was returning a fail. I tried
> with the href attribute and it also failed. So it has nothing to do that the
> rel attribute is not set for that element. Is something with the xpath.
>
> Does anyone has any idea how can I solve this issue. Is this a webtest bug?
>
>
> Thanks in advance.
>
> Hernan
>
>

Reply via email to