51Testing软件测试论坛

标题: 请问:如何录制通过excel的vba向web服务器提交数据的脚本? [打印本页]

作者: wzh961123    时间: 2005-4-12 09:14
标题: 请问:如何录制通过excel的vba向web服务器提交数据的脚本?
在excel中写了一段vb脚本,提取excel数据,并发送到web服务器,等待返回结果
    现在想测试一下性能,请问一下,如何录制这个脚本,谢谢!

    Dim xmlhttp As New xmlhttp
    Dim errorText As String
   
    'xmlhttp.Open "POST", "http://10.30.99.119/fmsweb/sie/boe/web/botreceiver.aspx", False
    xmlhttp.Open "POST", "http://localhost/fmsweb/sie/boe/web/botreceiver.aspx", False
    xmlhttp.setRequestHeader "content-length", Len(str)
    xmlhttp.setRequestHeader "Content-Type", "application/zip"
    xmlhttp.send str
   
    errorText = xmlhttp.responseText
    If Left(errorText, 1) = "Y" Then
        MsgBox "提单成功!单据号:" + Right(errorText, Len(errorText) - 1)
    Else
        MsgBox Right(errorText, Len(errorText) - 1)
    End If
作者: wzh961123    时间: 2005-4-13 10:48
各位,帮帮忙吧,我这还是不能录,是不是我的版本有问题,运行设置中都没有关于“VBA”设置,谢谢!
作者: yuxingxin    时间: 2005-4-19 09:39
你是怎么录制的?




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2