Forum Discussion

efuller's avatar
efuller
Occasional Contributor
7 years ago

Stop actions from being added to log

Hello Everyone, 

 

I'm creating a script to remove entered text from 6 separate fields and because of the nature of the test, I have to do this at least 5 times.

 

The script works as intended, but on the final log you see the following:

 

 

My question is, is there a way to omit those from being added into the log? It really does make it convoluted after several runs and takes away from the pertinent information the log is going to give. Ideally, I would still have a log entry that would say, "All field values have been reset to null"

 

Here is the code I'm using:

 

def ClearAccountRegistrationFields():
  Aliases.AccountRegistration_Page.AccountRegistration_Form.AccountRegistration_Fields.FirstName.FirstName_Field.SetText("")
  Aliases.AccountRegistration_Page.AccountRegistration_Form.AccountRegistration_Fields.LastName.LastName_Field.SetText("")
  Aliases.AccountRegistration_Page.AccountRegistration_Form.AccountRegistration_Fields.Email.Email_Field.SetText("")
  Aliases.AccountRegistration_Page.AccountRegistration_Form.AccountRegistration_Fields.ConfirmEmail.ConfirmEmail_Field.SetText("")
  Aliases.AccountRegistration_Page.AccountRegistration_Form.AccountRegistration_Fields.Password.Password_Field.SetText("")
  Aliases.AccountRegistration_Page.AccountRegistration_Form.AccountRegistration_Fields.ConfirmPassword.ConfirmPassword_Field.SetText("")

 

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Yup.... go to Tools | Current Project Properties | Playback... there's an option there that says, "Store last ___ events". 

     

    Right now it probably says 0.  Set that to some value like 10 or 20.  What this will do is will suppress all those "Event" messages except for the configured last few before any Warning or Error that is logged.  This way, you won't see all those unnecessary events but, when an Error or Warning is logged, you'll get events to show the last few steps that lead up to the error.