找回密码
 加入
搜索
查看: 1308|回复: 4

[网络通信] [已解决]求教 IE 非A标签按钮如何自动点击,实在弄不出来了。谢谢

[复制链接]
发表于 2018-12-10 22:39:31 | 显示全部楼层 |阅读模式
本帖最后由 devineresse 于 2018-12-11 20:16 编辑

在网站 https://cn.tradingview.com/forex-screener/    我用F12 查看到以下代码:
<div  data-set="overview">
        概览
</div>
我想要自动点击“ 概览”,如何实现呢,_IELinkClickByText 、_IEGetObjByName 好像都不行,请高手帮我想想办法。
发表于 2018-12-11 12:21:48 | 显示全部楼层
#include <ie.au3>
Local $oIE = _IEAttach("https://cn.tradingview.com/forex-screener/",'url')
Local $sButn = 'body > div:nth-of-type(7) > div > div:nth-of-type(2) > div:nth-of-type(5) > div:nth-of-type(1)'
Local $oElement = $oIE.document.QuerySelector($sButn)
$oElement.click() 





点评

谢谢,弄出来了,确实是用queryselector 学习到了。  发表于 2018-12-11 20:15
 楼主| 发表于 2018-12-11 19:52:22 | 显示全部楼层
"C:\Users\ddr\Desktop\?? AutoIt3 ??.au3" (4) : ==> ????? "Object".????.:
Local $oElement = $oIE.document.QuerySelector($sButn)
Local $oElement = $oIE^ ??

你好,显示错误。。请问可以详细点吗
 楼主| 发表于 2018-12-11 19:53:02 | 显示全部楼层
"C:\Users\ddr\Desktop\?? AutoIt3 ??.au3" (4) : ==> ????? "Object".????.:
Local $oElement = $oIE.document.QuerySelector($sButn)
Local $oElement = $oIE^ ??  

提示错误。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-4-16 18:16 , Processed in 0.075090 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表