我遇到了一个问题,select2下拉菜单在打开时仍然保持焦点。
基本上,当您使用select2单击下拉菜单时,会显示一个特殊的select2下拉菜单,顶部有一个文本输入,这样您就可以开始键入并缩小选择选项的范围。当select2下拉菜单打开时,焦点不在搜索输入中。它仍然在原始的select html元素上。
这是一个在CodePen上工作的select2下拉菜单,只是作为一个例子。我不能复制我在CodePen中遇到的问题,所以它让我觉得在我的网站上有一些冲突。但我不知道是什么,我似乎也不能缩小范围。
see codepen for sample working code
我可以看到焦点在打开
我试图从js网站上删除一些数据,但是即使使用selenium,它仍然无法到达。
from discord.ext import commands
from selenium.webdriver.chrome.options import Options
from selenium import webdriver
from selenium.webdriver.common.by import By
options = Options()
options.add_argument("--headless")
options.add_argument("-no-sand