What is that I should be looking for.
  I want to try my best with JWebUnit before I explore another alternative.
   
  Thanks
  Modha/-

Julien HENRY <[EMAIL PROTECTED]> wrote:
          It's very strange.

You should really try with tcpmon to monitor what is happening.

++

Julien

  ----- Message d'origine ----
De : Modha Kumar <[EMAIL PROTECTED]>
À : Usage problems for JWebUnit <[email protected]>
Envoyé le : Mercredi, 7 Mars 2007, 19h54mn 06s
Objet : Re: [JWebUnit-users] Re : Re : Re : setBaseUrl problem

  ---------CONTENT-TYPE--------
  
  ----------HEADERS---------
  [name=Server, value=Apache-Coyote/1.1, name=Set-Cookie, 
value=JSESSIONID=BC5F6B0CC6E2896B76C50DF5EAB42F92; Path=/cc, 
name=Cache-Control, value=max-age=300, name=Content-Length, value=1937, 
name=Date, value=Wed, 07 Mar 2007 18:52:53 GMT]
  -----------BODY--------------
  [EMAIL PROTECTED]


Julien HENRY <[EMAIL PROTECTED]> wrote:       Is this really what you get with 
HtmlUnit?

Could you give me the result of:
...
System.out.println("---------CONTENT-TYPE--------");
System.out.println(p.getWebResponse().getContentType());
System.out.println("----------HEADERS---------");
System.out.println(p.getWebResponse().getResponseHeaders());
System.out.println("-----------BODY--------------");
System.out.println(p.getWebResponse().getResponseBody());

++

Julien

  ----- Message d'origine ----
De : Modha Kumar <[EMAIL PROTECTED]>
À : Usage problems for JWebUnit <[email protected]>
Envoyé le : Mercredi, 7 Mars 2007, 19h29mn 09s
Objet : Re: [JWebUnit-users] Re : Re : setBaseUrl problem

  You are right. With your HTMLUnit code I get (as pasted below). Any Idea how 
I should proceed. When I view source on the html page it looks like any html 
page.
   
  =====================================================
  <html>
  <head>
  <title>MyApp</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta http-equiv="Page-Enter" content="RevealTrans(Duration=0,Transition=0)">
  <meta http-equiv="Cache-Control" content="no-cache">
  <meta http-equiv="Pragma" content="no-cache">
  <meta http-equiv="Expires" content="0">
  <link rel="SHORTCUT ICON" href="resources/images/favicon.ico">
  </head>
  <script>
  if 
(window.location.href.toLowerCase().indexOf('http://localhost:8080/cc/MyApp.do'.toLowerCase())
 == -1) {
  window.location.href = 'http://localhost:8080/cc/MyApp.do';
  }
  </script>
  <frameset id="toplevel_frameset" border="1" bordercolor="#000000" 
frameborder="1" framespacing="0" topmargin="0" leftmargin="0" marginheight="0" 
marginwidth="0" rows="100%,0,0,0,0">
  http://localhost:8080/cc/MyApp.do?inFrame=mainframe&r=36512022"/>
  <%--These both have to be 0x0 in size instead of hidden, because we need to 
type on them with the ActiveX control--%>
  
  
  <%--This frame exist for use when some javascript needs a hidden frame to 
target. Nothing should ever assume that its contents are in a particular state, 
and it may be overwritten at any time--%>
  
  
  </frameset>
  </html>
  ===================================================

Julien HENRY <[EMAIL PROTECTED]> wrote:
      It seems the page is not HTML content. Are you using a kind of 
client-side XSL transformation?

Could you spy what your server send to you? You can use a tool like TCPMon.

You can also try the following HtmlUnit code:

WebClient wc = new WebClient();
Page p = wc.getPage("http://localhost:8080/cc/MyApp.do";);
System.out.println(p.getWebResponse().getContentType());
System.out.println(p.getWebResponse().getContentAsString());

  ----- Message d'origine ----
De : Modha Kumar <[EMAIL PROTECTED]>
À : Usage problems for JWebUnit <[email protected]>
Envoyé le : Mercredi, 7 Mars 2007, 18h33mn 39s
Objet : Re: [JWebUnit-users] Re : setBaseUrl problem

  Thanks for the reply. When I try that I get
  Mar 7, 2007 10:30:11 AM net.sourceforge.jwebunit.htmlunit.HtmlUnitDialog$1 
webWindowContentChanged
  INFO: Window "" changed : "no_html" became "no_html"
   
  I also see Java.lang.ClassCastException 
com.gargoylesoftware.htmlunit.UnexpectedPage.
  

Julien HENRY <[EMAIL PROTECTED]> wrote:
      Hi,

setBaseUrl should be used to avoid writing base url each time.

Try this:
  public void setUp() {
  setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_HTMLUNIT);
  getTestContext().setBaseUrl("http://localhost:8080/cc/";);
  }
  public void testSearch() throws Exception {
  beginAt("/MyApp.do");


  ----- Message d'origine ----
De : Modha Kumar <[EMAIL PROTECTED]>
À : [email protected]
Envoyé le : Mercredi, 7 Mars 2007, 17h18mn 14s
Objet : [JWebUnit-users] setBaseUrl problem

  Hi All
   
  How can I avoid Jwebunit appending / at the end of url
   
  http://localhost:8080/cc/MyApp.do works however when url is changes to
  http://localhost:8080/cc/MyApp.do/ it does not.
   
  Here is my program. Now i get http status 404 because of / appended at end.
   
  public void setUp() {
  setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_HTMLUNIT);
  getTestContext().setBaseUrl("http://localhost:8080/cc/MyApp.do";);
  }
  
  public void testSearch() throws Exception {
  beginAt("/");
  assertFormPresent("mainForm");
  setTextField("user", "su");
  setTextField("pass", "pass");
  clickButtonWithText("Login");
   
  Please let me know.
   
  Thanks
  -------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
  _______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users






  
---------------------------------
  Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! 
Questions/Réponses.-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

  -------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
  _______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users






  
---------------------------------
  Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! 
Questions/Réponses.-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

  -------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
  _______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users






  
---------------------------------
  Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! 
Questions/Réponses.-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

  -------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
  _______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users






  
---------------------------------
  Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! 
Questions/Réponses.-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to