How to find one element inside the other?
gcscript opened this issue · 1 comments
gcscript commented
I have the following code:
var w = wnd.find(-5, "CP-Pro Mais", "TfrmCProc");
var e = w.Elm["WINDOW", prop: "class=TfrmAcompanhamento"].Find(-5);
var f = e.Elm["BUTTON", "Incluir", "class=TPLKButton"].Find(-5);
f.MouseClick();
the "F" element is inside the "E" element
What's the correct way to do this?
qgindi commented
I did not test the code, but probably need to remove , "class=TPLKButton"
because it has no sense and probably causes exception.
Another way - use path. In the tool window select one element, check "Add to path", then do the same for other element. It creates code like
var e = w.Elm["element1"]["element2"].Find(1);