Please help create a robot that will work at

Please help with
I have a task where the robot should open, set the value from 1 to 7 and click on generation. He must repeat the press before the number 7 comes out. As soon as the number 7 is displayed in the result field, he should display a message: “Here is the number 7”.
I am a beginner, the site is English-speaking and I am not good at searching.