Closed
Description
I want to drag and drop a div which you can scroll it to right direction on a horizontal bar however i guess reaching methods below is not possible in SeleniumBase SB format
SeleniumBase SB format
with SB(uc=True, test=True) as sb:
sb.gui_hover_element("div.moving-div", 0.5)
rect = sb.get_gui_element_rect("div.bar-of-moving-div")
sb.gui_drag_drop_points(rect["x"] + 10, rect["y"], rect["x"] + 180, rect["y"])
Sample below works like a charm however i need to specify x, y to limit drop point instead of drop selector in SB Format
Sample
import time
from seleniumbase import SB
with SB(uc=True, test=True) as sb:
sb.activate_cdp_mode("https://www.w3schools.com/html/html5_draganddrop.asp")
sb.wait_for_element_visible("#img1")
sb.drag_and_drop("#img1", "#div2")
time.sleep(2)
Is there any way to do it?
Thanks all you have done for community