Closed yyb6666 closed 3 months ago
@ruthtxh @kensoh @siowyisheng
Hi @yyb6666 I've not seen this error before. It is most likely due to TagUI not interpreting the fairly complicated workflow structure above. Can you try the following?
(closing issue for now, but will look out for your reply if any)
在数据导入excel之后再使用 count()报错 ERROR - 1 is not a constructor (evaluating 'count('Card--doubleCardWrapper--L2XFE73')') A duplicate file name exists, or the file cannot be found. https://taobao.com type //[@id="q"] as [clear]乐事原切薯片分享装[enter] wait 2 click (0,200) click 销量 wait 2 read //[@id="pageContent"]/div[1]/div[3]/div[4]/div/div/div/button[last()] to page echo
page
aa = 0 items=[['商品标题','价格']] for b from 1 to page wait 2 for c from 1 to 3 keyboard [pagedown] wait 1 total_items=count('Card--doubleCardWrapper--L2XFE73') echototal_items
for e from 1 to total_items titlelen = present("//[@id='pageContent']/div[1]/div[3]/div[3]/div/div["+e+"]/a/div/div[1]/div[2]/div/span") echotitlelen
if titlelen read //[@id="pageContent"]/div[1]/div[3]/div[3]/div/div[e
]/a/div/div[1]/div[2]/div/span to title read //*[@id="pageContent"]/div[1]/div[3]/div[3]/div/div[e
]/a/div/div[1]/div[4]/div[1] to price js items[e+aa] = items[e+aa] || [] js items[e+aa][0] = title echoitems
js items[e+aa][1] = price echoitems
wait 2 wait 1 click 下一页 aa+=total_items [E:\AA.xlsx]sheet1!A2 = items wait 5 循环里第一次是正常的导入了第一页商品的信息 然后翻到下一页 total_items=count('Card--doubleCardWrapper--L2XFE73')走这个获取总数时就会报错 试了很多情况就是在执行了[E:\AA.xlsx]sheet1!A2 = items导入excel指令后再 执行count就会报这个错 如果不执行导入excel指令 到下一页就可以正常计算总数