Stop actions from being added to log
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("")
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.
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider