我当前正在运行脚本以将产品上传到我的网站。
该代码运行良好,但滞后一段时间,图像无法完成上传。已经将等待时间设置为40s(文件不是那么大,只需要4-10sec-300-500kb /每个)。我正在寻找一种解决方法,可以忽略错误直到结束并重复当前的State / Loop?我尝试设置“忽略”错误,但它将以loop + 1开始新的错误。下面是代码:
' Get update & support at http://gbbulklister.com
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE gb-template.csv
SET !DATASOURCE_COLUMNS 5
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
'Set 15oz white mug price
SET !VAR1 19.95
'=====================================================================================================
URL GOTO=https://www.gearbubble.com/campaigns/new
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:new-campaign-form ATTR=NAME:commit
TAG POS=1 TYPE=A ATTR=ID:js-link-add-style
TAG POS=1 TYPE=SELECT FORM=ACTION:/campaign/create_design ATTR=NAME:selected_style_id CONTENT=%43
'Add 15oz mug
'TAG POS=1 TYPE=DIV ATTR=TXT:15oz<SP>Mug
wait seconds=2
'USE FULL WRAP IMAGE
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:create-design-form ATTR=ID:campaign_use_full_wrapped CONTENT=YES
TAG POS=1 TYPE=BUTTON FORM=ID:create-design-form ATTR=ID:js-btn-upload-design
TAG POS=1 TYPE=INPUT:FILE ATTR=ID:js-file-upload-design CONTENT={{!COL1}}
wait seconds=40
'pause
'---------------------------------------------------------------------------------------------------------
'pause
'Set Price
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:create-design-form ATTR=ID:cost CONTENT={{!VAR1}}
'Duplicate image on back
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:create-design-form ATTR=ID:duplicate-back CONTENT=YES
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:create-design-form ATTR=ID:next-step
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:add-description-form ATTR=ID:campaign_title CONTENT={{!COL2}}
TAG POS=2 TYPE=INPUT:TEXT FORM=ID:add-description-form ATTR=* CONTENT={{!COL3}}
'Edit with your description or use default.
'FRAME F=1
'EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV" BUTTON=0
'EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY" KEYS="[46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46]"
'EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY" CHARS="{{!COL5}}"
'FRAME F=0
'Set Price for 15oz white mug
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:add-description-form ATTR=ID:campaign_campaign_styles_attributes_0_cost CONTENT={{!VAR1}}
'Set Price for 15oz white mug
'TAG POS=1 TYPE=INPUT:TEXT FORM=ID:add-description-form ATTR=ID:campaign_campaign_styles_attributes_1_cost CONTENT={{!VAR2}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:add-description-form ATTR=ID:campaign_slug CONTENT={{!COL4}}
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:add-description-form ATTR=ID:campaign_agreement CONTENT=YES
wait seconds=1
'SET BACK AS DEFAULT
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:add-description-form ATTR=ID:campaign_default_side CONTENT=YES
'pause
TAG POS=1 TYPE=BUTTON FORM=ID:add-description-form ATTR=ID:btn-add-description
SET !TIMEOUT_STEP 600
TAG POS=1 TYPE=P ATTR=TXT:NOTE:<SP>You<SP>can<SP>always<SP>setup<SP>anything<SP>you*