Hi, 

I'm trying to test all the links on the page by using javascript in
scriptstep.
I need to find all the links on the page. I wanted to use document.links[]
but this didn't work.
<verifylinks> is not good, while error is not rusulting in missing page but
wrong content.
I also cannot use xpath, while pages are not xhtml (legacy aplication)

What I need to do is to find all the links on the page, clicklink it, chcek
for conntent (some text), 
get back and check next link.

I tried to use somethnig like this


<scriptStep description="find all links on the page"
language="javascript"><![CDATA[

    step.setWebtestProperty('link',document.links[1]);
        
]]></scriptStep>
<clicklink      description="link to follow" href="#{link}"/>
<verifyText  description="Error text must be present" text="sometext" />
<previousresponse/>


This results in Error

Error invoking script: org.mozilla.javascript.EcmaError: TypeError: Cannot
read property "1.0" from undefined

Thanks for hlep.
-- 
View this message in context: 
http://www.nabble.com/scriptstep-issue-with-document-object-tf4261501.html#a12127165
Sent from the WebTest mailing list archive at Nabble.com.

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to