-2

any way to make a double click at div by id?

<div id="item99900_3077996_51355704"></div>

There are a event at page for dblclick, so if i click by mouse all work's fine, but how can i click with webbrowser. I even tryed to inject javascript codes and nothing happens.

browser.Document.GetElementById("item99900_3077996_51355712").InvokeMember("click");
browser.Document.GetElementById("item99900_3077996_51355712").InvokeMember("click");

This don't work 2. Thanks for any reply.

2 Answers2

0

untested, but i think you need to make it time based, as they happen to quickly

browser.Document.GetElementById("item99900_3077996_51355712").InvokeMember("click");
Thread.Sleep(200) //sleep 200 milliseconds
browser.Document.GetElementById("item99900_3077996_51355712").InvokeMember("click");
Suing
  • 465
  • 4
  • 9
0

You should try to invoke ondblclick event, not click event.

Community
  • 1
  • 1
piotrwest
  • 2,098
  • 23
  • 35
  • yeap, that works, but only at test environment. Where i need it, it's do nothing. What can it be? – user3893639 Jul 31 '14 at 19:28
  • @user3893639 Are you sure you have refreshed your web browser cache? Try refreshing the site with Ctrl+F5. If it's not working on production environment, maybe minification of js files spoils something? – piotrwest Aug 01 '14 at 05:43