You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(6) |
Jul
(17) |
Aug
(18) |
Sep
(22) |
Oct
(16) |
Nov
(6) |
Dec
(11) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(11) |
Feb
(10) |
Mar
(34) |
Apr
(26) |
May
(6) |
Jun
(22) |
Jul
(14) |
Aug
(4) |
Sep
(47) |
Oct
(69) |
Nov
(23) |
Dec
(21) |
2005 |
Jan
(53) |
Feb
(33) |
Mar
(92) |
Apr
(65) |
May
(63) |
Jun
(57) |
Jul
(43) |
Aug
(132) |
Sep
(61) |
Oct
(75) |
Nov
(60) |
Dec
(130) |
2006 |
Jan
(74) |
Feb
(87) |
Mar
(101) |
Apr
(58) |
May
(54) |
Jun
(42) |
Jul
(31) |
Aug
(67) |
Sep
(61) |
Oct
(71) |
Nov
(28) |
Dec
(58) |
2007 |
Jan
(53) |
Feb
(50) |
Mar
(96) |
Apr
(66) |
May
(55) |
Jun
(130) |
Jul
(99) |
Aug
(115) |
Sep
(37) |
Oct
(78) |
Nov
(24) |
Dec
(70) |
2008 |
Jan
(94) |
Feb
(85) |
Mar
(197) |
Apr
(274) |
May
(119) |
Jun
(143) |
Jul
(193) |
Aug
(99) |
Sep
(160) |
Oct
(120) |
Nov
(178) |
Dec
(109) |
2009 |
Jan
(238) |
Feb
(169) |
Mar
(115) |
Apr
(109) |
May
(131) |
Jun
(167) |
Jul
(144) |
Aug
(193) |
Sep
(155) |
Oct
(154) |
Nov
(97) |
Dec
(127) |
2010 |
Jan
(108) |
Feb
(127) |
Mar
(176) |
Apr
(113) |
May
(130) |
Jun
(200) |
Jul
(115) |
Aug
(80) |
Sep
(92) |
Oct
(101) |
Nov
(124) |
Dec
(53) |
2011 |
Jan
(67) |
Feb
(144) |
Mar
(88) |
Apr
(60) |
May
(89) |
Jun
(54) |
Jul
(68) |
Aug
(81) |
Sep
(48) |
Oct
(40) |
Nov
(10) |
Dec
(20) |
2012 |
Jan
(21) |
Feb
(28) |
Mar
(17) |
Apr
(35) |
May
(41) |
Jun
(44) |
Jul
(68) |
Aug
(67) |
Sep
(89) |
Oct
(58) |
Nov
(47) |
Dec
(56) |
2013 |
Jan
(49) |
Feb
(28) |
Mar
(46) |
Apr
(31) |
May
(28) |
Jun
(37) |
Jul
(34) |
Aug
(52) |
Sep
(42) |
Oct
(108) |
Nov
(59) |
Dec
(56) |
2014 |
Jan
(41) |
Feb
(72) |
Mar
(46) |
Apr
(21) |
May
(19) |
Jun
(17) |
Jul
(15) |
Aug
(40) |
Sep
(11) |
Oct
(3) |
Nov
(5) |
Dec
(31) |
2015 |
Jan
(11) |
Feb
(12) |
Mar
(19) |
Apr
(19) |
May
(38) |
Jun
(54) |
Jul
(14) |
Aug
(42) |
Sep
(14) |
Oct
(16) |
Nov
(26) |
Dec
(14) |
2016 |
Jan
(3) |
Feb
(1) |
Mar
(24) |
Apr
(5) |
May
(15) |
Jun
(14) |
Jul
(33) |
Aug
(19) |
Sep
(8) |
Oct
(10) |
Nov
|
Dec
(2) |
2017 |
Jan
(16) |
Feb
(12) |
Mar
(23) |
Apr
(8) |
May
(11) |
Jun
(20) |
Jul
(21) |
Aug
(20) |
Sep
|
Oct
(6) |
Nov
(9) |
Dec
(2) |
2018 |
Jan
(7) |
Feb
(5) |
Mar
(6) |
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
|
Dec
(4) |
2019 |
Jan
(2) |
Feb
(2) |
Mar
(3) |
Apr
(4) |
May
|
Jun
(4) |
Jul
(9) |
Aug
(2) |
Sep
|
Oct
(4) |
Nov
(1) |
Dec
(7) |
2020 |
Jan
(2) |
Feb
(6) |
Mar
(9) |
Apr
(1) |
May
(1) |
Jun
(15) |
Jul
(1) |
Aug
(1) |
Sep
(2) |
Oct
(6) |
Nov
(3) |
Dec
(5) |
2021 |
Jan
(3) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(6) |
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Anzinger, S. <SAn...@th...> - 2005-08-19 09:44:31
|
> -----Original Message----- > From: htm...@li... On Behalf=20 > Of Marc Guillemot > Which version of htmlunit do you use? I think that the=20 > problem is already fixed in CVS. Sorry, I use htmlunit-src-1.6 (The latest downloadable version) I flew over the webCVS but culdn't find any relevant fixes. Okay, but I should test it with the latest cvs version. Greets Stefan |
From: Marc G. <mgu...@ya...> - 2005-08-19 09:35:51
|
Oh, sorry, I've only seen that you're setting location.href and I've not checked that the setter for href is already implemented. The bug issue I quoted only concern the other properties of Location. Which version of htmlunit do you use? I think that the problem is already fixed in CVS. Marc. Anzinger, Stefan wrote: > >>-----Original Message----- >>From: htm...@li... On Behalf >>Of Marc Guillemot >> >>I think that it is related to following issue: "Properties on >>Location object defined as read only" >>http://sourceforge.net/tracker/index.php?func=detail&aid=12384 >>29&group_id=47038&atid=448266 >> >>You patch with the appropriate unit tests fixing the problem >>is welcome. > > > > No the problem you quoted is an other. > The target pages, where HTMLUnit navigate to, > are wrong, when the target Page contains an iframe or > something like that. > > The content of the first javascript-request (Page B) is > overwritten by loading the iframe Content (Page C). > The Problem is, when the javascript is executed a new window > in the property "WebClient.firstWindowStack_" is created and > the result page is loaded - if there Is any loaded in the > javascript - into the top window on this stack. > > When we call the javascript event handler, a new empty > window is created (in the method > HtmlElement.executeJavaScriptIfPossible()), > the event fills the window with the content of Page B and > the iframe of Page B fills the content with Page C. > > The Patches will follow .. > > Greets > Stefan Anzinger > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |
From: Romain T. <rth...@sf...> - 2005-08-19 08:50:02
|
That's what i thought, but i didn't see any conflict the first time i=20 searched. Maybe i was tired, because i searched a second time after your=20 reply, i found it quickly... Sorry for such a stupid mistake, and thanks for your help. Romain Marc Guillemot a =E9crit : > Looks like you've got the wrong httpclient lib on your classpath. Are=20 > your sure to have only the jars of htmlunit's lib dir and no other=20 > version of httpclient on your classpath? > > Marc. > > Romain Thouvenin wrote: > >> I wrote a very simple test to use HtmlUnit, but it fails at the first=20 >> line. I don't understand what can be my error. >> >> Here is the code of the test : >> public class TestNavig{ >> public static void main(String[] args) { >> WebClient browser =3D new WebClient(); >> HtmlPage identPage =3D (HtmlPage) browser.getPage(new=20 >> URL("http://localhost:8080/")); >> } >> } >> >> And the StackTrace of the thrown exception : >> java.lang.NoSuchMethodError:=20 >> org.apache.commons.httpclient.HttpClient.getParams()Lorg/apache/common= s/httpclient/params/HttpClientParams;=20 >> >> at=20 >> com.gargoylesoftware.htmlunit.HttpWebConnection.getHttpClientFor(HttpW= ebConnection.java:301)=20 >> >> at=20 >> com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebCon= nection.java:131)=20 >> >> at=20 >> com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java= :1588)=20 >> >> at=20 >> com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java= :1562)=20 >> >> at=20 >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:359) >> at=20 >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:415) >> at com.sfwan.tester.tests.TestNavig.main(TestNavig.java:31) >> >> I'm using HtmlUnit-1.6 and all the jars provided in the lib directory=20 >> of the zip I've downloaded are in my classpath. >> Does anybody understand wich mistake i've made ? >> >> Thanks, >> Romain >> >> >> >> ------------------------------------------------------- >> SF.Net email is Sponsored by the Better Software Conference & EXPO >> September 19-22, 2005 * San Francisco, CA * Development Lifecycle=20 >> Practices >> Agile & Plan-Driven Development * Managing Projects & Teams * Testing=20 >> & QA >> Security * Process Improvement & Measurement *=20 >> http://www.sqe.com/bsce5sf >> _______________________________________________ >> Htmlunit-user mailing list >> Htm...@li... >> https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle=20 > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing=20 > & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5= sf > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > |
From: Anzinger, S. <SAn...@th...> - 2005-08-19 08:45:47
|
> -----Original Message----- > From: htm...@li... On Behalf=20 > Of Marc Guillemot > > I think that it is related to following issue: "Properties on=20 > Location object defined as read only"=20 > http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D12384 > 29&group_id=3D47038&atid=3D448266 >=20 > You patch with the appropriate unit tests fixing the problem=20 > is welcome. No the problem you quoted is an other. The target pages, where HTMLUnit navigate to,=20 are wrong, when the target Page contains an iframe or=20 something like that. The content of the first javascript-request (Page B) is=20 overwritten by loading the iframe Content (Page C). The Problem is, when the javascript is executed a new window=20 in the property "WebClient.firstWindowStack_" is created and=20 the result page is loaded - if there Is any loaded in the=20 javascript - into the top window on this stack. When we call the javascript event handler, a new empty=20 window is created (in the method HtmlElement.executeJavaScriptIfPossible()),=20 the event fills the window with the content of Page B and=20 the iframe of Page B fills the content with Page C. The Patches will follow .. Greets Stefan Anzinger |
From: Marc G. <mgu...@ya...> - 2005-08-19 08:38:09
|
Looks like you've got the wrong httpclient lib on your classpath. Are your sure to have only the jars of htmlunit's lib dir and no other version of httpclient on your classpath? Marc. Romain Thouvenin wrote: > I wrote a very simple test to use HtmlUnit, but it fails at the first > line. I don't understand what can be my error. > > Here is the code of the test : > public class TestNavig{ > public static void main(String[] args) { > WebClient browser = new WebClient(); > HtmlPage identPage = (HtmlPage) browser.getPage(new > URL("http://localhost:8080/")); > } > } > > And the StackTrace of the thrown exception : > java.lang.NoSuchMethodError: > org.apache.commons.httpclient.HttpClient.getParams()Lorg/apache/commons/httpclient/params/HttpClientParams; > > at > com.gargoylesoftware.htmlunit.HttpWebConnection.getHttpClientFor(HttpWebConnection.java:301) > > at > com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:131) > > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1588) > > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1562) > > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:359) > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:415) > at com.sfwan.tester.tests.TestNavig.main(TestNavig.java:31) > > I'm using HtmlUnit-1.6 and all the jars provided in the lib directory of > the zip I've downloaded are in my classpath. > Does anybody understand wich mistake i've made ? > > Thanks, > Romain > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |
From: Romain T. <tho...@ii...> - 2005-08-19 08:30:23
|
I wrote a very simple test to use HtmlUnit, but it fails at the first line. I don't understand what can be my error. Here is the code of the test : public class TestNavig{ public static void main(String[] args) { WebClient browser = new WebClient(); HtmlPage identPage = (HtmlPage) browser.getPage(new URL("http://localhost:8080/")); } } And the StackTrace of the thrown exception : java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpClient.getParams()Lorg/apache/commons/httpclient/params/HttpClientParams; at com.gargoylesoftware.htmlunit.HttpWebConnection.getHttpClientFor(HttpWebConnection.java:301) at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:131) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1588) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1562) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:359) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:415) at com.sfwan.tester.tests.TestNavig.main(TestNavig.java:31) I'm using HtmlUnit-1.6 and all the jars provided in the lib directory of the zip I've downloaded are in my classpath. Does anybody understand wich mistake i've made ? Thanks, Romain |
From: Marc G. <mgu...@ya...> - 2005-08-19 06:51:00
|
Hi, I think that it is related to following issue: "Properties on Location object defined as read only" http://sourceforge.net/tracker/index.php?func=detail&aid=1238429&group_id=47038&atid=448266 You patch with the appropriate unit tests fixing the problem is welcome. Marc. Anzinger, Stefan wrote: > Hello! > > I've found a problem with handling links done with javascript: > > a.html: > ------------------------------------------------------------- > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>Page A</title> > </head> > <body> > <a href="#" onclick="document.location.href='b.html'" > name="link">link</a> > </body> > </html> > ------------------------------------------------------------- > > b.html: > ------------------------------------------------------------- > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>Page B</title> > </head> > <body> > <iframe src="c.html"></iframe> > </body> > </html> > ------------------------------------------------------------- > > c.html: > ------------------------------------------------------------- > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>Page C</title> > </head> > <body> > test > </body> > </html> > ------------------------------------------------------------- > > Testprogram: > ------------------------------------------------------------- > WebClient client = new WebClient(); > HtmlPage p = (HtmlPage)client.getPage(new URL("http://.../a.html")); > HtmlAnchor b = p.getAnchorByName("link"); > p = (HtmlPage)b.click(); > System.out.println("We are on " + p.getTitleText()); > ------------------------------------------------------------- > > > HTMLUnit navigate to Page A. > When the href attribute is empty (href="") HTMLUnit will navigate to > Page C. > Mozilla and IE will navigate to Page B (with href="#"). > > I've fixed this problem for myself temporary. I can send the > code-changes, when needed. > > > Stefan Anzinger > GoldenSource Corporation > Development Center Austria > A-4066 Pasching, Plus-Kaufstr.7 > Phone +43 (7229) 76656-51 > Fax +43 (7229) 76656-99 > E-mail: san...@th... > http://www.thegoldensource.com > This message is for the named person's use only. It may contain > confidential, proprietary or legally privileged information. No > confidentiality or privilege is waived or lost by any erroneous > transmission. If you receive this message in error, please immediately > destroy it and notify the sender. You must not, directly or indirectly, > use, disclose, distribute, or copy any part of this message if you are > not the intended recipient. > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |
From: Anzinger, S. <SAn...@th...> - 2005-08-18 23:59:50
|
Hello! I've found a problem with handling links done with javascript: a.html: ------------------------------------------------------------- <html xmlns=3D"http://www.w3.org/1999/xhtml"> <head> <title>Page A</title> </head> <body> <a href=3D"#" onclick=3D"document.location.href=3D'b.html'" name=3D"link">link</a> </body> </html> ------------------------------------------------------------- b.html: ------------------------------------------------------------- <html xmlns=3D"http://www.w3.org/1999/xhtml"> <head> <title>Page B</title> </head> <body> <iframe src=3D"c.html"></iframe> </body> </html> ------------------------------------------------------------- c.html: ------------------------------------------------------------- <html xmlns=3D"http://www.w3.org/1999/xhtml"> <head> <title>Page C</title> </head> <body> test </body> </html> ------------------------------------------------------------- Testprogram: ------------------------------------------------------------- WebClient client =3D new WebClient(); HtmlPage p =3D (HtmlPage)client.getPage(new URL("http://.../a.html")); =20 HtmlAnchor b =3D p.getAnchorByName("link"); p =3D (HtmlPage)b.click(); System.out.println("We are on " + p.getTitleText()); ------------------------------------------------------------- HTMLUnit navigate to Page A. When the href attribute is empty (href=3D"") HTMLUnit will navigate to Page C. Mozilla and IE will navigate to Page B (with href=3D"#"). I've fixed this problem for myself temporary. I can send the code-changes, when needed. Stefan Anzinger=20 GoldenSource Corporation Development Center Austria A-4066 Pasching, Plus-Kaufstr.7=20 Phone +43 (7229) 76656-51=20 Fax +43 (7229) 76656-99=20 E-mail: san...@th...=20 http://www.thegoldensource.com This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any erroneous transmission. If you receive this message in error, please immediately destroy it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, or copy any part of this message if you are not the intended recipient. |
From: Sridhar R. <Sri...@Su...> - 2005-08-18 22:15:43
|
Hi, Is there any way I can use HtmlUnit to right click on an Anchor (link) and launch a new tab or window ? Thanks Sridhar Mike Bowler wrote: > Gael Harbonnier wrote: > > >>Ok I started to study the source code but I noticed that the html is >>well parsed when I call >> >>WebResponse rep = webClient.getWebConnection().getResponse(new >>WebRequestSettings(url)); >>System.out.println(rep.getContentAsString()); > > > > I've never seen NekoHTML fail to parse legal html. The only time I've > seen it get confused is when the html is really badly formed. > > What you get from asXml() is the DOM tree after NekoHTML has parsed it. > If the elements you want aren't there then NekoHTML stripped them out. > If you believe that the html is correct and that NekoHTML has a bug then > either post some html samples here or send them to the author of > NekoHTML - http://people.apache.org/~andyc/neko/doc/html/ > > An easy way to see if your html is legal is to run it through the W3C > validator - http://validator.w3.org/ > > If NekoHtml can't parse the html then I'd almost guarentee that it won't > pass the validator either. > > Hope this helps. > -- Sridhar R |
From: Marc G. <mgu...@ya...> - 2005-08-17 13:35:37
|
Seems that hmlunit/Rhino doesn't like your js. Can you reduce your js code to the minimal one producing this effect and open a bug issue for this? Marc. kishore wrote: > Hi All, > > While testing a website I set the password and when I > click on submit the app goes into an indefinite loop. The same works > properly when I do the operations in IE. After clicking on submit the > page which opens up has 3 frames inside the page. Is having multiple > frames supported in htmlunit > > > > This is my source code > > public void testHomePage() throws Exception { > > final WebClient webClient = new WebClient(); > > webClient.setRedirectEnabled(true); > > final URL url = new URL("http://localhost:8094/pi"); > > boolean isloaded=false; > > HtmlPage page ; > > page = (HtmlPage)webClient.getPage(url); > > HtmlAnchor > aref=(HtmlAnchor)page.getFirstAnchorByText("Sign In"); > > final HtmlPage page2=(HtmlPage)aref.click(); > > final HtmlForm form = page2.getFormByName("login"); > > final HtmlSubmitInput button > > = > (HtmlSubmitInput)form.getInputByValue("Sign in"); > > final HtmlInput textField > > = (HtmlInput)form.getInputByName("passwd"); > > textField.setValueAttribute("kk"); > > final HtmlPage page3 = (HtmlPage)form.submit(); > > aref=(HtmlAnchor)page.getFirstAnchorByText("New Document"); > > assertEquals("New Document", aref.asText() ); > > } > > When it tries to execute the form.submit it tries to load the page which > has 3 frames and then it goes into an indefinite loop. > SEVERE: runtimeError: message=[Too deep recursion while > parsing] sourceName=[/pi/common/scripts/actionMgr.js] line=[72] > lineSource=[null] lineOffset=[0] > > > > Is this scenario handled in HTMLunit. If yes. What mistake am > I making? > > > > Thanks, > > Kishore > |
From: kishore <ki...@pi...> - 2005-08-17 12:31:57
|
Hi All, While testing a website I set the password and when I click on submit the app goes into an indefinite loop. The same works properly when I do the operations in IE. After clicking on submit the page which opens up has 3 frames inside the page. Is having multiple frames supported in htmlunit This is my source code public void testHomePage() throws Exception { final WebClient webClient = new WebClient(); webClient.setRedirectEnabled(true); final URL url = new URL("http://localhost:8094/pi"); boolean isloaded=false; HtmlPage page ; page = (HtmlPage)webClient.getPage(url); HtmlAnchor aref=(HtmlAnchor)page.getFirstAnchorByText("Sign In"); final HtmlPage page2=(HtmlPage)aref.click(); final HtmlForm form = page2.getFormByName("login"); final HtmlSubmitInput button = (HtmlSubmitInput)form.getInputByValue("Sign in"); final HtmlInput textField = (HtmlInput)form.getInputByName("passwd"); textField.setValueAttribute("kk"); final HtmlPage page3 = (HtmlPage)form.submit(); aref=(HtmlAnchor)page.getFirstAnchorByText("New Document"); assertEquals("New Document", aref.asText() ); } When it tries to execute the form.submit it tries to load the page which has 3 frames and then it goes into an indefinite loop. SEVERE: runtimeError: message=[Too deep recursion while parsing] sourceName=[/pi/common/scripts/actionMgr.js] line=[72] lineSource=[null] lineOffset=[0] Is this scenario handled in HTMLunit. If yes. What mistake am I making? Thanks, Kishore |
From: Marc G. <mgu...@ya...> - 2005-08-17 08:34:47
|
I think that I've now fixed it adapting your proposition but we definitely need test for this stuff. What for an element does your js create with document.createElement? Marc. Hani Suleiman wrote: > The fix is pretty trivial, adding the following two lines to > getStateForUrl, before iterating through httpClients_: > > domain = domain + ":" + url.getPort(); > rootDomain = rootDomain + ":" + url.getPort(); > > This does make some tests fail, but the tests are rather...silly. They > use a key which can no longer exist anymore (no port part). > > Anyway, that does help me move along a little bit, but the next > obstacle is that I get the exception below. Any ideas? > > java.lang.ClassCastException: org.mozilla.javascript.NativeObject > at > com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.makeJavaScript > Object(SimpleScriptable.java:126) > at > com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.makeScriptable > For(SimpleScriptable.java:399) > at com.gargoylesoftware.htmlunit.html.DomNode.getScriptObject > (DomNode.java:438) > at > com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.getScriptableF > or(SimpleScriptable.java:375) > at > com.gargoylesoftware.htmlunit.javascript.host.Document.jsxFunction_creat > eElement(Document.java:550) > at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:174) > at org.mozilla.javascript.FunctionObject.call (FunctionObject.java:456) > at org.mozilla.javascript.Interpreter.interpret(Interpreter.java: 3026) > at org.mozilla.javascript.Interpreter.interpret(Interpreter.java: 2164) > at org.mozilla.javascript.InterpretedFunction.call > (InterpretedFunction.java:140) > at org.mozilla.javascript.ContextFactory.doTopCall > (ContextFactory.java:304) > at org.mozilla.javascript.ScriptRuntime.doTopCall > (ScriptRuntime.java:2769) > at org.mozilla.javascript.Interpreter.interpret(Interpreter.java: 2145) > at org.mozilla.javascript.InterpretedFunction.call > (InterpretedFunction.java:140) > at > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction > (JavaScriptEngine.java:299) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeOnLoadHandlersIfNeede > d(HtmlPage.java:964) > > == CALLING JAVASCRIPT == > > function () { > func(); > oldonload(); > } > |
From: Marc G. <mgu...@ya...> - 2005-08-17 07:54:48
|
Hi, have a look at the patch proposed by Daniel Gredler for "Easy (insecure) https support": http://sourceforge.net/tracker/index.php?func=detail&aid=1082409&group_id=47038&atid=448269 Marc. Ramachandran, Neelamegam wrote: > Hi, > > I want to accept all the certificates irrespective of whether it is > trusted or not. I tried the following code snippet but, still I am > getting CertificateException. Is there a solution for this? > > TrustManager[] trustAllCerts = new TrustManager[]{ > > new X509TrustManager() { > > public java.security.cert.X509Certificate[] > getAcceptedIssuers() { > > return null; > > } > > public void checkClientTrusted( > > java.security.cert.X509Certificate[] certs, > String authType) { > > } > > public void checkServerTrusted( > > java.security.cert.X509Certificate[] certs, > String authType) { > > } > > } > > }; > > > > // Install the all-trusting trust manager > > try { > > SSLContext sc = SSLContext.getInstance("SSL"); > > sc.init(null, trustAllCerts, new > java.security.SecureRandom()); > > > HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); > > } catch (Exception e) { > > } > > > > Exception stacktrace: > > javax.net.ssl.SSLHandshakeException: > java.security.cert.CertificateException: Couldn't find trusted certificate > > at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(Unknown > Source) > > at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source) > > at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source) > > at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(Unknown Source) > > at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(Unknown Source) > > at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(Unknown Source) > > at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source) > > at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(Unknown Source) > > at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source) > > at > com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source) > > at java.io.BufferedOutputStream.flushBuffer(Unknown Source) > > at java.io.BufferedOutputStream.flush(Unknown Source) > > at > org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:825) > > at > org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1967) > > at > org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993) > > at > org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:393) > > at > org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:168) > > at > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:393) > > at > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324) > > at > com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:137) > > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1588) > > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1562) > > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:359) > > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:415) > > at TestPopup.main(TestPopup.java:62) > > Caused by: java.security.cert.CertificateException: Couldn't find > trusted certificate > > at > com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.a(Unknown Source) > > at > com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown > Source) > > at > com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unknown > Source) > > ... 22 more > > > > Thanks, > > Neel. > |
From: Marc G. <mgu...@ya...> - 2005-08-17 07:29:53
|
I guess that these functions are not yet implemented in htmlunit. Please open a feature request issue for this. Marc. Gregory Mcshea wrote: > Hi, > > I'm new to HTML Unit. The application I am testing makes heavy use of > javascript in libraries. When accessing a page in my application I am > receiving the following error when the onload is executed: > > com.gargoylesoftware.htmlunit.ScriptException: TypeError: > addEventListener is not a function. (/test/mainlib.js#3800) > > This happens when simulating the Mozilla agent. I receive a similar > error for attachEvent if simulating the IE agent. The addEventListener > call causing the error is in a for loop that iterates through an array > of events adding a listener for each event like this: > > for(var a=0;a<13;a++) > { > HTMLDocument.addEventListener(eventlist[a],fname,false); > } > > Any ideas on why HTML Unit is throwing this error? The javascript works > fine when run in the browsers themselves. > > Thanks, > Greg |
From: Ramachandran, N. <ne...@am...> - 2005-08-16 23:24:25
|
Hi, I want to accept all the certificates irrespective of whether it is = trusted or not. I tried the following code snippet but, still I am = getting CertificateException. Is there a solution for this? TrustManager[] trustAllCerts =3D new TrustManager[]{ new X509TrustManager() { public java.security.cert.X509Certificate[] = getAcceptedIssuers() { return null; } public void checkClientTrusted( java.security.cert.X509Certificate[] certs, = String authType) { } public void checkServerTrusted( java.security.cert.X509Certificate[] certs, = String authType) { } } }; =20 // Install the all-trusting trust manager try { SSLContext sc =3D SSLContext.getInstance("SSL"); sc.init(null, trustAllCerts, new = java.security.SecureRandom()); = HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); } catch (Exception e) { } =20 =20 Exception stacktrace: javax.net.ssl.SSLHandshakeException: = java.security.cert.CertificateException: Couldn't find trusted = certificate at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(Unknown = Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown = Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown = Source) at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(Unknown Source) at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(Unknown Source) at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown = Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(Unknown = Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown = Source) at = com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source) at java.io.BufferedOutputStream.flushBuffer(Unknown Source) at java.io.BufferedOutputStream.flush(Unknown Source) at = org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(Htt= pConnection.java:825) at = org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.= java:1967) at = org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:= 993) at = org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMet= hodDirector.java:393) at = org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethod= Director.java:168) at = org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:39= 3) at = org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:32= 4) at = com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnec= tion.java:137) at = com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:15= 88) at = com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:15= 62) at = com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:359) at = com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:415) at TestPopup.main(TestPopup.java:62) Caused by: java.security.cert.CertificateException: Couldn't find = trusted certificate at = com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.a(Unknown Source) at = com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unkn= own Source) at = com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unkn= own Source) ... 22 more =20 Thanks, Neel. |
From: Gregory M. <gre...@or...> - 2005-08-16 21:34:27
|
Hi, I'm new to HTML Unit. The application I am testing makes heavy use of = javascript in libraries. When accessing a page in my application I am = receiving the following error when the onload is executed: com.gargoylesoftware.htmlunit.ScriptException: TypeError: = addEventListener is not a function. (/test/mainlib.js#3800) This happens when simulating the Mozilla agent. I receive a similar = error for attachEvent if simulating the IE agent. The addEventListener = call causing the error is in a for loop that iterates through an array = of events adding a listener for each event like this: for(var a=3D0;a<13;a++) { HTMLDocument.addEventListener(eventlist[a],fname,false); } Any ideas on why HTML Unit is throwing this error? The javascript works = fine when run in the browsers themselves. Thanks, Greg |
From: Hani S. <ha...@fo...> - 2005-08-15 20:26:35
|
The fix is pretty trivial, adding the following two lines to getStateForUrl, before iterating through httpClients_: domain = domain + ":" + url.getPort(); rootDomain = rootDomain + ":" + url.getPort(); This does make some tests fail, but the tests are rather...silly. They use a key which can no longer exist anymore (no port part). Anyway, that does help me move along a little bit, but the next obstacle is that I get the exception below. Any ideas? java.lang.ClassCastException: org.mozilla.javascript.NativeObject at com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.makeJavaScript Object(SimpleScriptable.java:126) at com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.makeScriptable For(SimpleScriptable.java:399) at com.gargoylesoftware.htmlunit.html.DomNode.getScriptObject (DomNode.java:438) at com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.getScriptableF or(SimpleScriptable.java:375) at com.gargoylesoftware.htmlunit.javascript.host.Document.jsxFunction_creat eElement(Document.java:550) at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:174) at org.mozilla.javascript.FunctionObject.call (FunctionObject.java:456) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java: 3026) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java: 2164) at org.mozilla.javascript.InterpretedFunction.call (InterpretedFunction.java:140) at org.mozilla.javascript.ContextFactory.doTopCall (ContextFactory.java:304) at org.mozilla.javascript.ScriptRuntime.doTopCall (ScriptRuntime.java:2769) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java: 2145) at org.mozilla.javascript.InterpretedFunction.call (InterpretedFunction.java:140) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction (JavaScriptEngine.java:299) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeOnLoadHandlersIfNeede d(HtmlPage.java:964) == CALLING JAVASCRIPT == function () { func(); oldonload(); } On Aug 15, 2005, at 8:20 AM, Marc Guillemot wrote: > Hi, > > I agree that it may cause a problem. > > I've added the port in the key for getHttpClientFor(URL) to fix bug > http://sourceforge.net/tracker/index.php? > func=detail&aid=1195099&group_id=47038&atid=448266 > > and I hadn't time to look at how the port should be integrated in > getStateForUrl(URL). Therefore I've decided to ignore it a first > time as all this stuff should disappear when changes have been made > to use a single HttpClient. > > If you can test it and provide a patch I will integrate it asap. > > Marc. > > Hani Suleiman wrote: > >> This might be me missing something, but there's a rather >> disturbing bug in CVS in HttpWebConnection... >> In getHttpClientFor(URL), the key for the httpclients is >> calculated to be the protocol + host + port. Yet in getStateForUrl >> (URL), the condition to check for key matches only takes the host >> into consideration. >> So I'm rather perplexed how anyone testing on a non-default port >> with cookies can get things to work! >> Am I missing something? >> Hani >> ------------------------------------------------------- >> SF.Net email is Sponsored by the Better Software Conference & EXPO >> September 19-22, 2005 * San Francisco, CA * Development Lifecycle >> Practices >> Agile & Plan-Driven Development * Managing Projects & Teams * >> Testing & QA >> Security * Process Improvement & Measurement * http://www.sqe.com/ >> bsce5sf >> _______________________________________________ >> Htmlunit-user mailing list >> Htm...@li... >> https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * > Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/ > bsce5sf > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |
From: Marc G. <mgu...@ya...> - 2005-08-15 07:16:24
|
Hi, I agree that it may cause a problem. I've added the port in the key for getHttpClientFor(URL) to fix bug http://sourceforge.net/tracker/index.php?func=detail&aid=1195099&group_id=47038&atid=448266 and I hadn't time to look at how the port should be integrated in getStateForUrl(URL). Therefore I've decided to ignore it a first time as all this stuff should disappear when changes have been made to use a single HttpClient. If you can test it and provide a patch I will integrate it asap. Marc. Hani Suleiman wrote: > This might be me missing something, but there's a rather disturbing bug > in CVS in HttpWebConnection... > > In getHttpClientFor(URL), the key for the httpclients is calculated to > be the protocol + host + port. Yet in getStateForUrl(URL), the > condition to check for key matches only takes the host into consideration. > > So I'm rather perplexed how anyone testing on a non-default port with > cookies can get things to work! > > Am I missing something? > > Hani > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |
From: Marc G. <mgu...@ya...> - 2005-08-15 07:05:03
|
As far as I know, IE's view source shows the response received from the server not the result of possible changes that occured in the browser through js. This is exactly the same if you look at the response text through the WebResponse. If you can provide a minimal test case, then please open a bug issue for that. Marc. Steve Gray wrote: > That seems to have fixed one of the problems, but in another instance, a > body.onload() calls some javascript that changes a SPAN tag display:none to > display:inline, If I look at the source HTML when the page is in this > state, the SPAN graphic image is actually displayed, but if I look at the > source vie IE's "View Source" menu option, it shows display:none (exactly > what the IntelliJ debugger is showing for the source when using htmlunits > window.getEnclosedPage), BUT when using a source viewer that shows the body > via the outerHTML, the span is set to display:inline - which is what IE is > showing - I've tried to use the jsxGet_outerHTML method, but I can't figure > out how to get my HtmlPage case into the HTMLElement that this method > requires - any suggestions? BTW - the outerHTML viewer is from > www.thundermain.com/fullsource.html - pretty cool utility... > > Sorry for being a noob. > > ----- Original Message ----- > From: "Marc Guillemot" <mgu...@ya...> > To: <htm...@li...> > Sent: Friday, August 12, 2005 2:06 AM > Subject: Re: [Htmlunit-user] Getting a HtmlTextInput onchange event to fire > > > >>if you're sure that the event is not fired, please try to minimize the > > problem and open a bug issue for this. > >>If the onchange is fired and it triggers the load of a new page, then the > > newly loaded page will NEVER be > >>form.getPage()! Look at the page contained in the window. >> >>Marc. >> >>Steve Gray wrote: >> >>>Perhaps a little more information would be helpful - the onchange event >>>fires javascript to create values in other HtmlTextInput objects on the >>>page, and actually causes a page refresh - the page coming back from the >>>form.getPage() call does not have these new non-blank values. >>> >>>----- Original Message ----- >>>From: "Steve Gray" <SG...@Te...> >>>To: <htm...@li...> >>>Sent: Thursday, August 11, 2005 11:25 AM >>>Subject: Re: [Htmlunit-user] Getting a HtmlTextInput onchange event to > > fire > >>> >>> >>>>It's on by default, and we are not explicitly turning it off, so, yes, >>>>javascript is enabled. Here's the code: >>>> >>>>private static HtmlPage setInputText(HtmlForm form, String name, String >>>>value) throws Exception { >>>> >>>> HtmlTextInput textField = (HtmlTextInput) >>> >>>form.getInputByName(name); >>> >>> >>>> if (textField != null) { >>>> textField.setValueAttribute(value); >>>> } >>>> return form.getPage(); >>>>} >>>>----- Original Message ----- >>>>From: "Marc Guillemot" <mgu...@ya...> >>>>To: <htm...@li...> >>>>Sent: Thursday, August 11, 2005 11:18 AM >>>>Subject: Re: [Htmlunit-user] Getting a HtmlTextInput onchange event to >>> >>>fire >>> >>> >>>>>The onchange handler should be fired. May you have deactivated >>> >>>javascript? >>> >>> >>>>>Marc. >>>>> >>>>>Steve Gray wrote: >>>>> >>>>> >>>>>>I'm trying to set the value attribute of this input type=text object, >>>> >>>>but >>>> >>>> >>>>>>nothing I do seems to get the onchange event to fire - does htmlunit >>>> >>>>have an >>>> >>>> >>>>>>equivalent method to the IE DOM method fireEvent? See: >>>>>> >>>> > http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/fireevent.asp > >>>>>>Here's the tag: >>>>>><input type="text" name="doseWeightRate" maxlength="10" size="10" >>>> >>>>value="" >>>> >>>> >>>>>>onchange="doseWeightRateEntered()" class="rightAlign"> >>>>>> >>>>>>I use setValueAttribute, and the value changes, but I can't get the >>>> >>>>onchange >>>> >>>> >>>>>>event to fire. >>>>>> >>>>>>Thanks- >>>>>>Steve >>>>>> >>>>>> >>>>>> >>>>>>------------------------------------------------------- >>>>>>SF.Net email is Sponsored by the Better Software Conference & EXPO >>>>>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle >>>> >>>>Practices >>>> >>>> >>>>>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing >>> >>>& >>> >>>>QA >>>> >>>> >>>>>>Security * Process Improvement & Measurement * >>>> >>>>http://www.sqe.com/bsce5sf >>>> >>>> >>>>>>_______________________________________________ >>>>>>Htmlunit-user mailing list >>>>>>Htm...@li... >>>>>>https://lists.sourceforge.net/lists/listinfo/htmlunit-user >>>>>> >>>>> >>>>> >>>>> >>>>>------------------------------------------------------- >>>>>SF.Net email is Sponsored by the Better Software Conference & EXPO >>>>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle >>>> >>>>Practices >>>> >>>> >>>>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & >>> >>>QA >>> >>> >>>>>Security * Process Improvement & Measurement * >>> >>>http://www.sqe.com/bsce5sf >>> >>> >>>>>_______________________________________________ >>>>>Htmlunit-user mailing list >>>>>Htm...@li... >>>>>https://lists.sourceforge.net/lists/listinfo/htmlunit-user >>>> >>> >>> >>>------------------------------------------------------- >>>SF.Net email is Sponsored by the Better Software Conference & EXPO >>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle > > Practices > >>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & > > QA > >>>Security * Process Improvement & Measurement * > > http://www.sqe.com/bsce5sf > >>>_______________________________________________ >>>Htmlunit-user mailing list >>>Htm...@li... >>>https://lists.sourceforge.net/lists/listinfo/htmlunit-user >>> >> >> >> >>------------------------------------------------------- >>SF.Net email is Sponsored by the Better Software Conference & EXPO >>September 19-22, 2005 * San Francisco, CA * Development Lifecycle > > Practices > >>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA >>Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf >>_______________________________________________ >>Htmlunit-user mailing list >>Htm...@li... >>https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |
From: Marc G. <mgu...@ya...> - 2005-08-15 07:01:12
|
You can open a bug issue for that but note that your code is useless: when you use window.open, the opener property is automatically set to the current window. Marc. Ramachandran, Neelamegam wrote: > Hi, > > I am getting an error when I try to set the window.opener property. The > html works fine in all the browsers. > > ERROR [com.gargoylesoftware.htmlunit.ScriptEngine] runtimeError: > message=[Property "opener" is not writable for > com.gargoylesoftware.htmlunit.javascript.host.Window@290fbc. Cant set it > to: com.gargoylesoftware.htmlunit.javascript.host.Window@290fbc] > sourceName=[null] line=[0] lineSource=[null] lineOffset=[0] > > > > This is my Java code: > > final WebClient webClient = new WebClient(); > > webClient.setThrowExceptionOnScriptError(false); > > final URL url = new URL(urlString); > > final HtmlPage page = (HtmlPage)webClient.getPage(url); > > List anchors = page.getAnchors(); > > Iterator itr = anchors.iterator(); > > while(itr.hasNext()) { > > HtmlAnchor anchor = (HtmlAnchor)itr.next(); > > String text = anchor.getHrefAttribute(); > > if (text.startsWith("javascript:")) { > > HtmlPage page1 = (HtmlPage)anchor.click(); > > } > > } > > This is my HTML code: > > <html> > > <script> > > function openwin() { > > var win = window.open("http://www.google.com"); > > win.opener = this; > > } > > </script> > > <a href="javascript:openwin()">Open</a> > > </html> > > > > Thanks, > > Neel. > |
From: Hani S. <ha...@fo...> - 2005-08-14 19:08:30
|
This might be me missing something, but there's a rather disturbing bug in CVS in HttpWebConnection... In getHttpClientFor(URL), the key for the httpclients is calculated to be the protocol + host + port. Yet in getStateForUrl(URL), the condition to check for key matches only takes the host into consideration. So I'm rather perplexed how anyone testing on a non-default port with cookies can get things to work! Am I missing something? Hani |
From: Steve G. <SG...@Te...> - 2005-08-12 20:50:30
|
That seems to have fixed one of the problems, but in another instance, a body.onload() calls some javascript that changes a SPAN tag display:none to display:inline, If I look at the source HTML when the page is in this state, the SPAN graphic image is actually displayed, but if I look at the source vie IE's "View Source" menu option, it shows display:none (exactly what the IntelliJ debugger is showing for the source when using htmlunits window.getEnclosedPage), BUT when using a source viewer that shows the body via the outerHTML, the span is set to display:inline - which is what IE is showing - I've tried to use the jsxGet_outerHTML method, but I can't figure out how to get my HtmlPage case into the HTMLElement that this method requires - any suggestions? BTW - the outerHTML viewer is from www.thundermain.com/fullsource.html - pretty cool utility... Sorry for being a noob. ----- Original Message ----- From: "Marc Guillemot" <mgu...@ya...> To: <htm...@li...> Sent: Friday, August 12, 2005 2:06 AM Subject: Re: [Htmlunit-user] Getting a HtmlTextInput onchange event to fire > if you're sure that the event is not fired, please try to minimize the problem and open a bug issue for this. > > If the onchange is fired and it triggers the load of a new page, then the newly loaded page will NEVER be > form.getPage()! Look at the page contained in the window. > > Marc. > > Steve Gray wrote: > > Perhaps a little more information would be helpful - the onchange event > > fires javascript to create values in other HtmlTextInput objects on the > > page, and actually causes a page refresh - the page coming back from the > > form.getPage() call does not have these new non-blank values. > > > > ----- Original Message ----- > > From: "Steve Gray" <SG...@Te...> > > To: <htm...@li...> > > Sent: Thursday, August 11, 2005 11:25 AM > > Subject: Re: [Htmlunit-user] Getting a HtmlTextInput onchange event to fire > > > > > > > >>It's on by default, and we are not explicitly turning it off, so, yes, > >>javascript is enabled. Here's the code: > >> > >>private static HtmlPage setInputText(HtmlForm form, String name, String > >>value) throws Exception { > >> > >> HtmlTextInput textField = (HtmlTextInput) > > > > form.getInputByName(name); > > > >> if (textField != null) { > >> textField.setValueAttribute(value); > >> } > >> return form.getPage(); > >>} > >>----- Original Message ----- > >>From: "Marc Guillemot" <mgu...@ya...> > >>To: <htm...@li...> > >>Sent: Thursday, August 11, 2005 11:18 AM > >>Subject: Re: [Htmlunit-user] Getting a HtmlTextInput onchange event to > > > > fire > > > >> > >>>The onchange handler should be fired. May you have deactivated > > > > javascript? > > > >>>Marc. > >>> > >>>Steve Gray wrote: > >>> > >>>>I'm trying to set the value attribute of this input type=text object, > >> > >>but > >> > >>>>nothing I do seems to get the onchange event to fire - does htmlunit > >> > >>have an > >> > >>>>equivalent method to the IE DOM method fireEvent? See: > >>>> > >> > > http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/fireevent.asp > > > >>>>Here's the tag: > >>>><input type="text" name="doseWeightRate" maxlength="10" size="10" > >> > >>value="" > >> > >>>>onchange="doseWeightRateEntered()" class="rightAlign"> > >>>> > >>>>I use setValueAttribute, and the value changes, but I can't get the > >> > >>onchange > >> > >>>>event to fire. > >>>> > >>>>Thanks- > >>>>Steve > >>>> > >>>> > >>>> > >>>>------------------------------------------------------- > >>>>SF.Net email is Sponsored by the Better Software Conference & EXPO > >>>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle > >> > >>Practices > >> > >>>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing > > > > & > > > >>QA > >> > >>>>Security * Process Improvement & Measurement * > >> > >>http://www.sqe.com/bsce5sf > >> > >>>>_______________________________________________ > >>>>Htmlunit-user mailing list > >>>>Htm...@li... > >>>>https://lists.sourceforge.net/lists/listinfo/htmlunit-user > >>>> > >>> > >>> > >>> > >>>------------------------------------------------------- > >>>SF.Net email is Sponsored by the Better Software Conference & EXPO > >>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle > >> > >>Practices > >> > >>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & > > > > QA > > > >>>Security * Process Improvement & Measurement * > > > > http://www.sqe.com/bsce5sf > > > >>>_______________________________________________ > >>>Htmlunit-user mailing list > >>>Htm...@li... > >>>https://lists.sourceforge.net/lists/listinfo/htmlunit-user > >> > > > > > > > > ------------------------------------------------------- > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > > _______________________________________________ > > Htmlunit-user mailing list > > Htm...@li... > > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: Ramachandran, N. <ne...@am...> - 2005-08-12 20:17:08
|
Hi, I am getting an error when I try to set the window.opener property. The = html works fine in all the browsers. ERROR [com.gargoylesoftware.htmlunit.ScriptEngine] runtimeError: = message=3D[Property "opener" is not writable for = com.gargoylesoftware.htmlunit.javascript.host.Window@290fbc. Cant set it = to: com.gargoylesoftware.htmlunit.javascript.host.Window@290fbc] = sourceName=3D[null] line=3D[0] lineSource=3D[null] lineOffset=3D[0] =20 This is my Java code: final WebClient webClient =3D new WebClient(); webClient.setThrowExceptionOnScriptError(false); final URL url =3D new URL(urlString); final HtmlPage page =3D (HtmlPage)webClient.getPage(url); List anchors =3D page.getAnchors(); Iterator itr =3D anchors.iterator(); while(itr.hasNext()) { HtmlAnchor anchor =3D (HtmlAnchor)itr.next(); String text =3D anchor.getHrefAttribute(); if (text.startsWith("javascript:")) { HtmlPage page1 =3D (HtmlPage)anchor.click(); } } This is my HTML code: <html> <script> function openwin() { var win =3D window.open("http://www.google.com"); win.opener =3D this; } </script> <a href=3D"javascript:openwin()">Open</a> </html> =20 Thanks, Neel. |
From: Marc G. <mgu...@ya...> - 2005-08-12 08:02:53
|
if you're sure that the event is not fired, please try to minimize the problem and open a bug issue for this. If the onchange is fired and it triggers the load of a new page, then the newly loaded page will NEVER be form.getPage()! Look at the page contained in the window. Marc. Steve Gray wrote: > Perhaps a little more information would be helpful - the onchange event > fires javascript to create values in other HtmlTextInput objects on the > page, and actually causes a page refresh - the page coming back from the > form.getPage() call does not have these new non-blank values. > > ----- Original Message ----- > From: "Steve Gray" <SG...@Te...> > To: <htm...@li...> > Sent: Thursday, August 11, 2005 11:25 AM > Subject: Re: [Htmlunit-user] Getting a HtmlTextInput onchange event to fire > > > >>It's on by default, and we are not explicitly turning it off, so, yes, >>javascript is enabled. Here's the code: >> >>private static HtmlPage setInputText(HtmlForm form, String name, String >>value) throws Exception { >> >> HtmlTextInput textField = (HtmlTextInput) > > form.getInputByName(name); > >> if (textField != null) { >> textField.setValueAttribute(value); >> } >> return form.getPage(); >>} >>----- Original Message ----- >>From: "Marc Guillemot" <mgu...@ya...> >>To: <htm...@li...> >>Sent: Thursday, August 11, 2005 11:18 AM >>Subject: Re: [Htmlunit-user] Getting a HtmlTextInput onchange event to > > fire > >> >>>The onchange handler should be fired. May you have deactivated > > javascript? > >>>Marc. >>> >>>Steve Gray wrote: >>> >>>>I'm trying to set the value attribute of this input type=text object, >> >>but >> >>>>nothing I do seems to get the onchange event to fire - does htmlunit >> >>have an >> >>>>equivalent method to the IE DOM method fireEvent? See: >>>> >> > http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/fireevent.asp > >>>>Here's the tag: >>>><input type="text" name="doseWeightRate" maxlength="10" size="10" >> >>value="" >> >>>>onchange="doseWeightRateEntered()" class="rightAlign"> >>>> >>>>I use setValueAttribute, and the value changes, but I can't get the >> >>onchange >> >>>>event to fire. >>>> >>>>Thanks- >>>>Steve >>>> >>>> >>>> >>>>------------------------------------------------------- >>>>SF.Net email is Sponsored by the Better Software Conference & EXPO >>>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle >> >>Practices >> >>>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing > > & > >>QA >> >>>>Security * Process Improvement & Measurement * >> >>http://www.sqe.com/bsce5sf >> >>>>_______________________________________________ >>>>Htmlunit-user mailing list >>>>Htm...@li... >>>>https://lists.sourceforge.net/lists/listinfo/htmlunit-user >>>> >>> >>> >>> >>>------------------------------------------------------- >>>SF.Net email is Sponsored by the Better Software Conference & EXPO >>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle >> >>Practices >> >>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & > > QA > >>>Security * Process Improvement & Measurement * > > http://www.sqe.com/bsce5sf > >>>_______________________________________________ >>>Htmlunit-user mailing list >>>Htm...@li... >>>https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |
From: Sue Yi <su...@gm...> - 2005-08-11 19:22:11
|
Hi Marc, Thanks, that was an awesome suggestion! I'm now using a custom HtmlWebConnection which wraps HtmlWebConnection. And then setWebConnection on the WebClient to use it -- there are no more problems with illegal URI's. > "/" with "\"? Sure? Not "\" with "/"? You were right =3D) Sue On 8/11/05, Marc Guillemot <mgu...@ya...> wrote: > >>What does your browser do (Firefox for instance, because IE...): does i= t change the received "\" to "/"? > > > > Ya, I noticed IE replaces "/" with "\" ... and the tested application > > only needs to run on IE, so these uri's must be worked with. >=20 > "/" with "\"? Sure? Not "\" with "/"? > Does your "'/a/b/..\BIN\c.ASP" gets the same thinks as "'/a/b/../BIN/c.AS= P"? >=20 >=20 > >>Is it in a redirect or as src of a frame, what suggests your stack trac= e? > > > > I think it is as src of an IFrame .. the page being loaded has several = IFrames. > > > > Do you think it is possible to solve this without building HtmlUnit > > source with added code to convert "\" to "/"? >=20 > a complete fix would need to build htmlunit to be integrate. Nevertheless= I guess that you can write your own > WebConnection wrapping the default one and rewriting the urls containing = "\". >=20 > Marc. >=20 >=20 > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practic= es > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & Q= A > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |