1 Reply Latest reply: Mar 1, 2012 3:56 AM by 834498 RSS

    post problem on OpenScript

    820608
      Hi,

      I'm currently developping a Load Testing Web/Http script on OpenScript. I have a problem with the submit method of WebHTTPForm object.

      When I want to playback my script directly after recording it, but I have a ERROR_HTTP_INVALID_SERVER_RESPONSE for the first post method call.

      code :

      http.form(22, "window[@index='0']//form[((@id='formIdent1' and @name='formIdent1') or @action='http://172.30.209.206:8080/iaprimo-web430la/ident1.jsf;jsessionid=340EF1103239782F71925EBD9F2397D9') and @index='1']")
                               .submit(null, http.postdata(http.param("formIdent1:idEtu", "PB11100154"),
                                                                  http.param("formIdent1:datnai", "09101977"),
                                                                  http.param("boutonValider", "{{web.input.boutonValider,Continuer}}"),
                                                                  http.param("formIdent1:_link_hidden_", "")),
                                         null, true, null, null, "window[@index='1']", null, null);


      The problem is on the request headers which is not as I expect :

      Recorded -->

      POST /iaprimo-web430la/ident1.jsf;jsessionid=340EF1103239782F71925EBD9F2397D9 HTTP/1.1
      Accept-Language: fr
      Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
      Connection: Keep-Alive
      Content-Length: 15643
      Content-Type: application/x-www-form-urlencoded
      Cookie: JSESSIONID=340EF1103239782F71925EBD9F2397D9
      Host: 172.30.209.206:8080
      Pragma: no-cache
      Referer: http://172.30.209.206:8080/iaprimo-web430la/ident1.jsf
      User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)


      Postdata:
      formIdent1%3AidEtuFake=
      &formIdent1%3AidEtu=PB11100154
      &formIdent1%3AdatnaiFake=
      &formIdent1%3Adatnai=09101977
      &boutonValider=Continuer
      &formIdent1_SUBMIT=1
      &formIdent1%3A_link_hidden_=
      &jsf_tree_64=[very long value, I removed it for readability]
      &jsf_state_64=[very long value, I removed it for readability]
      &jsf_viewid=%2Fident1.jsp

      GET /iaprimo-web430la/jsp/ident2.jsf HTTP/1.1
      Accept-Language: fr
      Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
      Connection: Keep-Alive
      Cookie: JSESSIONID=340EF1103239782F71925EBD9F2397D9
      Host: 172.30.209.206:8080
      Pragma: no-cache
      Referer: http://172.30.209.206:8080/iaprimo-web430la/ident1.jsf
      User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

      Playback -->

      POST /iaprimo-web430la/ident1.jsf;jsessionid=CCE9674077C2996A7F86102E145ADA60?formIdent1%3AidEtuFake=
      &formIdent1%3AidEtu=
      &formIdent1%3AdatnaiFake=
      &formIdent1%3Adatnai=
      &formIdent1_SUBMIT=1
      &formIdent1%3A_link_hidden_=
      &jsf_tree_64=[very long value, I removed it for readability]
      &jsf_state_64=[very long value, I removed it for readability]
      &jsf_viewid=%2Fident1.jsp HTTP/1.1
      Accept-Encoding: gzip
      Accept-Language: fr
      Accept: text/html, image/gif, image/jpeg, */*
      Connection: Keep-Alive
      Content-Length: 15643
      Content-Type: application/x-www-form-urlencoded
      Cookie: JSESSIONID=CCE9674077C2996A7F86102E145ADA60
      Host: 172.30.209.206:8080
      User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)


      Postdata:
      formIdent1%3AidEtuFake=
      &formIdent1%3AdatnaiFake=
      &formIdent1_SUBMIT=1
      &jsf_tree_64=[very long value, I removed it for readability]
      &jsf_state_64=[very long value, I removed it for readability]
      &jsf_viewid=%2Fident1.jsp
      &formIdent1%3AidEtu=PB11100154
      &formIdent1%3Adatnai=09101977
      &boutonValider=Continuer
      &formIdent1%3A_link_hidden_=

      Anyone can tell me why there is my args on the url post ?

      Thank you,

      Benoit.
        • 1. Re: post problem on OpenScript
          834498
          Hello Benoit
          As suggested over the phone yesterday, can you tell us if switching from Web recording mode to http (OpenScript preferences -> Record -> http -> General -> Miscelanous) fixed the problem?
          And then mark the thread as solved.
          Thx
          JB