I am trying to use HtmlUnit for browsing automatically a site. I need to press some buttons in the process. First I build an HtmlAnchor object of a button with this xml:
<a href="dog.php">
<img src="http://images.hand.co.uk/Pic/site_images/hand/Myper/MyOrder/images/DogRed.gif" width="75" height="31" border="0" alt="1 adds"/>
</a>
which works fine when I click it using the click() method. I am then moved to another page in which I have link on which I need to click for the desired contents to appear. After the click I am not moved to another page and it is merely a Java script function firing.
this is the anchor for the second link:
<a style="color: black; font-weight: bold;" href="javascript:show_me('DogDetails.php?DogID=2445485', 2445485, 800);">
details
</a>
For both of those elements I am using the HtmlAnchor object with it's click() method. But that method is doing nothing at all for the second element.
I have also tried using the JavaScript Engine built in HtmlUnit, but had no success. how can I click this persistent link with the HtmlUnit platform?