AlexBorelli
9 years agoContributor
Problem seach object
I have two object. This objects have name equal, but In the NameMapping these objects have differents names. The names of object are dinamics. Example: When I open the windows name is: "Padrao...
- 9 years ago
Instead of using the object name directly, go up the mapping tree and find where the two objects are different, then use that object with FindChild to get to the name you want.
https://support.smartbear.com/viewarticle/80676/
If the name is changing each time, you may need to map it with a wildcard.
https://support.smartbear.com/screencasts/testcomplete/wildcard-dynamic-property-in-testcomplete/
- 9 years ago
Thank you Marcha.
The problem was solved with FindChield.
procedure producao_por_item_acabado; var vezes; begin for vezes := 1 to 4 do if not (Aliases.control.FindChild('ClassName', 'TPadraoJanelaDinamica').Exists) then begin Aliases.control.Principal.Keys('~m'); Aliases.control.Principal.PopupMenu.Click('[7]'); Aliases.control.Principal.PopupMenu.Click('[3]'); Log.Message('Essa é a ' + IntToStr(vezes) + 'ª tentativa de acesso ao menu.') end else end;