drag and drop methods

spyder

Client
Регистрация
19.10.2014
Сообщения
27
Благодарностей
1
Баллы
3
i am trying to use DragDrop methods to pass a slider cerification(as picture below:-)
it needs to drag the button from left to right.
so i use the DragDrop method.
when i use DragDrop method (from API), the button moves only about 15px, but not the whole left to right.

as far as i know, it shoud drag the button from the left side to the right side, then drop the button.

my question is:
for my condition, are the dropHe and dragHe the same element ?

thank you so much

78157

C#:
// find element fo drop event
HtmlElement dropHe = instance.ActiveTab.FindElementById("some_id");
// if element is exist
if (!dropHe.IsVoid)
{
    // find element for drap event
    HtmlElement dragHe = instance.ActiveTab.FindElementById("any_id");
    // if element is exist
    if (!dragHe.IsVoid)
    {
        // rise drag and drop events
        // drop dropHe (rise event in position x = 10, y = 30) to the specified place (50, 50)
        dragHe.DragDrop(dropHe, 10, 30, 50, 50);
    }
}
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Use default zenno blocks, if You feel fragile at c#
Here You can see what parameters are required.
78162
 

papa-rico

Client
Регистрация
15.11.2020
Сообщения
151
Благодарностей
8
Баллы
18
Hello how can i do this which blocks to use ?
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113

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