from otree.api import Bot from . import * import random import string class PlayerBot(Bot): def play_round(self): # Generate a random transcription. In a real test, you might want to use the actual string to test correct functionality random_transcription = ''.join( random.choice(string.ascii_letters + string.digits) for _ in range(C.STRING_LENGTH)) # Submit the random transcription on the Start page yield Start, dict(transcription=random_transcription) # Check if it's the final round to interact with the DelayPage if self.player.round_number == C.NUM_ROUNDS: yield Great # You can add more tests or conditions depending on what you are specifically testing in your app.