WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

<WindowsElement>.GetAttribute failing/returning empty string for Table attribute

Open VijayIyer opened this issue 7 years ago • 6 comments

Scenario is to find a cell using row and column properties. In inspect tool , we are trying to accomplish this by reading Column header name of a cell. In the inspect tool this attribute is shown as "Table.ItemColumnHeaderItems" and value is in the format - "" headeritem. When trying to read this value using getattribute method , the value returned is null or empty string . WinAppDriverTableProperty

VijayIyer avatar Jun 04 '19 09:06 VijayIyer

Hi @VijayIyer,

Could you try pasting the C# snippet as well as the WinAppDriver.exe console logs when you attempt this?

hassanuz avatar Jun 11 '19 19:06 hassanuz

@hassanuz I'm currently seeing this issue as well. After adding a HeadingLevel property which is visible using Inspect.exe, GetAttribute("HeadingLevel") returns null. Happy to provide logs to assist.

DhiMalo avatar Jul 22 '19 20:07 DhiMalo

@hassanuz , sorry for the late reply. Actually , because the getattribute wasn't working we had to remove it from our code. But I will surely try and get back. Only problem is I can show where it is failing in debug mode, but I do not know where the 'logs' are. I can see a console window when WinAppDriver is running. Is that what you are referring to?

VijayIyer avatar Jul 23 '19 06:07 VijayIyer

@hassanuz here is the console log for that step. GET /session/18DF77E1-DEBD-4281-8593-7CD482E19D3F/element/7.36568.23884825/attribute/Table.ItemColumnHeaderItems HTTP/1.1 Accept: application/json, image/png Cache-Control: no-cache Host: 127.0.0.1:4723 User-Agent: selenium/3.11.0 (.net windows)

HTTP/1.1 200 OK Content-Length: 76 Content-Type: application/json

{"sessionId":"18DF77E1-DEBD-4281-8593-7CD482E19D3F","status":0,"value":null}

VijayIyer avatar Sep 10 '19 19:09 VijayIyer

I'm interested in this being fixed as well. Being able to get the Table.ItemColumnHeaderItems would make it much easier to find the correct cell within a row.

As it stands, the header row is searched to find the index of the column. Then, the index is used to get the correct cell. Not a terrible workaround, but just extra searching.

PatrickStevens avatar Feb 28 '20 21:02 PatrickStevens

@PatrickStevens this is also workaround for my problem.

Can we somehow help fixing this?

When i access this endpoint:

http://127.0.0.1:4723/session/1D38DB3B-0BEC-426A-AE48-138213C81A68/element/0c49c61a-76fc-4fe7-b2a4-e6c5986d1232/attribute/Value.Value

I recieve the following response: {"sessionId":"1D38DB3B-0BEC-426A-AE48-138213C81A68","status":0,"value":null}

But the value is present in the Inspect tool.

frogec avatar Mar 03 '20 12:03 frogec