Open dsa45632 opened 11 months ago
This endpoint actually emulates the vertical or horizontal rotation of the mouse wheel. So, make sure you can scroll the given element at the given coordinate manually. Also verify if it needs to have the focus to be able to scroll.
I have tried that but It did not work, is there any examples I can refer too please?
What if you increase deltaY by multiplying it to 120
?
The documentation to this API says
If dwFlags contains MOUSEEVENTF_WHEEL, then mouseData specifies the amount of wheel movement. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user. One wheel click is defined as WHEEL_DELTA, which is 120.
I have the same issue. I've tried to increase deltaY by multiplying it to 120 without success. My test PASS but no scrolling.
def windows_scrolling(locator):
# Get the Appium driver instance
appium_lib = BuiltIn().get_library_instance('AppiumLibrary')
driver = appium_lib._current_application()
# Find the element
element = locator_to_element(locator, driver)
# Get the element's coordinates
x = element.location['x']
y = element.location['y']
# Log the coordinates
BuiltIn().log(f"Scrolling to the element at coordinates ({x}, {y})")
# Scroll down
driver.execute_script('windows: scroll', {'x': x, 'y': y, 'deltaY': -360})
Appium windows driver : 2.12.16
Any suggestions ?
Warning: I am following this to make scrolling on the page https://github.com/appium/appium-windows-driver#windows-scroll. But whatever I do I keep getting unknown server-side issues, I am just trying to scroll down and up on the page . I see element id or x and y coordinates must be provided but If I am doing scrolling through the page I believe I don't need those coordinates right? anyway if I do I still get an issue. Here is my logic
1- Map<String, Object> params = new HashMap<>(); // // params.put("elementId", startElementId); params.put("x", 100); params.put("y", 100);
if I put element id there and take off x and y coordinates I still get issues , I tried to put ms duration time as well but that does not change anything still same issue, Any suggestions please?