Forum Discussion

David91's avatar
David91
Frequent Contributor
8 years ago

Keys method run other part test

Hi, this is incredible, but i have in test Keys method on object editText .. editText.Keys(param).. but i started test Keys method run dialog, which is in the script after it .. :O How is it possible?

 

The paste text then clicks the button and should jump after clicking the dialog, but the dialog pop up when you type using keys with variable TEXT. When I replace the TEXT in a string, it's OK and the dialog is displayed only when the button is pressed!

 

What am I doing wrong :(

 

 

function Test(TEXT)
{

   

for (var i=0; i<3; i++)
    {

    m_txtEdit.Keys(TEXT);

    m_button.ClickButton();

   if (Aliases.MessageBoxDialog.m_panel.VisibleOnScreen == true)
    {
    Dlg_Ano();
    }

}
 
 
}

7 Replies

    • baxatob's avatar
      baxatob
      Community Hero

      Not enough information.

       

      What is the value of TEXT variable, when you are facing this issue?
      How application works, if you do this test manually?

       

      • David91's avatar
        David91
        Frequent Contributor

        Simply.. If i call TEXT as variable, variable is string "0123456", so this function in Keys method run this object: Aliases.MessageBoxDialog.m_panel  why?

         

        function Test(TEXT)
        {

           

        for (var i=0; i<3; i++)
            {

            m_txtEdit.Keys(TEXT);

            m_button.ClickButton();

           if (Aliases.MessageBoxDialog.m_panel.VisibleOnScreen == true)
            {
            Dlg_Ano();
            }

        }

        }

         

        and if i write TEXT instead "0123456" so all is normal and ok ... this example..:

         

        function Test()
        {

           

        for (var i=0; i<3; i++)
            {

            m_txtEdit.Keys("0123456");

            m_button.ClickButton();

           if (Aliases.MessageBoxDialog.m_panel.VisibleOnScreen == true)
            {
            Dlg_Ano();
            }

        }

        }

         

        The problem is Keys method. I commented everything, and it was only with this that I had a pop up dialog Aliases.MessageBoxDialog.m_panel