def get_msg(self): ele_list = WebDriverWait(self.driver, 10).until( lambda _: self.driver.find_elements(By.XPATH, '//p[@class="el-message__content"]') ) return ele_list[len(ele_list)-1].text