|
4#
楼主 |
发表于 2008-9-4 17:47:27
|
只看该作者
感谢大家,在IORO的友情帮助下,终于可以发送邮件了。
之前发送不出去是因为选择的协议是web(HTTP/HTMP),修改成web(click and script)就可以了。
但是目前又遇到一个新的问题,发送的Email只能发送标题,信的内容录制不到,发信使用的控件LR抓不出来。
多协议选择没办法是用java script ,分别使用 AJAX(click and script)和SAP(click and script)效果一样,只能发送标题,没办法识别发信的那个控件。
还请高手帮忙,指导一个方法识别这个控件,记得QTP有个描述性编程,但不知道在LR中如何实现。
附上 关键的几个代码
--------------------------------------------------------
web_text_area("To",
"Snapshot=t4.inf",
DESCRIPTION,
"Name=To",
ACTION,
"FireEvent=onclick",
LAST);
web_text_area("To_2",
"Snapshot=t5.inf",
DESCRIPTION,
"Name=To",
ACTION,
"FireEvent=onclick",
LAST);
web_text_area("To_3",
"Snapshot=t6.inf",
DESCRIPTION,
"Name=To",
ACTION,
"SetText=shenlang66908553@yahoo.com.cn",
LAST);
web_edit_field("Subj",
"Snapshot=t7.inf",
DESCRIPTION,
"Type=text",
"Name=Subj",
ACTION,
"SetValue=123456",
LAST);
web_edit_field("edit_field",
"Snapshot=t8.inf",
DESCRIPTION,
"Type=text",
"Name=",
ACTION,
"FireEvent=onfocus",
LAST);
web_button("BUTTON_2",
"Snapshot=t9.inf",
DESCRIPTION,
"Type=button",
"Tag=BUTTON",
"ID=sendbottom",
ACTION,
"UserAction=Click",
LAST);
web_browser("Sync",
"Snapshot=t10.inf",
DESCRIPTION,
ACTION,
"Sync",
LAST);
return 0; |
|