0

我有以下代码需要重写 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 封不同的电子邮件玩这个把戏?

谢谢

4

1 回答 1

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
于 2013-10-27T10:59:23.243 回答