Forum Discussion

AlexBorelli's avatar
AlexBorelli
Contributor
9 years ago

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...
  • AlexBorelli's avatar
    AlexBorelli
    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;