views:

92

answers:

2

I am using the headless browser provide by HtmlUnit

I have loaded a webpage in a webClient. Now I want to generate mulitple impressions on a hyperlink (on the loaded webpage) just like we hover our mouse cursor on a link various times on a link in a webpage in a real web browser.

How can I do that through HtmlUnit?

+1  A: 

Hovering the mouse cursor on a hyperlink does not generate an impression.

  • Clicking it generates an impression on the page to which it leads.
  • Loading the link generates an impression for it (if it is an advertisement-link)

So, respectively:

  • click the link with HtmlUnit and reload the target page multiple times
  • reload the current page multiple times
Bozho
It is an advertisement link. It will be counted for CPM (Click Per Mile) or CPI(Click per Impression). So I want to create those thousand impression through htmlunit.
Yatendra Goel
this is 100% fraud and do NOT do it.
Bozho
Actually this will be a fraud if use for generating money. But my intention is not that. Actually, I want to test myself against the search engines' capability of invalid clicks detection techniques. I have read a lot about those techniques and now want to test them... If I succeed in passing those techniques, then I will present those holes to the search engine companies which they haven't explored yet.... I know this will be very challenging but nothing is impossible. Everything is achievable.
Yatendra Goel
ok, then my advice in the answer are plausible. They should work for you, shouldn't they?
Bozho
A: 

You can try using the TestPlan frontend for HTMLUnit which makes this type of thing quite easy.

For example:

while is true
  GotoURL http://somepage.com/
  Click link:Buy Me!
end

Then just let it run until you have enough clicks. :)

edA-qa mort-ora-y