我想知道如何在Selenium python中删除一个元素,我想在一个网站中删除一个聊天框,就像你手动按退格键那样,但我想在Selenium中这样做。到目前为止,我已经尝试了以下方法
chatBox = driver.find_element(By.XPATH, "//div[@class='chatContainer oldStyle']").remove()
This line of code gives the error
AttributeError: 'WebElement' object has no attribute 'remove'
如果有任何帮助,我们将非常感激