|
[HtmlUnit] [ htmlunit-Bugs-1459701 ] click method does not work for Clickab: msg#00069java.htmlunit.devel
Bugs item #1459701, was opened at 2006-03-28 02:15 Message generated for change (Comment added) made by mguillem You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1459701&group_id=47038 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Invalid Priority: 5 Submitted By: hiren (hiren21) Assigned to: Nobody/Anonymous (nobody) Summary: click method does not work for ClickableElement/HtmlDivision Initial Comment: Hello, I have this small piece of code which basically grabs the HtmlDivision object from the page source and clicks it. However it does not do anything when I try to execute it. Any ideas? Page Source: <div id="controls"> <div id="nextlink" class="pri-r pri-arrow-right"><a id="nextlinka" class="photocontrol" href="javascript:void(0)" onclick="return handleNextSlide()" title="Next Slide"> </a></div> <div id="prevlink" class="pri-r pri-arrow-left"><a id="prevlinka" class="photocontrol" href="javascript:void(0)" onclick="return handlePrevSlide()" title="Previous Slide"> </a></div> <div id="playlink" class="pri-r"><a href="javascript:void(0)" onclick="return handlePlay ()" title="Play Slideshow">Play</a></div> <div id="pauselink" class="sec-r"><a href="javascript:void(0)" onclick="return handlePause ()" title="Pause Slideshow">Pause</a></div> </div> Code: HtmlPage slideShowPage = ( HtmlPage ) signinForm.submit (); assertEquals( "Kodakgallery.com Slideshow", slideShowPage.getTitleText() ); System.out.println( "Slideshow Loaded" ); ClickableElement nextPhotoLink = (ClickableElement) slideShowPage.getHtmlElementById( "nextlink"); for(int i=1; i<6; i++ ){ System.out.println( "Slideshow Page:" +i ); slideShowPage = ( HtmlPage )nextPhotoLink.click (); nextPhotoLink = (ClickableElement) slideShowPage.getHtmlElementById( "nextlink"); } thanks, Hiren ---------------------------------------------------------------------- >Comment By: Marc Guillemot (mguillem) Date: 2006-03-28 09:20 Message: Logged In: YES user_id=402164 Your test clicks 5 times on the div with id nextlink. As this div doesn't have any onclick handler nothing happens. You probably want to click on the link contained in the div, in which case you have to to it! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1459701&group_id=47038 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [HtmlUnit] [ htmlunit-Bugs-1459704 ] adEventListener method not recognized by JS engine, SourceForge.net |
|---|---|
| Next by Date: | [HtmlUnit] [ htmlunit-Bugs-1459704 ] addEventListener method not recognized by JS engine, SourceForge.net |
| Previous by Thread: | [HtmlUnit] [ htmlunit-Bugs-1459701 ] click method does not work for ClickableElement/HtmlDivision, SourceForge.net |
| Next by Thread: | [HtmlUnit] [ htmlunit-Bugs-1459704 ] addEventListener method not recognized by JS engine, SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |