def _send_message(self, text):
    self.chat_window.messageText.setPlainText(text)
    QtTest.QTest.mouseClick(self.chat_window.sendMessageBtn, QtCore.Qt.LeftButton)
    QtWidgets.QApplication.processEvents()
    QtTest.QTest.qWait(500)
def _send_message(self, text):
    self.chat_window.messageText.setPlainText(text)
    QtTest.QTest.mouseClick(self.chat_window.sendMessageBtn, QtCore.Qt.LeftButton)
    QtWidgets.QApplication.processEvents()
    QtTest.QTest.qWait(500)