【问题标题】:Autoit click button by value按值自动单击按钮
【发布时间】:2016-04-18 19:31:38
【问题描述】:

我想点击这个按钮:

<input type="button" value="Click me" id="ext-gen1133">

但问题是每次刷新后id都会改变,所以我可以使用_IEGetObjById。我一直在寻找解决方案几个小时,但没有什么对我有用:(

【问题讨论】:

    标签: html button click autoit


    【解决方案1】:

    如果每次的值都保持不变,你可以循环找到你想要的值的按钮:

    $oButtons = _IETagnameGetCollection($oIE, "button")
    For $oButton in $oButtons
        If String($oButton.value) = "click me" Then
            _IEAction($oButton, "click")
            ExitLoop
        EndIf
    Next
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-06-13
      • 2023-03-22
      • 2014-09-02
      • 2015-06-01
      • 2017-02-06
      • 2021-05-15
      • 2012-05-17
      相关资源
      最近更新 更多