_bot/run.py
def vote(self):
        """ this method voting in the quiz"""
        self.questionNumber = 1 # variable for console log
        while True:
            try:
                self.randomChoose = self.d[random.randint(1,4)] # variable for vote and console log
                self.htmlButtonInGame = self.driver.find_element_by_id(self.randomChoose) # identify answer button
                self.htmlButtonInGame.click()
                self.waitToNext = random.randint(2,8)
                print("Question: {}; Choosen: {} Waiting: {}".format(self.questionNumber, self.randomChoose, self.waitToNext)) # printing some log to console
                time.sleep(self.waitToNext)#2.0875) # we must wait while page content get changed
                self.questionNumber += 1
            except Exception as e:
                if not "no such element" in str(e): # this conditial will happen everytime, when the bot voted for every questions
                    print("{}`s Problem:\n{}".format(self.name, e)) # print what is wrong
                time.sleep(0.0875)
                self.save() # save bot´s score to databse
                break
 this method voting in the quiz
this method voting in the quiz
this method voting in the quiz
def vote(self):
        self.questionNumber = 1 
        while True:
            try:
                self.randomChoose = self.d[random.randint(1,4)] 
                self.htmlButtonInGame = self.driver.find_element_by_id(self.randomChoose) 
                self.htmlButtonInGame.click()
                self.waitToNext = random.randint(2,8)
                print("Question: {}; Choosen: {} Waiting: {}".format(self.questionNumber, self.randomChoose, self.waitToNext)) 
                time.sleep(self.waitToNext)
                self.questionNumber += 1
            except Exception as e:
                if not "no such element" in str(e): 
                    print("{}`s Problem:\n{}".format(self.name, e)) 
                time.sleep(0.0875)
                self.save() 
                break
def vote ( self ) : self . questionNumber = 1 while True : try : self . randomChoose = self . d [ random . randint ( 1 , 4 ) ] self . htmlButtonInGame = self . driver . find_element_by_id ( self . randomChoose ) self . htmlButtonInGame . click ( ) self . waitToNext = random . randint ( 2 , 8 ) print ( "Question: {}; Choosen: {} Waiting: {}" . format ( self . questionNumber , self . randomChoose , self . waitToNext ) ) time . sleep ( self . waitToNext ) self . questionNumber += 1 except Exception as e : if not "no such element" in str ( e ) : print ( "{}`s Problem:\n{}" . format ( self . name , e ) ) time . sleep ( 0.0875 ) self . save ( ) break
this method voting in the quiz
this method voting in the quiz
""" this method voting in the quiz""" # variable for console log # variable for vote and console log # identify answer button # printing some log to console #2.0875) # we must wait while page content get changed # this conditial will happen everytime, when the bot voted for every questions # print what is wrong # save bot´s score to databse
self