So I still think there has to be a better way, but I got it working.
The problem is that XPath in this app is meaningless, and as far as I can tell, I don’t think I can search with two locators at the same time (e.g., control type = Control.TreeItem and name = “xyz”. Instead, I pull back the list of children which includes bitmaps, buttons etc., and find the text in the list that I’m looking for.
There are a dozen ways to proceed from there, but I didn’t want to code an infrastructure based on this particular apps design (which other than as a user, I have no access to) so I just wanted to double click on an item to open it, then process the list it contains
But as I said above, double-click won’t scroll the item into view. Several of the resources you indicated imply that the object in the app may not have “scrollable” enabled for that action type. Whatever. I needed to get it on screen.
“Click” as it turns out DOES scroll. But findElement returns the text, not the control. So “clicking” goes into text edit mode. Argh!
So the incantation is 1. click the item to scroll it into view, 2. find some other thing to click on that isn’t text but is visible, 3. double click on the thing I clicked on before.
Unfortunately, there is something wonky about retrieving the “last” thing I clicked on, possibly because the search space changes each time I click and do findElement.
But it was close enough. I tell it to click on the WindowsTestObject that I supposedly just clicked on, and though it doesn’t find it, it DOES jump back a seemingly number of random “rows” which has the desired affect (hmmmm, wonder if its a “focus” thing?).
Then double-click works. Its slow as molasses but I managed to navigate an entire tree structure.
Not sure if this is WinAppDrv, Katalon, my wierd app, or a delightful combination of all three.
But I did it. It works. I’m on a deadline but when I get a chance I’ll try posting some code and maybe someonoe might be so kind as to take a gander and tell me what I’m doing not quite as right as I could.
Thanks again! The pointers were invaluable!
Jim