There is a link on a html page with the following text
<Html>
...
<script type="text/JavaScript">
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function hide() {
createCookie("ABC","1","7");
document.location='abc.php';
}
</script>
<a style="color:#000;" rel="nofollow" href="abc.php?x=1" onclick="hide();return false;">My Link</a>
...
How to use Java to simulate a html "My Link" click ?