WinAppDriver
WinAppDriver copied to clipboard
Unable to click ListBox items which requires scrolling
I am automating WPF application where i need to click ListBox item(having telerik RadHyperlinkButton control) from a ListBox control. I am able to click items which are visible but WipApp driver is not clicking ListItems which requires scrolling to make ListItem to be visible, I am NOT getting any error but clicking is NOT happening
I used UIA automation framework from Microsoft. It is able to click the items which are NOT visible and even it is bringing list item to view/focus
It's supposed to scroll the item into view for you. @timotiusmargo is this something you can comment on?
Hi @GaneshMucherla,
Windows Application Driver should implicitly scroll any UI element which IsScrollItemPatternAvailable
attribute is set to true
into view when performing ElementClick command against it. Would you use inspect tool to verify that the element you located indeed has IsScrollItemPatternAvailable
attribute set to true
? If so, would you provide the log from the WinAppDriver.exe
command console log?
Hi, Previously I verified same with UIA automation, it was able to scroll and click, I have checked with QTP, it was able to click the element. But with WinAppDriver is giving problem
How big is the list, as i faced the same issue after 41st item i.e. it was not able to click on the 42 item, it was not able to click.
Hi @GaneshMucherla,
Please provide the WinAppDriver.exe console logs so we can look further.
Thanks
Hi I am facing weird issue. If the list item is the last item and another control is overlapping the list item then win app driver is not scrolling the element to view instead it is clicking the above element
It is wpf list item. I tried scroll but could not find scroll method to scroll wpf element. Pelase refer the attached screen shot. yellow highlight one is the list item to be selected instead it is selecting the blue highlighted list item looks like it is happening only in the edge condition where some area of list item is overlapping with other
I have pasted the win app driver exe log(patient name changed to PAT1, PAT1) below and attached the screenshot at the end
========================================== POST /session/154EC844-E84F-48F2-B2CD-77793F3AF06B/element/7.24172.57874634/element HTTP/1.1 Accept: application/json, image/png Content-Length: 42 Content-Type: application/json;charset=utf-8 Host: 127.0.0.1:4723
{"using":"name","value":"PAT1, PAT1"} HTTP/1.1 200 OK Content-Length: 102 Content-Type: application/json
{"sessionId":"154EC844-E84F-48F2-B2CD-77793F3AF06B","status":0,"value":{"ELEMENT":"7.24172.36216906"}}
========================================== GET /session/154EC844-E84F-48F2-B2CD-77793F3AF06B/element/7.24172.36216906/text HTTP/1.1 Accept: application/json, image/png Host: 127.0.0.1:4723
HTTP/1.1 200 OK Content-Length: 89 Content-Type: application/json
{"sessionId":"154EC844-E84F-48F2-B2CD-77793F3AF06B","status":0,"value":"PAT1, PAT1"}
========================================== POST /session/154EC844-E84F-48F2-B2CD-77793F3AF06B/element/7.24172.57874634/click HTTP/1.1 Accept: application/json, image/png Content-Length: 2 Content-Type: application/json;charset=utf-8 Host: 127.0.0.1:4723
{} HTTP/1.1 200 OK Content-Length: 63 Content-Type: application/json
{"sessionId":"154EC844-E84F-48F2-B2CD-77793F3AF06B","status":0} WinAppDriver-ListItemIssue.docx
Hi,
can anyone help i am facing a similar issue, on the desktop WPF application. Have also followed the above, to use inspect.exe and check the following parameter..
- IsScrollItemPatternAvailable=true
- IsScrollPatternAvailable=false If it's not expected, what can we do about it?
Trying to find an alternative to sendkey to press page down to 'scroll the page' so that the list item element can be captured..but failed to do so...
Any advice on this?