3 Replies Latest reply on Apr 17, 2008 8:46 AM by ssilvert

    test h:SelectOneMenu fail

    anngdo

      I've tested the component h:SelectOneMenu. My webpage has a SelectOneMenu with 5 option.I choose option 0 and submit (after submit redisplay this webpage), the html response as folow :
      山田 電気
      北� カメラ
      百万 ボルト
      グエン �ウ ジャン
      タ フン ミン

      but when I tested my webpage by jsfunit test,when i debug into test method, the function client.getWebResponse().getText() will return html code that contain (option 0 hasn't attribute selected) :
      山田 電気
      北� カメラ
      百万 ボルト
      グエン �ウ ジャン
      タ フン ミン

      Why option 0 hasn't attribute selected when i run jsfunit and how to know the webpage display correct (option 0 selected) when run testcase???

        • 1. Re: test h:SelectOneMenu fail
          anngdo

           

          "anngdo" wrote:
          I've tested the component h:SelectOneMenu. My webpage has a SelectOneMenu with 5 option.I choose option 0 and submit (after submit redisplay this webpage), the html response as folow :

          <option value="0" selected="selected">aa—</option>
          <option value="1">bb</option>
          <option value="2">ccƒˆ</option>
          <option value="3">dd</option>
          <option value="4">ee</option>

          but when I tested my webpage by jsfunit test,when i debug into test method, the function client.getWebResponse().getText() will return html code that contain (option 0 hasn't attribute selected) :

          <option value="0">aa—</option>
          <option value="1">bb</option>
          <option value="2">ccƒˆ</option>
          <option value="3">dd</option>
          <option value="4">ee</option>

          Why option 0 hasn't attribute selected when i run jsfunit and how to know the webpage display correct (option 0 selected) when run testcase???


          • 2. Re: test h:SelectOneMenu fail
            anngdo

             

            "anngdo" wrote:
            "anngdo" wrote:
            I've tested the component h:SelectOneMenu. My webpage has a SelectOneMenu with 5 option.I choose option 0 and submit (after submit redisplay this webpage), the html response as folow,option 0 has attribute selected="selected" :

            option value="0" selected="selected" aa /option


            but when I tested my webpage by jsfunit test,when i debug into test method, the function client.getWebResponse().getText() will return html code that contain (option 0 hasn't attribute selected) :

            option value="0" aa /option

            Why option 0 hasn't attribute selected when i run jsfunit and how to know the webpage display correct (option 0 selected) when run testcase???


            • 3. Re: test h:SelectOneMenu fail
              ssilvert

              Can you post your JSFUnit code and the relevant part of your jsp or xhtml page?

              Regards,

              Stan