Windows 10 desktop UWP app scroll issue
I have a Windows 10 UWP app running on my desktop. It have a list with a group and the group have many items. How can I simulate the scroll up and down of my mouse. I want to get the last element of the list group into view.
couple thoughts, do either of these work for you?
- search for all elements in group and send a click to the last one. A click on an element will implicitly scroll the element into view.
- use /session/:sessionId/touch/scroll to scroll to bottom
Suggested point # 2 didn't worked for me. I tried it and nothing happened. As a workaround I am right clicking the first element and then pressing the right arrow via Actions as many times as there are number of elements. That way the focus is shifting to next element with each right click. The elements are lazy loaded and as I scroll via right arrow action the new elements should be discoverable in Appium via FindElementByXPath but that doesn't happen.
Hi @rameghwa,
Can you please try the following test scenario below? https://github.com/Microsoft/WinAppDriver/blob/v1.0-RC/Tests/WebDriverAPI/TouchScroll.cs#L87
This sample demonstrate the use of /session/:sessionId/touch/scroll discussed above.
@timotiusmargo UWP on desktop does not have touch. I am having similar issue as described here https://github.com/Microsoft/WinAppDriver/issues/279 This should not be closed
Hi @db-007,
UWP on desktop should support touch input. Would you try the test scenario included in our test suite below? https://github.com/Microsoft/WinAppDriver/blob/v1.0-RC/Tests/WebDriverAPI/TouchScroll.cs#L87
Hi @timotiusmargo
I tried to use the example given above in C# and get a similar one in Java. I tried to use the TouchActions in Selenium-Java to scroll.
Below is the code used.
TouchActions touchActions = new TouchActions(driver);
touchActions.scroll(100, 0);
However, I get the below error. I'm using the latest version of Windows App Driver
Jan 11, 2018 11:21:08 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
java.lang.ClassCastException: io.appium.java_client.windows.WindowsDriver cannot be cast to org.openqa.selenium.interactions.HasTouchScreen
at org.openqa.selenium.interactions.touch.TouchActions.<init>(TouchActions.java:38)
at businessComponents.ContractPageComponents.createNewContract(ContractPageComponents.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at runners.ParallelRunner.run(ParallelRunner.java:48)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Can you please solve the issue with selenium-java?
Hi @ravimidathala,
It looks like the issue you encounter is coming from the local client side (selenium-java). You should raise this issue in their GitHub repository instead for the right community to respond. They may also be able to suggest a workaround that will generate the right JSON wire protocol command to the Windows Application Driver on the remote end.
Can anybody provide inputs in above issue , even i am also facing the same issue using selenium java?