I would like to know if it is possible to track changes from a tchat room, like new messages ..., with selenium and mutationobserver
For example, is it possible to send the variable "returntext" to python everytime a mutation is observed?
driver.execute_script("""
var ourObserver = new MutationObserver(function() {
var returntext = "example"
});
ourObserver.observe(document.querySelector(".testclass"), {
subtree: true,
childList: true
});
""")