FullEmulationMouseMoveToHtmlElement()

  • Автор темы Автор темы sowe
  • Дата начала Дата начала

sowe

Новичок
Регистрация
22.10.2020
Сообщения
19
Реакции
0
Баллы
1
Hey!

I've been trying to move the mouse to a certain HTML element which definitely exists in the DOM (double checked it with SendInfoLog (HtmlText)). The cursor starts moving, but stops when reached bottom of the site - he needs to scroll to reach the right element.

EDIT: There is also a mysterious thing happening: Sometimes the "Cursor" is moving slowly to the bottom of the page (where he stops), and sometimes the cursor just appears at the bottom position.

Do I miss something here?

Best regards,
 
EDIT2: For HTMLElements which are visible (no scrolling necessary) it works like a charm - but as soon as the element is not in the "visible area", the function just moves to the bottom of the browser and stops. Are there any best practices for that case?
 
Does not seem there is any problems: https://i.imgur.com/mT38CXS.gif
Yes, sometimes it first moves to the end of the page and then moves back over the exact element.
Maybe that's some particular page case only?
 
Yes, I think so - there might be an issue with the resolution at all. I've also tried to place the cursor first to a bit lower position, since there is a "sticky header" on the site - but this doesn't work either.

Do you have any suggestions?
 
Yes, I think so - there might be an issue with the resolution at all. I've also tried to place the cursor first to a bit lower position, since there is a "sticky header" on the site - but this doesn't work either.

Do you have any suggestions?

First, have to get clear if that's a particular page problem, or maybe you use some wrong code.
Would You mind posting the page URL and what element you want to click. ?
 
Finally figured it out. I am using htmlElement.ScrollIntoView() first and afterwards FullEmulation...

Thanks anyway!
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)