In case you have a TreeItemControl which has some entries in a lower level and you want to open it to process the lower level : how can this be done ?
As human I can Click on the “>” on the left side of the TreeItemControl but how can I do this with RPA ? the “>” is no extra element. A solution could be to Double Click but then I need an information if the TreeItemControl is already open otherwise I would close it.
In AccessibilityInsights you can see this as ExpandCollapseState in the ExpandCollapsePattern Action:
Maybe you can use Print Tree over that toggleable element itself, and if you receive any elements it means it is expanded already, otherwise is folded.
Another way is to be more creative and click the element (group), then pressing the RIGHT arrow key with Send Keys so it unfolds. (and even if is already unfolded, it will stay the same, just that the focus would move on the first inner element, which shouldn’t affect you)
If above fails, you can extend the library or play with the Windows element objects yourself by accessing the ${element.item.ExpandCollapsePattern()} object and running on it actions (which we haven’t implemented yet). If you’re confortable with Python, here’s how we’re doing it similarly with the Value pattern.
Hello!
I am comin back to the problem to make all groups visible.
I have seen the video but I have not seen the code.
I try to use the the 1st solution with send_keys RIGHT and DOWN but i get an error reported.
I have produced a robot which is written in Python using the RPA keywords. This robot fails by send_keys.
For informatio I send you the robot and log and the error message.
I will try as next zje solution to extend the library with my limited knowledge of this process. problem.zip (2.6 KB)