From: Ritesh T. <rit...@gm...> - 2005-02-02 02:38:40
|
Hi, I am trying out HTMLUnit and trying to do a simple connect to sites such as www.yahoo.com or www.ebay.com. But I get the following error when getting the page. My suspicion is that its because the .js function library which is included has the variable defined. Any help will be appreciated. Ritesh ScriptException: enclosed exception was "ReferenceError: "ebay" is not defined. (Embedded script #1)" Script source code ebay.oDocument._getControl('poweredby')._exec('wr iteSource','<a href="http://pages.ebay.com/ebay_IBM.html" onclick="ebayShowPopup Window(this.href, \'Sponsor\', 285, 350); return false;"><img src="http://pics.e baystatic.com/aw/pics/navbar/poweredByLogo_112x22.gif" border="0"></a>'); |
From: David D.K. <ddk...@ki...> - 2005-02-02 04:08:25
|
Try setting a different browser string (e.g., one for Mozilla). The pages are probably using a syntax that only works in MSIE (which is the default browser string) and which isn't implemented in Htmlunit yet. The Google home page changes depending on the browser string used, and the MSIE version causes a JavaScript error with Htmlunit (last I checked). Dave On Feb 1, 2005, at 8:38 PM, Ritesh Trivedi wrote: > Hi, > > I am trying out HTMLUnit and trying to do a simple connect to sites > such as www.yahoo.com or www.ebay.com. But I get the following error > when getting the page. > > My suspicion is that its because the .js function library which is > included has the variable defined. > > Any help will be appreciated. > > Ritesh > > ScriptException: enclosed exception was "ReferenceError: "ebay" is not > defined. (Embedded script #1)" > Script source code ebay.oDocument._getControl('poweredby')._exec('wr > iteSource','<a href="http://pages.ebay.com/ebay_IBM.html" > onclick="ebayShowPopup > Window(this.href, \'Sponsor\', 285, 350); return false;"><img > src="http://pics.e > baystatic.com/aw/pics/navbar/poweredByLogo_112x22.gif" > border="0"></a>'); > |
From: Marc G. <mgu...@ya...> - 2005-02-02 08:07:43
|
Ritesh Trivedi wrote: > Hi, > > I am trying out HTMLUnit and trying to do a simple connect to sites > such as www.yahoo.com or www.ebay.com. But I get the following error > when getting the page. > > My suspicion is that its because the .js function library which is > included has the variable defined. > > Any help will be appreciated. > > Ritesh > > ScriptException: enclosed exception was "ReferenceError: "ebay" is not > defined. (Embedded script #1)" > Script source code ebay.oDocument._getControl('poweredby')._exec('wr > iteSource','<a href="http://pages.ebay.com/ebay_IBM.html" onclick="ebayShowPopup > Window(this.href, \'Sponsor\', 285, 350); return false;"><img src="http://pics.e > baystatic.com/aw/pics/navbar/poweredByLogo_112x22.gif" border="0"></a>'); > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |
From: Marc G. <mgu...@ya...> - 2005-02-02 08:11:08
|
Hi, Concerning ebay, it comes propably from a parsing problem. www.ebay.com page starts with something like <HTML XMLNS:IE> <head> <mainF1> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> and this <mainF1> (may vary, but allways such a stupid tag) causes the html parser (nekoHtml) to think that the <body> tag is missing just before it. Therefore all js definitions are not worked as they should. I've already mailed nekoHtml's author about that but I haven't become any answer. Marc. Ritesh Trivedi wrote: > Hi, > > I am trying out HTMLUnit and trying to do a simple connect to sites > such as www.yahoo.com or www.ebay.com. But I get the following error > when getting the page. > > My suspicion is that its because the .js function library which is > included has the variable defined. > > Any help will be appreciated. > > Ritesh > > ScriptException: enclosed exception was "ReferenceError: "ebay" is not > defined. (Embedded script #1)" > Script source code ebay.oDocument._getControl('poweredby')._exec('wr > iteSource','<a href="http://pages.ebay.com/ebay_IBM.html" onclick="ebayShowPopup > Window(this.href, \'Sponsor\', 285, 350); return false;"><img src="http://pics.e > baystatic.com/aw/pics/navbar/poweredByLogo_112x22.gif" border="0"></a>'); > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |