Created
September 27, 2024 14:33
-
-
Save andriyshevchenko/f2961e6913eca07a54d2d5612dd6dbaa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BtnLogged(Button): | |
def __init__(self, native: Native, journal: Journal): | |
self.native = native | |
self.journal = journal | |
self.message = StrFormatted( | |
StrLiteral("Clicking button %s"), | |
StrNativeDesc(native) | |
) | |
self.level = LvlDefault(logging.DEBUG) | |
async def click(self): | |
await asyncio.gather( | |
self.journal.write(self.message, self.level), | |
self.native.click(), | |
return_exceptions=False, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment