首页 > 解决方案 > 引发 TimeoutException(消息,屏幕,堆栈跟踪) selenium.common.exceptions.TimeoutException:消息:问题

问题描述

 else:
            find_textarea = (
                By.XPATH, '//*[@id="react-root"]/section/main/section/div/form/textarea')
            WebDriverWait(bot, 100).until(
                EC.presence_of_element_located(find_textarea)
            )
            comment_box = bot.find_element(*find_textarea)
            WebDriverWait(bot, 100).until(
                EC.element_to_be_clickable(find_textarea)
            )
            comment_box.click()
            comment_box.send_keys(comment)

            time.sleep(2)

            find_button = (
                By.XPATH, '//*[@id="react-root"]/section/main/section/div/form/button')
            WebDriverWait(bot, 100).until(
                EC.presence_of_element_located(find_button)
            )
            button = bot.find_element(*find_button)
            WebDriverWait(bot, 100).until(
                EC.element_to_be_clickable(find_button)
            )
            button.click()

            time.sleep(random.randint(7, 30))

标签: pythonseleniumselenium-webdriver

解决方案


推荐阅读