Hello
I use VBA with Seleniumbasic on my Windows 10 system.
I log in to a website where I have an account and surf to a page where my personal data is stored, which can have many web elements.
To sort that data, I created a piece of code that puts the web elements in the correct order. This code works correctly but only if the element needs to be moved within the screen. For example, if a web element has to move 30 places, it doesn't work because this element is off screen. The web page scrolls down but does not move the web element.
As long as X1 < 14 then it works, element 15 is at the bottom, just out of view
Can anyone help me with this?

Sub TestVidsVerplaatsen()                                                                                                
Dim TelBy As Integer
Dim by As New selenium.by
Dim elePak As WebElement, elePlak As WebElement
Dim bot As New selenium.ChromeDriver
Dim X As Integer, X1 as Integer

With bot
    '.AddArgument ("headless")                                                                                         
    .AddArgument "window-size=1920,1080"
    Url = MyURL                                                                     
    .Get Url
    DoEvents
    
     .FindElementByXPath("/html/body/app-root/app-marketing/app-login/div/div/div/form/section/div[1]/div/div/input").SendKeys (MyMail)
    .FindElementByXPath("/html/body/app-root/app-marketing/app-login/div/div/div/form/section/div[2]/div/div/input").SendKeys (MyPass)
    .FindElementByXPath("/html/body/app-root/app-marketing/app-login/div/div/div/form/section/div[3]/div/button").submit
                                                                                                                        
    TelBy = 0
    Do
       TelBy = TelBy + 1
       .Wait (20)
       DoEvents
    Loop Until TelBy = 100 Or .IsElementPresent(by.XPath("/html/body/app-root/app-dashboard/div[2]/app-breadcrumb/div/div/div/div/div"))
                                                                                                                       
    .Get URLmyDATA
    
    X = 2     'Example: x = position of the element to be moved
    X1 = 8   'Example: x1 = position to move it to
    
    
    Set elePak = .FindElementByXPath("/html/body/div[5]/div[3]/div/div/ul/li[" & X & "]")
    Set elePlak = .FindElementByXPath("/html/body/div[5]/div[3]/div/div/ul/li[" & X1 & "]")
    
    .actions.DragAndDrop(elePak, elePlak).ClickAndHold.Perform
    .actions.Release(elePak).Perform
    DoEvents
    .FindElementByXPath("/html/body/div[5]/div[3]/div/button").Click              'confirm
    .Quit
End With
End Sub