我正在使用此Google表单进行硒练习,并意识到我无法选择第一个输入字段("输入")。first()
我使用Web浏览器(Firefox)控制台工具对此进行了验证。当我尝试从那里选择输入字段时,我会收到控制台消息:
$("input").first()
TypeError: $(...).first is not a function
我知道我可以使用它的ID,类等选择字段,但是我很困惑为什么.first()不起作用。
并不是说.first
不起作用,而是$()
并没有返回您认为应该返回的内容。Firefox控制台具有称为$
的函数,尽管名称,但与jQuery
不同。
更多详细信息可在此处提供:
https://developer.mozilla.org/en-us/docs/tools/web_console/the_command_inter_interpreter