我正在尝试模拟对话列表中的所有子节点的点击。当我执行这行代码document.querySelectorAll('[aria-label="Conversations list"]')[0].childNodes[0].childNodes[0].children[0].children[0].children[1]
得到这个结果
<div role="button" tabindex="-1" id="rx-vlv-1" aria-label="grop, group
chat, 3, 13:37, No new messages, " style="position: relative; display: flex; flex-direction: column; flex-grow: 0;
flex-shrink: 0; overflow: visible; align-items: stretch;
cursor: pointer; height: 59px; transition: transform 0.4s ease 0s;">
</div>
但是当我尝试预先形成点击未定义时。如果我错了,我是这项技术的新手帮助我
document.querySelectorAll('[aria-label="Conversations list"]')[0].childNodes[0].childNodes[0].children[0].children[0].children[1].click();
有什么建议 ??
提前致谢!!
这是因为执行了点击,但that function总是返回undefined