【发布时间】:2023-02-24 09:19:06
【问题描述】:
您好,我想更改采样步长、高度和宽度 The UI of the Stable Diffusion Web UI
我检查了采样步骤的类名,并将其复制到 selenium enter image description here
options = webdriver.ChromeOptions()
options.add_argument('--ignore-certificate-errors')
options.add_argument('--ignore-ssl-errors')
options.add_argument("--start-maximized")
options.add_argument("--headless")
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
driver.get(site)
time.sleep(1)
sampling_steps = driver.find_element(By.CLASS_NAME, "gr-box gr-input gr-text-input text-center h-6")
sampling_steps.send_keys("80")
然后我得到错误:selenium.common.exceptions.NoSuchElementException:消息:没有这样的元素:无法定位元素:{“方法”:“css选择器”,“选择器”:“.gr-box gr-input gr-text-输入文本中心 h-6"}
有没有办法解决这个问题? (我试过 XPATH 但没用)
我试过使用 XPATH,我搜索了堆栈溢出以移动范围但弹出了同样的错误:没有这样的元素
【问题讨论】:
标签: python selenium-webdriver stable-diffusion