MCPcopy
hub / github.com/MonsterNone/tmall-miao / do_search_task_energy

Function do_search_task_energy

modules/energy.py:139–149  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137
138
139def do_search_task_energy():
140 logger.info('等待进入')
141 if not find_timeout_xpath(d, '//*[@text="搜索发现"]/parent::*/list/listItem[1]', 10):
142 logger.info('进入任务失败')
143 return False
144 logger.info('进入任务成功,进行商品搜索')
145 d.xpath('//*[@text="搜索发现"]/parent::*/list/listItem[1]').click()
146 f = do_time_task_energy()
147 if f: # 不成功不返回,以免多返回了
148 d.go_back()
149 return f
150
151
152# 10个商品任务

Callers 1

runFunction · 0.85

Calls 5

find_timeout_xpathFunction · 0.90
do_time_task_energyFunction · 0.85
clickMethod · 0.80
xpathMethod · 0.80
go_backMethod · 0.80

Tested by

no test coverage detected