循环相似元素下标值超过最大下标,网页有刷新行为,要怎么改呢
回答
收藏

循环相似元素下标值超过最大下标,网页有刷新行为,要怎么改呢

z
ze55013
2024-01-12 14:13·浏览量:1527
z
ze55013
发布于 2024-01-12 14:131527浏览

下标值超过最大下标

Traceback (most recent call last):

 File "<string>", line 498, in iter_all_elements

 File "<string>", line 402, in get_text

 File "<string>", line 21, in _invoke

 File "<string>", line 862, in _invoke

 File "<string>", line 115, in execute

 File "<string>", line 88, in execute

xbot.errors.UIAError: Message:未找到指定ID的元素

Code:106,StackTrace:

  at nx0kGsgcVe9X1seedo3.hf18TTguAW1f5duwUSC.hHtgUoEEJw(String  , Object args) in D:\Work\xbot-v5-uia\src\ShadowBot.UIAutomation.Provider\UIAutomation\Web\ChromiumConnection.cs:line 67


  at nx0kGsgcVe9X1seedo3.hf18TTguAW1f5duwUSC.uwDgqM8osS[kOpEbZgT7Z7XAS61rer](String  , Object args) in D:\Work\xbot-v5-uia\src\ShadowBot.UIAutomation.Provider\UIAutomation\Web\ChromiumConnection.cs:line 41


  at nGYcvrgWfJVKtBuRrpj.UCfBP4goj2SqStKlsAa.U4EgDnm3IL() in D:\Work\xbot-v5-uia\src\ShadowBot.UIAutomation.Provider\UIAutomation\Web\ChromiumElementBase.cs:line 222


  at ShadowBot.UIAutomation.Provider.Service.Web.Chromium.ChromiumElementService.GetText(String productName, Int32 browserId, String elementId) in D:\Work\xbot-v5-uia\src\ShadowBot.UIAutomation.Provider\Service\Web\Chromium\ChromiumElementService.cs:line 188


  at lambda_method98(Closure , W4I4i3RjGQsFYxnErmU , Object[] )


  at MVym94RtKTkCmSQTf3L.ECoiZ3RrAuclBJmBm07.TFRRDCVxPr(W4I4i3RjGQsFYxnErmU  , pd8AXuVh3ehaZ8577W6  ) in D:\Work\xbot-v5-uia\src\ShadowBot.UIAutomation.Provider\Common\IPC\IPCActionInvoker.cs:line 63


  at HfjmEIRncOYsxxE2Qt9.LdlqZ5RAee2gSqPVq6t.SWPRZk0mur(W4I4i3RjGQsFYxnErmU  , Hh8GUEVpZm97Bt2XkLO  ) in D:\Work\xbot-v5-uia\src\ShadowBot.UIAutomation.Provider\Common\IPC\IPCActionInfo.cs:line 34


  at CZlm1OrPMHaVmSVQ0hv.EEPVxXrjSS5iDp60lLt.JXcrBBYFiA(Hh8GUEVpZm97Bt2XkLO  ) in D:\Work\xbot-v5-uia\src\ShadowBot.UIAutomation.Provider\Common\IPC\IPCServiceInfo.cs:line 52


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

 File "D:\安装必备\ShadowBot\shadowbot-5.14.38\python\lib\runpy.py", line 193, in _run_module_as_main

   "__main__", mod_spec)

 File "D:\安装必备\ShadowBot\shadowbot-5.14.38\python\lib\runpy.py", line 85, in _run_code

   exec(code, run_globals)

 File "D:\安装必备\ShadowBot\shadowbot-5.14.38\python\lib\site-packages\xbot_interpreter.py", line 97, in <module>

   main()

 File "D:\安装必备\ShadowBot\shadowbot-5.14.38\python\lib\site-packages\xbot_interpreter.py", line 57, in main

   try:

 File "C:\Users\Administrator\AppData\Local\ShadowBot\users\620836185019101186\apps\4fbf55da-5238-475b-9e41-89bf8174b36b\xbot_robot\main.py", line 26, in main

   for web_loop_element_index, web_loop_element in enumerate(xbot_visual.web.element.iter_all_elements(browser=web_page, selector=package.selector("块元素_相似元素组"), operation="element", absolute_url=False, attribute_name=None, timeout="20", loop_start_index="0", loop_end_index="-1", output_with_index=True, _block=("main", 7, "循环相似元素(web)"))):

 File "<string>", line 503, in iter_all_elements

ValueError: 下标值超过最大下标

尝试过的方案

我把调用流程禁止后可也正常运行,就是我只能点击相似元素但是不能再那个元素上接着点击后续操作,要是在那个元素上执行后续操作就会报错下标值超过最大下标,麻烦有咩有大佬帮忙看下应该怎么改,

收藏
全部回答1
最新
发布回答
回答