How to test a script link

"chensong" <[email protected]>
Newsgroups gmane.comp.web.httpunit.devel
Message-ID <[email protected]>
Hello all
  How to test a script link?

  E.g. I have a link like this 

  <a href='javascript:showadfeedback()'>welcome!</a>

  and also on this page, defined the function showadfeedback().

  But When trying to click it, but found the functionality are not executed.
Why and what should I do?


  Sample codes

  WebResponse wr = wc.getResponse(url);
  WebLink wl = wr.getFirstMatchingLink(WebLink.MATCH_CONTAINED_TEXT,
"showadfeedback");
  String result = wl.click().getText();
  ...


Thanks in advance!
Chens


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.