1 Reply Latest reply on May 27, 2008 9:50 AM by Stan Silvert

    how to test child windows

    burela gupta Newbie

      Hi Stan,
      In my application the code is like this............


      <h:outputLink id="lookupCreatedBy" value="javascript:openPopUp('/LookUpEmployee.faces?lookUp=createdBy&searchFrom=filter');" style="position:relative;top:5 px;PADDING-LEFT: 2pt;">

      function openPopUp(url){
      url=url+"&popUp=new";
      var winl = (screen.width - 600) / 2;
      var wint = (screen.height - 400) / 2;
      var winprops = 'height=400px,width=500px,top='+wint+',left='+winl+'resizable=0,scrollbars=1,location=no';
      //popUp = window.open(url,'','location=no,scrollbars=yes,width=450,height=400');
      //popUp = window.open(url,'',winprops);
      //popUp.focus();
      popUp = window.showModalDialog(url,self,'dialogTop: '+ wint +';dialogLeft: '+ winl +
      ';dialogHeight: 400px; dialogWidth: 500px;edge: Raised; center: Yes; resizable: No;'+
      'status: 0;help: 0;');
      }

      ...........................................................................................................

      in my test case i have called......
      client.clikLink("lookupCreatedBy");
      assertEquals("/LookUpEmployee.jsp", server.getCurrentViewID());


      here i am not getting LookUpEmployee.jsp i am getting the server.getCurrentViewID() as my parent jsp...
      i need test my child jsp... if i click on the link one pop window is opening i need to test that jsp...
      please tell me what api methods i need use?

      Thanks &Regards,
      Nara