我有一个项目是用ReactJS构建的
我尝试使用 imacros 选择 select 中的元素。
我有与此网站类似的代码 https://jedwatson.github.io/react-select/首先选择(州)
我选择了维多利亚
我已记录此代码,但 shi 不起作用,请帮助我
URL GOTO=https://jedwatson.github.io/react-select/
TAG POS=1 TYPE=SPAN ATTR=ID:react-select-2--value-item
EVENT TYPE=CLICK SELECTOR="#react-select-2--value-item" BUTTON=0
EVENT TYPE=MOUSEDOWN SELECTOR="#react-select-2--option-4" BUTTON=0
EVENT TYPE=MOUSEUP POINT="(523,688)"
最佳答案
您的 Qt 中缺少 FCI...
就像在 iMacros 论坛上的并行主题中回答的那样:
https://forum.imacros.net/viewtopic.php?f=2&t=30587&p=83724#p83720
VERSION BUILD=8820413 RECORDER=FX
TAB T=1
URL GOTO=https://jedwatson.github.io/react-select/
'Select "Victoria" in 'States' DDLB:
EVENT TYPE=CLICK SELECTOR="#example>DIV>DIV>DIV>DIV>SPAN:nth-of-type(3)>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#react-select-2--option-2" BUTTON=0
如果您想按名称在 DDLB 中选择该项目...:
VERSION BUILD=8820413 RECORDER=FX
TAB T=1
URL GOTO=https://jedwatson.github.io/react-select/
EVENTS TYPE=KEYPRESS SELECTOR="#state-select" CHARS="Vict"
EVENT TYPE=CLICK SELECTOR="#react-select-2--option-0" BUTTON=0
...=> 输入“V”或“Vict”或全名=>“Victoria”成为第一个条目,对应于选择器中的“--option-0”...
(Tested on iMacros for FF v8.8.2, PM v26.3.3 (=FF47), Win10_x64.)
编辑:
+ 更多信息和一些其他解决方案也应用于 iMacros 论坛上并行线程中的不同站点...
关于javascript - 我如何选择元素以在模态宏上进行 react 选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58330716/