Guidance on continuous test (loop) and collecting information along the way #2420
-
First of all, heartfelt thank you to Michael for this amazing automation framework, additionally the community behind it. I'm humbly looking for some guidance or direction - I'm very familiar with scripting in powershell (please don't judge me for that :) ), but recently picked up python and ported my code over in order to take advantage of seleniumbase and pytest, specifically because of UC mode capabilities required to successfully test what I need. Trying to be brief and general --- I have a use case where I want to:
I have this code working perfectly with regular python. With an an endless loop, I check this page, do something when new objects show up, and then 'clear' the alerts at the end of the day. I also successfully ported the tests over to the pytest methods as I want to take advantage of those extra features like hover and click. My ask / Where I need some guidance -- I have successful pytest code doing tests in one iteration, however, I'm not sure how to 'collect' information from the test and use that information on subsequent loops in order to only take action once per object that appears. I tried some examples of paramterization and pytest but can't seem to find the right combo. Any pointers or help on what to research is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, there are some methods for saving and reading data to/from files. Use these in combination with flow-of-control statements (Eg. self.save_data_as(data, file_name, destination_folder=None)
self.append_data_to_file(data, file_name, destination_folder=None)
self.get_file_data(file_name, folder=None) |
Beta Was this translation helpful? Give feedback.
Hello, there are some methods for saving and reading data to/from files. Use these in combination with flow-of-control statements (Eg.
if
):