From: Mike B. <mb...@Ga...> - 2003-07-22 14:53:30
|
Alexei Goussev wrote: > I have a HtmlAnchor element on my page and invoke .click() method on > it. If there were no JavaScript, it would return a Page found by URL > from 'href' attribute. But there is a script > onclick="javascript: return confirm("Log Out ...?");" > that pops up a confirm dialog with 'yes' and 'no' buttuns. > What should i do to simulate a click on each of this buttons? Register a ConfirmHandler with the web client - see WebClient.setConfirmHandler(ConfirmHandler) > And how can i get a HtmlPage that appears after this click? Your initial call to HtmlAnchor.click() will return the new page if one was loaded or the current page if nothing new was loaded. -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |