Forum Discussion

Al2's avatar
Al2
Occasional Contributor
5 years ago
Solved

Unknown reason for errors in the logs while filling out the userform

Hello,

 

I'm using a user form to configure some tests and then run it. It works just fine, but I keep getting this error in the test logs. Could anyone please point to what seems to be wrong or what might be causing this error? 

 

 

Here's the snippet I have used for accepting the values in the cxUserName field.

 

//Username validation
function cxUserName_OnChange(Sender)
{
Project.Variables.LOGON_ID = Userform.cxUserName.Text;

}

 

Thank you

Al2

  • Hi,

     

    It is my guess that OnChange event is triggered too often (for example, for every keypress).

    Is it really necessary to (re)assign the value to the project variable for every change in the text field? Why not to do all required assignments on form close when user completed all settings and is ready to proceed?

     

2 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    It is my guess that OnChange event is triggered too often (for example, for every keypress).

    Is it really necessary to (re)assign the value to the project variable for every change in the text field? Why not to do all required assignments on form close when user completed all settings and is ready to proceed?

     

    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Alex, thank you for your advice!

      Al2 Have you tried following it? What is your result?