-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你好,怎么在一个tab里切换到内嵌的iframe?Hi,How to switch_to a inner iframe in a tab? #101
Comments
呃, 不用太纠结源码, 搜不到就说明没有, 目前只放了日常比较常用而且简单实现的功能, 你说的那个要 CDP 里面很多 domain 关联, 因为没用上所以就没搞... 一般我遇到 iframe 用另外两个方式就避开了, 就没用官方那套:
|
我遇到了一个网站,要点击iframe里的一个按钮。 因为不熟悉CPD,我最后无奈的用了操作鼠标直接点击的方式处理的。我觉得我的代码不干净了。 |
goto 不过去那就是做了保护... 你在 iframe 里面运行 JS 还说阻挡那就挺麻烦了, dispatch 鼠标点击 Event 到某个 position 有用么, 这种我只在非 iframe 的 root node 上试过, 在 iframe 里面我平时用的最多的就是执行 JS 函数或者获取某些东西, 你都提示被阻挡了(咋提示的?) 那也不好办啊 |
找了一个有意思的例子: js: document.getElementById('fc-iframe-wrap').contentWindow.document.getElementById('home_children_button').click() return:
|
这是禁止跨域运行啊, 走 CDP node 是不是可以在里面执行点什么. 现在这些前端弄得不想干爬虫了 |
看了很久的源码也没有找到。。。
The text was updated successfully, but these errors were encountered: