rpaframework icon indicating copy to clipboard operation
rpaframework copied to clipboard

Windows library keyword `Get Window Elements` fails when using `elements_to_json=True`

Open mikahanninen opened this issue 3 years ago • 1 comments

*** Settings ***
Library           RPA.Desktop.Windows

*** Tasks ***
Minimal task
    Open Dialog    windowtitle=Processed    wildcard=True
    ${elements}=    Get Window Elements    element_json=True
    FOR    ${elem}    IN    @{elements}
        Log To Console    ${elem}
    END
    Log    Done.

Error message TypeError: Object of type WindowSpecification is not JSON serializable

mikahanninen avatar Oct 28 '21 13:10 mikahanninen

Any update to this bug, what priority level does it have, is it worth adding a conditional skip for WindowSpecification in the "write_element_info_as_json()"? I'm not too familiar with pywinauto. Is there a reason why WindowSpecification is needed, is it required to be parsed in order to manipulate the attributes of the window.

developer-iname avatar Apr 05 '22 12:04 developer-iname

Since RPA.Desktop.Windows got deprecated in favor to RPA.Windows, I guess that the new library can be used instead and this Issue discarded.

cmin764 avatar Apr 03 '23 09:04 cmin764