fix: failure on uploading data
This commit is contained in:
@@ -496,7 +496,9 @@ def main(driver: WebDriver, logger = logging.getLogger('main')):
|
|||||||
|
|
||||||
while not flow.react(Wait, Sleep):
|
while not flow.react(Wait, Sleep):
|
||||||
try:
|
try:
|
||||||
|
span = locate(".mm-tbody table tbody tr:nth-child(1) td:nth-child(3) span:nth-child(1)", wait=False)
|
||||||
err = locate(".mm-tbody table tbody tr:nth-child(1) td:nth-child(5) .okki-space-item:nth-child(1) button", wait=False)
|
err = locate(".mm-tbody table tbody tr:nth-child(1) td:nth-child(5) .okki-space-item:nth-child(1) button", wait=False)
|
||||||
|
ok = locate(".mm-tbody table tbody tr:nth-child(1) td:nth-child(3) a", wait=False) if span.get_attribute('title') else None
|
||||||
break
|
break
|
||||||
except: pass
|
except: pass
|
||||||
try: click(".product-import-img-footer button.mm-button__primary", wait=False)
|
try: click(".product-import-img-footer button.mm-button__primary", wait=False)
|
||||||
@@ -509,8 +511,11 @@ def main(driver: WebDriver, logger = logging.getLogger('main')):
|
|||||||
logger.warning('Incomplete import detected; downloading 1 related document')
|
logger.warning('Incomplete import detected; downloading 1 related document')
|
||||||
flow.react(Sleep)
|
flow.react(Sleep)
|
||||||
|
|
||||||
try: click(".mm-tbody table tbody tr:nth-child(1) td:nth-child(3) a")
|
if ok is None:
|
||||||
except: continue
|
logger.warning('Nothing to do; skipping')
|
||||||
|
continue
|
||||||
|
|
||||||
|
click(ok, condition=None)
|
||||||
flow.react(Sleep)
|
flow.react(Sleep)
|
||||||
|
|
||||||
class Parse:
|
class Parse:
|
||||||
|
|||||||
Reference in New Issue
Block a user