执行经典范例的时候,总是错误,执行不了,是怎么的。

陈仕_109847 2019-9-16 973

[00:00:24]uibot1551690065493594.task 第27行:模块调用出错:调用的目标发生了异常。 Exception in Keyboard.InputText,元素未找到

[00:01:23]uibot155194499690576.task 第14行:模块调用出错:调用的目标发生了异常。 Can not find the window

[00:02:40]uibot1551862784282105.task 第11行:模块调用出错:调用的目标发生了异常。 Can not find the window


我的电脑上每一个经典范例都执行不了。

最新回复 (7)
  • 薇~ 2019-9-16
    2
    哪个是那个版本的uibot,代码需要发来看看
  • 陈仕_109847 2019-9-16
    3


    Dim 小说名 = Self.Input
    Dim 没有结果
    Dim 有多个结果
    Dim 浏览器对象
    Dim 搜索间隔少于30秒



    浏览器对象 = WebBrowser.Create("ie","http://www.biquyun.com/",30000,{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200})
    #icon("@res:g57js29c-uom2-2pu8-v5qd-e43894qk8bnu.png")
    Window.Show({"wnd":[{"cls":"IEFrame","title":"笔趣阁_书友最值得收藏的网络小说阅读网 - Internet Explorer","app":"iexplore"}]},"show")
    #icon("@res:qorokhre-v5bn-4dv2-33tr-17srdbj209v4.png")
    Window.TopMost({"wnd":[{"cls":"IEFrame","title":"笔趣阁_书友最值得收藏的网络小说阅读网 - Internet Explorer","app":"iexplore"}]},true)
    #icon("@res:g57js29c-uom2-2pu8-v5qd-e43894qk8bnu.png")
    Window.Show({"wnd":[{"cls":"IEFrame","title":"笔趣阁_书友最值得收藏的网络小说阅读网 - Internet Explorer","app":"iexplore"}]},"max")
    WebBrowser.WaitPage(浏览器对象,{"html":{"attrMap":{"id":"wd","tag":"INPUT"},"index":0,"tagName":"INPUT"},"wnd":[{"app":"iexplore","cls":"IEFrame","title":"*"},{"cls":"Internet Explorer_Server"}]},60000,{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200})
    #icon("@res:qorokhre-v5bn-4dv2-33tr-17srdbj209v4.png")
    Window.TopMost({"wnd":[{"cls":"IEFrame","title":"笔趣阁_书友最值得收藏的网络小说阅读网 - Internet Explorer","app":"iexplore"}]},false)
    #icon("@res:fnn9acog-di6d-lk0v-uphc-9alhso22r3bj.png")
    Keyboard.InputText({"html":{"attrMap":{"id":"wd","tag":"INPUT"},"index":0,"tagName":"INPUT"},"wnd":[{"app":"iexplore","cls":"IEFrame","title":"*"},{"cls":"Internet Explorer_Server"}]},小说名,true,10,10000,{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200,"sKeyModifiers":[],"sSimulate":"message"})
    #icon("@res:cp6bb945-djdi-pm41-s712-sf38for0volq.png")
    Mouse.Action({"html":{"attrMap":{"tag":"BUTTON"},"index":0,"tagName":"BUTTON"},"wnd":[{"app":"iexplore","cls":"IEFrame","title":"*"},{"cls":"Internet Explorer_Server"}]},"left","click",10000,{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":true,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate"})
    Dialog.Notify("正在判断搜索结果", "UiBot", "0")
    #icon("@res:89mmlp86-brf5-v0iq-lui9-gtndkm39qa6s.png")
    没有结果 = Image.Exists({"wnd":[{"cls":"IEFrame","title":"笔趣阁_书友最值得收藏的网络小说阅读网 - Internet Explorer","app":"iexplore"}]},{"height":0,"width":0,"x":0,"y":0},@res"89mmlp86-brf5-v0iq-lui9-gtndkm39qa6s.png",0.9,10000,{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":true})
    #icon("@res:ofkb7el1-1tta-dunu-u4q1-fedgv8q180f3.png")
    有多个结果  =  UiElement.Exists({"html":{"attrMap":{"aaname":小说名,"parentid":"nr","tag":"A"},"index":0,"tagName":"A"},"wnd":[{"app":"iexplore","cls":"IEFrame","title":"*"},{"cls":"Internet Explorer_Server"}]},{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200})
    #icon("@res:ttbbircq-kcjq-ifcl-1qna-t6ejn3nkmrmg.png")
    搜索间隔少于30秒 = UiElement.Exists({"html":{"attrMap":{"aaname":"出现错误!","tag":"DIV"},"index":0,"tagName":"DIV"},"wnd":[{"app":"iexplore","cls":"IEFrame","title":"*"},{"cls":"Internet Explorer_Server"}]},{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200})

    if 没有结果
    Dialog.MsgBox("没有找到小说"&小说名&",流程结束!","UiBot","0","1",0)
    Delay(1000)
    Exit
    ElseIf 有多个结果
    #icon("@res:default.png")
    Mouse.Action({"html":{"attrMap":{"aaname":小说名,"parentid":"nr","tag":"A"},"index":0,"tagName":"A"},"wnd":[{"app":"iexplore","cls":"IEFrame","title":"*"},{"cls":"Internet Explorer_Server"}]},"left","click",10000,{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":true,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate"})
    ElseIf 搜索间隔少于30秒
    Dialog.MsgBox("搜索间隔不能少于30秒,流程结束!","UiBot","0","1",0)
    Delay(1000)
    Exit
    Else
    End If




  • 陈仕_109847 2019-9-16
    4
    就是经典范例里的,刚下的uibot  版本号是v3.3.0
  • luo 2019-9-16
    5
    ie打开了吗
  • 薇~ 2019-9-18
    6
    ie启动是否正常
  • 李少聪 2019-9-19
    7
    默认浏览器选择ie,下载谷歌浏览器,谷歌浏览器安装拓展。
  • 薇~ 2019-9-20
    8
    你传入搜索的小说是啥,代码里面上面是你从别的地方传入过来一个小说名
返回
发新帖