我有以下代码需要重写10次以满足我的工作。例如,如果我的代码是
VERSION BUILD=8510617 RECORDER=FX
TAB T=1
SET !ERRORIGNORE YES
URL GOTO=http://www.mydomain.com/
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>In
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login-form ATTR=ID:login-email CONTENT=myemail1@mymail.com
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login-form ATTR=ID:login-password CONTENT=mypassword
TAG POS=1 TYPE=BUTTON FORM=ID:login-form ATTR=TXT:Sign<SP>In
URL GOTO=http://www.mydomain.com/my-page.html
TAG POS=1 TYPE=SPAN ATTR=TXT:Delete
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>Out
URL GOTO=http://www.mydomain.com/
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>In
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login-form ATTR=ID:login-email CONTENT=myemail2@mymail.com
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login-form ATTR=ID:login-password CONTENT=mypassword
TAG POS=1 TYPE=BUTTON FORM=ID:login-form ATTR=TXT:Sign<SP>In
URL GOTO=http://www.mydomain.com/my-page.html
TAG POS=1 TYPE=SPAN ATTR=TXT:Delete
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>Out
URL GOTO=http://www.mydomain.com/
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>In
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login-form ATTR=ID:login-email CONTENT=myemail3@mymail.com
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login-form ATTR=ID:login-password CONTENT=mypassword
TAG POS=1 TYPE=BUTTON FORM=ID:login-form ATTR=TXT:Sign<SP>In
URL GOTO=http://www.mydomain.com/my-page.html
TAG POS=1 TYPE=SPAN ATTR=TXT:Delete
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>Out
URL GOTO=http://www.mydomain.com/
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>In
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login-form ATTR=ID:login-email CONTENT=myemail4@mymail.com
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login-form ATTR=ID:login-password CONTENT=mypassword
TAG POS=1 TYPE=BUTTON FORM=ID:login-form ATTR=TXT:Sign<SP>In
URL GOTO=http://www.mydomain.com/my-page.html
TAG POS=1 TYPE=SPAN ATTR=TXT:Delete
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>Out
URL GOTO=http://www.mydomain.com/
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>In
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login-form ATTR=ID:login-email CONTENT=myemail5@mymail.com
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login-form ATTR=ID:login-password CONTENT=mypassword
TAG POS=1 TYPE=BUTTON FORM=ID:login-form ATTR=TXT:Sign<SP>In
URL GOTO=http://www.mydomain.com/my-page.html
TAG POS=1 TYPE=SPAN ATTR=TXT:Delete
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>Out
在上面的大部分代码都是静态的,我只需要将电子邮件更改为myemail1@mymail.com
和myemail2@mymail.com
等等......所以无论如何我都可以编写循环以便它使用10个不同的电子邮件自动更改电子邮件循环10次以发挥作用?
由于
答案 0 :(得分:0)
使用循环
运行URL GOTO=http://www.mydomain.com/
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>In
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login-form ATTR=ID:login-email CONTENT=myemail{{!loop}}@mymail.com
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login-form ATTR=ID:login-password CONTENT=mypassword
TAG POS=1 TYPE=BUTTON FORM=ID:login-form ATTR=TXT:Sign<SP>In
URL GOTO=http://www.mydomain.com/my-page.html
TAG POS=1 TYPE=SPAN ATTR=TXT:Delete
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>Out