- Регистрация
- 17.10.2013
- Сообщения
- 218
- Благодарностей
- 50
- Баллы
- 28
Hi friends,
I tried to create some code, just simulate the mouse by pointing the link on the page, then click on it.
For example on this page: https://zennolab.com/discussion/search/765046/?q=FullEmulationMouseClick&o=date
Tried moving the mouse to the first search result then clicking on it but the code doesn't work. Any expert friend can fix this for me?
// clear cookie
instance.ClearCookie();
Tab tab = instance.MainTab;
if ((tab.IsVoid) || (tab.IsNull)) return -1;
if (tab.IsBusy) tab.WaitDownloading();
tab.Navigate("zennolab.com/discussion/search/765052/?q=FullEmulationMouseClick&o=date", "");
if (tab.IsBusy) tab.WaitDownloading();
HtmlElement he = instance.ActiveTab.FindElementByAttribute("a", "href", "https://zennolab\.com/discussion/threads/probuju-vzjat-cvet-pikselja\.92326/", "regexp", 0);
instance.ActiveTab.FullEmulationMouseMoveToHtmlElement(he);
System.Threading.Thread.Sleep(rnd.Next(6500, 12500));
instance.ActiveTab.FullEmulationMouseClick("left","click");
System.Threading.Thread.Sleep(rnd.Next(6500, 12500));
instance.ActiveTab.WaitDownloading();
Thank you so much!
I tried to create some code, just simulate the mouse by pointing the link on the page, then click on it.
For example on this page: https://zennolab.com/discussion/search/765046/?q=FullEmulationMouseClick&o=date
Tried moving the mouse to the first search result then clicking on it but the code doesn't work. Any expert friend can fix this for me?
// clear cookie
instance.ClearCookie();
Tab tab = instance.MainTab;
if ((tab.IsVoid) || (tab.IsNull)) return -1;
if (tab.IsBusy) tab.WaitDownloading();
tab.Navigate("zennolab.com/discussion/search/765052/?q=FullEmulationMouseClick&o=date", "");
if (tab.IsBusy) tab.WaitDownloading();
HtmlElement he = instance.ActiveTab.FindElementByAttribute("a", "href", "https://zennolab\.com/discussion/threads/probuju-vzjat-cvet-pikselja\.92326/", "regexp", 0);
instance.ActiveTab.FullEmulationMouseMoveToHtmlElement(he);
System.Threading.Thread.Sleep(rnd.Next(6500, 12500));
instance.ActiveTab.FullEmulationMouseClick("left","click");
System.Threading.Thread.Sleep(rnd.Next(6500, 12500));
instance.ActiveTab.WaitDownloading();
Thank you so much!
Вложения
-
379,8 КБ Просмотры: 72