0

我已经记录了 scipt 并且该脚本中有一个 web_custom_request() 正在发送请求但不等待响应并且 Vugen 会命中下一个请求。由于脚本的下一步失败。

如果有时响应在响应正常的时间内出现,我也已经完成了所有关联。

这是一个被命中的搜索请求,n 返回它给出了该搜索的结果。

我怎样才能让这一步等到它得到实际响应。下面是代码:

	web_custom_request("saw.dll_8",
		"URL={URL}",
		"Method=POST",
		"TargetFrame=",
		"Resource=0",
		"RecContentType=text/plain",
		"Referer={URL}",
		"Snapshot=t345.inf",
		"Mode=HTML",
		"Body=ViewState={ViewState_1}&Done=Dashboard%26PortalPath%3D%252Fshared%252FPayment%2520Search%252F_portal%252FPayment%2520Search%2520Tool%26Page%3DSearch%2520Page%26ViewState%3D{ViewState_1}&ClientStateXml=%3Csawst%3AenvState%20xmlns%3Asawst%3D%22com.siebel.analytics.web%2Fstate%2Fv1%22%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%20xmlVersion%3D%22200811100%22%3E%3Csawst%3Acontainer%20cid%3D%22d%3Adashboard%22%20xsi%3Atype%3D%22sawst%3AtopLevelStateContainer%22%20persistPageState%3D%22true%22%20links%3D%22fd%22%3E%3Csawst%3Acontainer%20cid%3D%22p%3A{CorrelationParameter}%22%20xsi%3Atype%3D%22sawst%3Apage%22%20firstVisit%3D%22true%22%3E%3Csawst%3Acontainer%20cid%3D%22s%3A{CorrelationParameter_1}%22%20xsi%3Atype%3D%22sawst%3Asection%22%20rendered%3D%22true%22%3E%3Csawst%3Acontainer%20cid%3D%22g%3A{CorrelationParameter_2}%22%20xsi%3Atype%3D%22sawst%3Adashprompt%22%20links%3D%22-%22%20promptAutoCompleteState%3D%22off%22%2F%3E%3C%2Fsawst%3Acontainer%3E%3Csawst%3Acontainer%20cid%3D%22"
		"r%3A{CorrelationParameter_3}%22%20xsi%3Atype%3D%22sawst%3Areport%22%20links%3D%22fd%22%20defaultView%3D%22compoundView!1%22%20searchId%3D%22{CorrelationParameter_4}%22%20folder%3D%22%2Fshared%2FPayment%20Search%2FReports%22%20itemName%3D%22Search%20output%22%2F%3E%3Csawst%3Acontainer%20cid%3D%22f%3Adpstate%22%20xsi%3Atype%3D%22sawst%3Adashpromptstate%22%20statepoolId%3D%22{CorrelationParameter_12}%22%2F%3E%3Csawst%3Acontainer%20cid%3D%22s%3A{CorrelationParameter_6}%22%20xsi%3Atype%3D%22sawst%3Asection%22%20rendered%3D%22true%22%3E%3Csawst%3Acontainer%20cid%3D%22n%3Acondition%22%20xsi%3Atype%3D%22sawst%3Anavigation%22%20conditionId%3D%22{CorrelationParameter_13}%22%20conditionEvalStatus%3D%22complete%22%20conditionMet%3D%22true%22%3E%3Csawst%3Acontainer%20cid%3D%22r%3A{CorrelationParameter_8}%22%20xsi%3Atype%3D%22sawst%3A{CorrelationParameter_8}%22%20links%3D%22bfd%22%20defaultView%3D%22compoundView!1%22%20searchId%3D%22{CorrelationParameter_14}%22%20folder%3D%22%2Fshared%2FPayment%20Search%2FReports%22%20it"
		"emName%3D%22Condition_noprompt_set%22%2F%3E%3C%2Fsawst%3Acontainer%3E%3C%2Fsawst%3Acontainer%3E%3Csawst%3Acontainer%20cid%3D%22s%3A{CorrelationParameter_10}%22%20xsi%3Atype%3D%22sawst%3Asection%22%20rendered%3D%22true%22%3E%3Csawst%3Acontainer%20cid%3D%22n%3Acondition%22%20xsi%3Atype%3D%22sawst%3Anavigation%22%20conditionId%3D%22{CorrelationParameter_13}%22%20conditionEvalStatus%3D%22complete%22%20conditionMet%3D%22false%22%3E%3Csawst%3Acontainer%20cid%3D%22r%3A{CorrelationParameter_8}%22%20xsi%3Atype%3D%22sawst%3A{CorrelationParameter_8}%22%20links%3D%22bfd%22%20defaultView%3D%22compoundView!1%22%20searchId%3D%22{CorrelationParameter_14}%22%20folder%3D%22%2Fshared%2FPayment%20Search%2FReports%22%20itemName%3D%22Condition_noprompt_set%22%2F%3E%3C%2Fsawst%3Acontainer%3E%3C%2Fsawst%3Acontainer%3E%3Csawst%3Acontainer%20cid%3D%22s%3A{CorrelationParameter_11}%22%20xsi%3Atype%3D%22sawst%3Asection%22%20rendered%3D%22true%22%2F%3E%3C%2Fsawst%3Acontainer%3E%3C%2Fsawst%3Acontainer%3E%3C%2Fsawst%3AenvState%3E&fmapId={"
		"fmapId}&reloadTargets=d%3Adashboard~p%3A{CorrelationParameter}~r%3A{CorrelationParameter_3}&DashboardCaption=Payment%20Search%20Tool&Page=Search%20Page&PageDelayedState=NotDelayed&PortalPath=%2Fshared%2FPayment%20Search%2F_portal%2FPayment%20Search%20Tool&Action=&ViewID=&IgnoreBypassCacheOption=ignoreBypassCache&_scid=&icharset=utf-8",
		EXTRARES,
		"URL=res/v-qTiUEGoCy*s/sk_Alta/catalog/exporttopdf_ena.png", "Referer={URL}", ENDITEM,
		"URL=res/v-qTiUEGoCy*s/sk_Alta/catalog/exporttoppt_ena.png", "Referer={URL}", ENDITEM,
		"URL=res/v-qTiUEGoCy*s/sk_Alta/catalog/exporttomhtml_ena.png", "Referer={URL}", ENDITEM,
		"URL=res/v-qTiUEGoCy*s/sk_Alta/catalog/exporttocsv_ena.png", "Referer={URL}", ENDITEM,
		"URL=res/v-qTiUEGoCy*s/sk_Alta/common/menurtarrow.gif", "Referer={URL}", ENDITEM,
		"URL=res/v-qTiUEGoCy*s/sk_Alta/catalog/exporttoxml_ena.png", "Referer={URL}", ENDITEM,
		"URL=saw.dll?loadViewMenuModel", "Referer={URL}", ENDITEM,
		"URL=saw.dll/views/pivot/obips.gridview.xml?fmapId={fmapId}", "Referer={URL}", ENDITEM,
		LAST);

谢谢并恭祝安康

尼基尔·坎博伊

4

2 回答 2

0

只是为了让这更容易阅读......我正在计算十几个相关实体。您是否在脚本的每一步都检查预期结果(测试 101 概念)?如果不是,那么这个脚本很容易脱离具有如此多相关性的轨道。由于未处理的意外结果,只需要关闭一个值,并且此请求可能会做出不适当的响应,

您在使用 Siebel 和 LR 方面的经验有多深?这是一个重要的测试接口

web_custom_request("saw.dll_8",
        "URL={URL}",
        "Method=POST",
        "TargetFrame=",
        "Resource=0",
        "RecContentType=text/plain",
        "Referer={URL}",
        "Snapshot=t345.inf",
        "Mode=HTML",
        "Body=ViewState={ViewState_1}
        &Done=Dashboard
        &PortalPath=/shared/Payment Search/_portal/Payment Search Tool
        &Page=Search Page&ViewState={ViewState_1}
        &ClientStateXml=
            <sawst:envState 
                xmlns:sawst="com.siebel.analytics.web/state/v1" 
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xmlVersion="200811100">
            <sawst:container 
                cid="d:dashboard" 
                xsi:type="sawst:topLevelStateContainer" 
                persistPageState="true" 
                links="fd">
            <sawst:container 
                cid="p:{CorrelationParameter}" 
                xsi:type="sawst:page" 
                firstVisit="true">
            <sawst:container 
                cid="s:{CorrelationParameter_1}" 
                xsi:type="sawst:section" 
                rendered="true">
            <sawst:container 
                cid="g:{CorrelationParameter_2}" 
                xsi:type="sawst:dashprompt" 
                links="-" promptAutoCompleteState="off"/>
            </sawst:container>
            <sawst:container 
                cid="r:{CorrelationParameter_3}" 
                xsi:type="sawst:report" 
                links="fd" 
                defaultView="compoundView!1" 
                searchId="{CorrelationParameter_4}" 
                folder="/shared/Payment Search/Reports" 
                itemName="Search output"/>
            <sawst:container 
                cid="f:dpstate" 
                xsi:type="sawst:dashpromptstate" 
                statepoolId="{CorrelationParameter_12}"/>
            <sawst:container 
                cid="s:{CorrelationParameter_6}" 
                xsi:type="sawst:section" 
                rendered="true">
            <sawst:container 
                cid="n:condition" 
                xsi:type="sawst:navigation" 
                conditionId="{CorrelationParameter_13}" 
                conditionEvalStatus="complete" 
                conditionMet="true">
            <sawst:container 
                cid="r:{CorrelationParameter_8}" 
                xsi:type="sawst:{CorrelationParameter_8}" 
                links="bfd" 
                defaultView="compoundView!1" 
                searchId="{CorrelationParameter_14}" 
                folder="/shared/Payment Search/Reports" 
                itemName="Condition_noprompt_set"/>
            </sawst:container></sawst:container>
            <sawst:container 
                cid="s:{CorrelationParameter_10}" 
                xsi:type="sawst:section"    
                rendered="true">
            <sawst:container 
                cid="n:condition" 
                xsi:type="sawst:navigation" 
                conditionId="{CorrelationParameter_13}" 
                conditionEvalStatus="complete" conditionMet="false">
                <sawst:container cid="r:{CorrelationParameter_8}" 
                xsi:type="sawst:{CorrelationParameter_8}" 
                links="bfd" 
                defaultView="compoundView!1" 
                searchId="{CorrelationParameter_14}" 
                folder="/shared/Payment Search/Reports" 
                itemName="Condition_noprompt_set"/>
            </sawst:container></sawst:container>
            <sawst:container 
                cid="s:{CorrelationParameter_11}" 
                xsi:type="sawst:section" 
                rendered="true"/>
            </sawst:container></sawst:container>
            </sawst:envState>
        &fmapId={fmapId}
        &reloadTargets=d:dashboard~p:{CorrelationParameter}~r:{CorrelationParameter_3}
        &DashboardCaption=Payment Search Tool
        &Page=Search Page
        &PageDelayedState=NotDelayed
        &PortalPath=/shared/Payment Search/_portal/Payment Search Tool
        &Action=
        &ViewID=
        &IgnoreBypassCacheOption=ignoreBypassCache
        &_scid=
        &icharset=utf-8",
        EXTRARES,
        /**/
        LAST);
于 2018-04-24T13:16:51.910 回答
0

您是否尝试过重新执行相同的请求,直到获得所需的响应。如下所示:

x:
web_reg_find("Text=<Some Response>",SaveCount=count);
web_custom_request("saw.dll_8",
.., LAST);
i = atoi(lr_eval_string("{count}"));
if (i == 0)
    goto x;
else
    continue;

*提供是否可以多次执行相同的 web_custom_request。

于 2018-04-25T12:26:12.283 回答