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: Chris P. <ch...@fo...> - 2004-01-19 09:08:31
|
G'day, htm...@li... wrote: >>>web_client.addRequestHeader("Cookie", COOKIE); >>>page = (HtmlPage) web_client.getPage("http://localhost/cgi-bin/printenv"); >> >>I would have expected that to work but perhaps common-httpclient is >>stripping that header out. You are correct, see HttpMethodBase.addCookieRequestHeader() <http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java?view=markup> "Cookie" headers are removed in preference for those set in the HttpState. As a result, I use the following workaround: // Visit the domain for which the cookie is to be set. web_client.getPage(url); // Get the state for the domain - N.B. getWebConnection() is volatile. HttpState state = web_client.getWebConnection().getStateForUrl(url); // Set cookies. state.addCookies(new Cookie[]{ ... }); Additionally, for our server configuration I need to do the following *first* (need commons-httpclient nightly build - not yet in commons-httpclient-2.0-rc3): // Cookies in one header. HttpMethodParams.getDefaultParams().setParameter( HttpMethodParams.SINGLE_COOKIE_HEADER, new Boolean(true)); YMMV, Chris. |
From: Chris P. <ch...@fo...> - 2004-01-17 05:13:42
|
G'day, >>web_client.addRequestHeader("Cookie", COOKIE); >>page = (HtmlPage) web_client.getPage("http://localhost/cgi-bin/printenv"); > > I would have expected that to work but perhaps common-httpclient is > stripping that header out. That's possible: web_client.addRequestHeader("Http_Cookie", COOKIE); ^^^^ results in HTTP_HTTP_COOKIE in the request header. Chris. |
From: Mike B. <mb...@Ga...> - 2004-01-16 11:23:50
|
Chris Pudney wrote: > I would like a simple example of how to set a cookie in the WebClient > request header. I've tried the obvious: > > web_client.addRequestHeader("Cookie", COOKIE); > page = (HtmlPage) web_client.getPage("http://localhost/cgi-bin/printenv"); I would have expected that to work but perhaps common-httpclient is stripping that header out. There is no explicit way to set cookies in HtmlUnit at present. There is aleady a feature request to expose the underlying instance of common-httpclient which would solve this (and several other) problems. Unfortunately, this isn't a simple change and I haven't had time to work on it. If anyone else want's to tackle the issue of exposing commons-httpclient, I can explain what makes it a complex problem and what I think is the best solution. -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Chris P. <ch...@fo...> - 2004-01-16 10:37:18
|
G'day, Very sorry to ask what must be a FAQ (am running latest httpclient as per FAQ on cookies) but I am brand new to htmlunit and the list archive is dead, see <http://sourceforge.net/mailarchive/forum.php?forum=htmlunit-user>. I would like a simple example of how to set a cookie in the WebClient request header. I've tried the obvious: web_client.addRequestHeader("Cookie", COOKIE); page = (HtmlPage) web_client.getPage("http://localhost/cgi-bin/printenv"); but the response doesn't have HTTP_COOKIE set (pointing Mozilla at this URL with a set cookie works fine). Running: htmlunit-1.2.3 commons-httpclient-2.0-rc2 Been googling all day and can't see where I'm going wrong... TIA, Chris. |
From: Mike B. <mb...@Ga...> - 2004-01-10 14:15:15
|
Ahmet Taha Sakar wrote: > I am a computer science student and our teacher have given us a > project. <snipped> > No matter how much I tried I couldnt get it to work. I thought maybe > somebody here could have an idea. This sounds an awful lot like "can you do my homework for me?" and the answer to that question would be no. If that isn't your question then you might want to rephrase it. -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Ahmet T. S. <ah...@20...> - 2004-01-10 10:15:46
|
Hello, I am a computer science student and our teacher have given us a project. The objective is to pass a site entry protection system by configuring the htmlunit to simulate the correct browser and system setup. No matter how much I tried I couldnt get it to work. I thought maybe somebody here could have an idea. Here is the code that I am writing to execute the script (altough it is onLoad, I thought it would be necessary.) and here is the javascript code: <script language="JavaScript"> <!-- function bhawkGetVer(id) { return document.all("caps").getComponentVersion(id, "ComponentID"); } // --> </script> <script language="JavaScript"> <!-- function bhawkTest() { var bhfv = testFl(); var rplay = testReal(1); try { var bhrx = escape(getRPv()); } catch (e) {bhrx=-2;} var bhax = 0; var bhvb = 0; try{ bhax = isHere('Microsoft.ActiveXPlugin.1');} catch (e) {bhax=-2;} if (bhax >= 0) {bhvb=1;} try { var bhvr = bhVBver(); } catch (e) {bhvr=-2;} try{ bhqt = isHere('QuickTimeCheckObject.QuickTimeCheck.1');} catch (e) {bhqt=-2;} var bhqx = ""; try{ bhqx = getQTv(); } catch (e) {bhqx=-2;} bhqx = escape(convertQTv(bhqx)); try{ bhmp = isHere('MediaPlayer.MediaPlayer.1');} catch (e) {bhmp=-2;} var mpex = bhawkGetVer("{6BF52A52-394A-11d3-B153-00C04F79FAA6}"); if (mpex == "") {mpex = bhawkGetVer("{22D6F312-B0F6-11D0-94AB-0080C74C7E95}");} mpex = escape(mpex); var bhcd = screen.colorDepth; var bhsh = screen.height; var bhsw = screen.width; var bhiw = document.body.clientWidth; var bhih = document.body.clientHeight; var bhct = document.all("caps").connectionType; try{ var bhxm = isHere('Msxml2.DOMDocument.4.0'); if (bhxm > 0) bhxm=4; else { bhxm = isHere('Msxml2.SAXXMLReader.3.0'); if (bhxm > 0) bhxm=3; else { bhxm = isHere('MSXML2.XSLTemplate'); if (bhxm > 0) bhxm=2; else bhxm = isHere('Microsoft.XMLDOM'); } } } catch (e) {bhxm=-2;} var bhjr = ScriptEngineMajorVersion() + "." + ScriptEngineMinorVersion() + "." + ScriptEngineBuildVersion(); var d = new Date(); var bhtz = 0 - (d.getTimezoneOffset()/60); var bhdm = Date.parse(d.toGMTString()); var bhbd = escape(bhawkGetVer("{89820200-ECBD-11CF-8B85-00AA005B4383}")); var bhfs = screen.fontSmoothingEnabled; var bhls = clientInformation.systemLanguage.toLowerCase(); var bhlu = clientInformation.userLanguage.toLowerCase(); bhse = escape(navigator.appMinorVersion); var rs = "bhfv="+bhfv+"&bhrl="+rplay+"&bhrx="+bhrx+"&bhax="+bhax+"&bhvb="+bhvb+"&bhvr="+bhvr+"&bhqt="+bhqt+"&bhqx="+bhqx+"&bhmp="+bhmp+"&bhmx="+mpex+"&bhcd="+bhcd+"&bhsh="+bhsh+"&bhsw="+bhsw+"&bhiw="+bhiw+"&bhih="+bhih+"&bhct="+bhct+"&bhxm="+bhxm+"&bhjr="+bhjr+"&bhtz="+bhtz+"&bhdm="+bhdm+"&bhbd="+bhbd+"&bhfs="+bhfs+"&bhls="+bhls+"&bhlu="+bhlu+"&bhse="+bhse+"&bhsp="+bhkbps; if (document.cookie.indexOf("bhCookieSess=1") != -1) { document.cookie = "bhResults="+rs+"; domain=abc.com; path=/"; document.cookie = "bhPrevResults="+rs+"; domain=abc.com; path=/"; if (document.cookie.indexOf("bhResults") != -1) self.location.replace("http://www.abc.com/"); else self.location.replace("http://www.abc.com/"); } else self.location.replace("http://www.abc.com/"); } // --> </script> <script language="JavaScript"> <!-- function testFl() { try { var ts = 'ShockwaveFlash.ShockwaveFlash'; var fl = isHere(ts+'.6'); if (fl == 1) {return 6;} fl = isHere(ts+'.5'); if (fl == 1) {return 5;} fl = isHere(ts+'.4'); if (fl == 1) {return 4;} fl = isHere(ts+'.3'); if (fl == 1) {return 3;} fl = isHere(ts); if (fl == 1) {return 2;} return fl; } catch (e) {return -2;} } // --> </script> <script language="JavaScript"> <!-- function testReal(f) { try { var rpv = testRPv(getRPv()); if (rpv > 3) {return rpv;} var tr = isHere('rmocx.RealPlayer G2 Control'); if (tr == 1) {return 3;} tr = isHere('RealVideo.RealVideo(tm) ActiveX Control (32-bit)'); if (tr == 1) {return 2;} tr = isHere('RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)'); return tr; } catch (e) {return -2;} } // --> </script> <script language="VBScript"> <!-- Function isHere(chk) isHere = -1 On error resume next If ScriptEngineMajorVersion > 1 then flp = IsObject(CreateObject(chk)) if flp then isHere = 1 Else isHere = 0 End if End if End Function // --> </script> <script language="VBScript"> <!-- Function bhVBver() bhVBver = "-3" On error resume next bhVBver = ScriptEngineMajorVersion() & "." & ScriptEngineMinorVersion() & "." & ScriptEngineBuildVersion() End Function // --> </script> <script language="VBScript"> <!-- Function getRPv() getRPv = "" on error resume next If ScriptEngineMajorVersion > 1 then set rpo = CreateObject("rmocx.RealPlayer G2 Control") If IsObject(rpo) then getRPv = rpo.GetVersionInfo() End if End if End Function // --> </script> <script language="VBScript"> <!-- Function getQTv() getQTv = "" on error resume next If ScriptEngineMajorVersion > 1 then set qto = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1") If IsObject(qto) then getQTv = qto.QuickTimeVersion End if End if End Function // --> </script> <script language="JavaScript"> <!-- function testRPv(v) { nn = v.split("."); if (nn.length < 4) return 0; if ( (nn[0] == 6) && (nn[1] == 0)) { if (nn[2] > 8) return 9; if (nn[2] == 8) return 8; if (nn[2] == 7) { if (nn[3] >= 788) return 8; return 7; } } return 0; } // --> </script> <script language="JavaScript"> <!-- function convertQTv(s) { intg = parseInt(s); if (isNaN(intg) || intg < 0) return ""; hex = toHex(intg); if (hex.length < 3) return ""; hex = hex.substring(0, 1) + "." + hex.substring(1, 2) + "." + hex.substring(2, 3); return hex; } function toHex(n) { str = ""; do { r = n % 16; n = n >> 4; switch (r) { case 10: str = 'A' + str; break; case 11: str = 'B' + str; break; case 12: str = 'C' + str; break; case 13: str = 'D' + str; break; case 14: str = 'E' + str; break; case 15: str = 'F' + str; break; default: str = r + str; break; } } while (n >= 1); return str; } // --> </script> |
From: Brad C. <bc...@bo...> - 2004-01-09 21:40:31
|
I mentioned this on the list a while back but now I've actually got the code for it. THIS IS NOT A RELEASE! This is just something so people can take a look and give some feedback. You are not (yet) permitted to use this for anything other than giving me feedback :) http://yourgod.sourceforge.net/Framework.zip It's sort of large because it contains all the required jars as well as a final compiled jar of itself. Eclipse project files are included as well as an ant build.xml. The included htmlunit.jar is a recent CVS compile, not a released version, so dropping this into an existing project may cause a problem or two. I could make this a separate project (much like jwebunit is separate from httpunit) or it could become part of htmlunit. I believe everything it relies on is Apache licensed so this will likely follow the same license if it is released separately. Nearly everything is completely unit tested, so if you need to know how something works just look at the tests. Some notes on what's going on: * The Habitat sort of manages your testing process by owning the WebBrowser and Service objects. * Habitat and Service are intended to be extended for your particular project. * WTFTestCase is mostly just a convenience, though I do have similar TestCase extensions for our other projects. Using WTFTestCase is not required. * The GuiMap is an object representation of your web application in the simplest terms possible (the Widget). Nobody I have spoken to likes the GuiMap. Nobody I have spoken to has a better idea. I eagerly await any suggestions on improving this part of the framework. * The WebBrowser uses htmlunit (mostly indirectly) to figure out which page from the GuiMap is currently "displayed" and generate a WebPage for you to use. It also keeps history and does other "web browserly" things. * WebPage objects are your way of interacting with htmlunit. If I can't do what I want with WebPage I tend to question if I should be doing it at all :) * 90% of the interaction with htmlunit is confined to the WebAdapter. While there are a few instances of exposing/using WebClient outside of WebAdapter I would very much like to remove these as soon as I can find alternatives (though having access to WebClient does make this usable if you occasionally need something the framework doesn't provide...) Brad C |
From: Mike B. <mb...@Ga...> - 2003-12-23 11:14:36
|
Vijay Narayanasamy wrote: > No, this assumption is not correct. The HTML 4.0 specification > states: ... Then you have certainly found a bug. HtmlUnit currently behaves according to what I had thought was the correct behaviour. -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Vijay N. <VNa...@ma...> - 2003-12-22 18:04:55
|
I wrote: >> I am having difficulties using HtmlSelect for simulating the following >> dropdown menu. >> >> The Options have no Value. >> >> <SELECT NAME="MAXDOCS"> >> <OPTION >25 >> <OPTION SELECTED>50 >> <OPTION >100 >> <OPTION >250 >> <OPTION >500 >> </SELECT> >> How to select the desired Option? > Mike Bowler wrote: > How do you expect to actually use this select if there are no values > set > in the options? Nothing will get sent back to the server. > HtmlUnit assumes that all options will have a value attribute (they're > pretty useless without). No, this assumption is not correct. The HTML 4.0 specification states: """ OPTION Attribute definitions selected [CI] When set, this boolean attribute specifies that this option is pre-selected. value = cdata [CS] This attribute specifies the initial value of the control. If this attribute is not set, the initial value is set to the contents of the OPTION element. label = text [CS] This attribute allows authors to specify a shorter label for an option than the content of the OPTION element. When specified, user agents should use the value of this attribute rather than the content of the OPTION element as the option label. """ http://www.w3.org/TR/html401/interact/forms.html#h-17.6 It's that section about "If the attribute is not set, the initial value is set to the contents of the OPTION element" that directly applies to the current situation here. I did a quick test case with HttpUnit, and that library handles this correctly. I think HtmlUnit's handling of this is incorrect. |
From: Mike B. <mb...@Ga...> - 2003-12-18 11:11:03
|
Vijay Narayanasamy wrote: > I am having difficulties using HtmlSelect for simulating the following > dropdown menu. > > The Options have no Value. > > <SELECT NAME="MAXDOCS"> > <OPTION >25 > <OPTION SELECTED>50 > <OPTION >100 > <OPTION >250 > <OPTION >500 > </SELECT> > How to select the desired Option? How do you expect to actually use this select if there are no values set in the options? Nothing will get sent back to the server. HtmlUnit assumes that all options will have a value attribute (they're pretty useless without). -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Vijay N. <VNa...@ma...> - 2003-12-17 21:58:46
|
Danny, I tried the getOption(int i) method. It gave me "no such method exception " I am able to get a List of Options by calling getAllOptions(); Since none of these options have a "VALUE" selecting the option fails and also the getValueAttribute() The following is the code snippet I use and the error I got //CODE SNIPPET final HtmlSelect max = (HtmlSelect)form.getSelectByName("MAXDOCS"); List maxopts=max.getAllOptions(); System.out.println(maxopts.size()); for(int i=0; i<maxopts.size(); i++){ System.out.println(maxopts.get(i)); } HtmlOption maxopt=(HtmlOption)maxopts.get(1); maxopt.setSelected(true); System.out.println("CHOICEMAX : "+maxopt.getValueAttribute()); //ERROR MESSAGE 5 HtmlOption[<option>] HtmlOption[<option selected="">] HtmlOption[<option>] HtmlOption[<option>] HtmlOption[<option>] java.lang.IllegalStateException: Can't select this option because it has no value set java.lang.IllegalStateException: Can't select this option because it has no value set at com.gargoylesoftware.htmlunit.html.HtmlOption.setSelected(HtmlOption.java:82 ) at AccessBioHtml.testHomePage(AccessBioHtml.java:102) at AccessBioHtml.main(AccessBioHtml.java:229) Vijay -----Original Message----- From: Danny Yoo [mailto:dy...@ac...] Sent: Wednesday, December 17, 2003 2:00 PM To: Vijay Narayanasamy Cc: 'htm...@li...' Subject: Re: Help with Options On Dec 17, 2003, at 9:28 AM, Vijay Narayanasamy wrote: > I am having difficulties using HtmlSelect for simulating the following > dropdown menu. Hi Vijay, There's a method called getOption(int i) that looks like it should do the trick. Or you can run through all the options with getAllOptions(), and choose the right one by looking at each option's getValueAttribute(), I think. > The Options have no Value. > > <SELECT NAME="MAXDOCS"> > > <OPTION >25 > > <OPTION SELECTED>50 > > <OPTION >100 > > <OPTION >250 > > <OPTION >500 > > </SELECT> From what I understand, the value of each option should default to the text content. So you should see those four options, and each com.gargoylesoftware.htmlunit.html.HtmlOption should have a getValueAttribute(). Good luck to you! |
From: Danny Y. <dy...@ac...> - 2003-12-17 19:59:49
|
On Dec 17, 2003, at 9:28 AM, Vijay Narayanasamy wrote: > I am having difficulties using HtmlSelect for simulating the following > dropdown menu. Hi Vijay, There's a method called getOption(int i) that looks like it should do the trick. Or you can run through all the options with getAllOptions(), and choose the right one by looking at each option's getValueAttribute(), I think. > The Options have no Value. > > <SELECT NAME="MAXDOCS"> > > <OPTION >25 > > <OPTION SELECTED>50 > > <OPTION >100 > > <OPTION >250 > > <OPTION >500 > > </SELECT> From what I understand, the value of each option should default to the text content. So you should see those four options, and each com.gargoylesoftware.htmlunit.html.HtmlOption should have a getValueAttribute(). Good luck to you! |
From: Vijay N. <VNa...@ma...> - 2003-12-17 17:32:45
|
Hi all, I am having difficulties using HtmlSelect for simulating the following dropdown menu. The Options have no Value. <SELECT NAME="MAXDOCS"> <OPTION >25 <OPTION SELECTED>50 <OPTION >100 <OPTION >250 <OPTION >500 </SELECT> How to select the desired Option? Thank you, Vijay Vijay Narayanasamy Project Programmer / Analyst Bioinformatics Program, Human and Molecular Genetics Center Medical College of Wisconsin 8701, W. Watertown Plank Road Milwaukee, WI 53226 414-456-8026 <mailto:vna...@mc...> vna...@mc... <http://brc.mcw.edu/> http://brc.mcw.edu/ |
From: <Gou...@ne...> - 2003-12-09 10:10:07
|
Hi, which version of HtmlUnit do you use? Alexei __________________________________________________________________ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 |
From: Mike B. <mb...@Ga...> - 2003-12-08 21:37:14
|
Biju Arjunan wrote: > I guess HTML Unit automatically load the java script > so > the source code for the java script is not important > in this context, as my whole aim to fill out the log > in form and submit to the server. The html that you provided does not have any script tags so I have no idea how you expect it to load a javascript file. I don't see anything immediately wrong but you haven't provided enough context to reproduce the problem. > I want to automate the login of a thid party web site > through HTML Unit, for acceptnace testing, I don't > have any control over the source for the page, except > viewing source. Is this a publicly accessible website? Are you able to post the url? -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Biju A. <bij...@ya...> - 2003-12-08 19:48:18
|
I tried with both the form.submit() and button.click() method but it doesn't make any difference on the output. I have also code which works for simple form submission but this particular page which I sent, having problem with HTML Unit. I guess HTML Unit automatically load the java script so the source code for the java script is not important in this context, as my whole aim to fill out the log in form and submit to the server. I want to automate the login of a thid party web site through HTML Unit, for acceptnace testing, I don't have any control over the source for the page, except viewing source. Thanks, Biju Arjunan --- Mike Bowler <mb...@Ga...> wrote: > I'm about to head into a meeting so I don't have > much time to look at > this but I did notice that you are calling submit > directly on the form > instead of clicking on the submit button. This will > not cause the > submit button to be sent back to the server and may > cause different results. > > The example is also incomplete as you reference > javascript methods that > aren't included here. Can you reduce the sample to > a smaller one? > > I have lots of code that does simple form submission > so it certainly > does work. We just need to find out what is > different in this sample > and trying to reduce it would be a good step towards > that. > > -- > Mike Bowler > Principal, Gargoyle Software Inc. > Voice: (416) 822-0973 | Email : > mb...@Ga... > Fax : (416) 822-0975 | Website: > http://www.GargoyleSoftware.com > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux > Tutorials. > Become an expert in LINUX or just sharpen your > skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the > bash shell to sys admin. > Click now! > http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ |
From: Mike B. <mb...@Ga...> - 2003-12-08 18:05:00
|
I'm about to head into a meeting so I don't have much time to look at this but I did notice that you are calling submit directly on the form instead of clicking on the submit button. This will not cause the submit button to be sent back to the server and may cause different results. The example is also incomplete as you reference javascript methods that aren't included here. Can you reduce the sample to a smaller one? I have lots of code that does simple form submission so it certainly does work. We just need to find out what is different in this sample and trying to reduce it would be a good step towards that. -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Biju A. <bij...@ya...> - 2003-12-08 16:27:56
|
Hi, I want to test a page which has a login form, Source code for the page is <html> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="setAction()"> <form name="loginInfo" method="POST" action="/Main/login/Login?d=def.net&l=en_US"> <p> </p> <input type="hidden" name="pinOrPassword" value="false"> <table width="90%" border="0" cellspacing="2" cellpadding="1" summary=""> <tr> <td class="formBody" width="28%"> User Name: </td> <!-- The query parameter u is used by the login:signon jsp tag. Don't change it. --> <td width="72%"> <input type="text" name="u" size="24" value=''> </td> </tr> <input type="hidden" name="d" value=' epok.net'> <tr> <td class="formBody" width="28%"> Password: </td> <td width="72%"><input type=" password" style="font-family:sans-serif" name="password" size="24" value='' ></td> </tr> <tr> <td width="28%" class=" normTxt"> </td> <td width="72%"> <input type="radio" name="ssl" value="Secure" onClick="setAction()" > <span class="normTxt"> Secure Login </span></td> </tr> <tr> <td width="28%" class="normTxt"> </td> <td width="72%"> <input type="radio" name="ssl" value="Standard" onClick="setAction()" checked > <span class="normTxt"> Standard Login </span></td> </tr> <tr> <td width="28%"> </td> <td width="72%"> <table border="0" cellspacing="0" cellpadding=" 3" class="toolHilite" summary=""> <tr> <td><input type="submit" name="submitName" value=' Log In' class="buttons" title=' Click here to log in to your account.'> </td> </tr> </table> </td> </tr> <tr> <td width="28%"> </td> <td width="72%" class=" normTxt"> </td> </tr> </table> <p> </p> </form> </td> <td width="38%" valign="top" bgcolor=" #FFFFFF"> <p> </p> <p> </p> <p class="normTxt"> To access your account, enter your user name and password and click Log In. </p> </td> I have the html Unit Test Program as follows import junit.framework.*; import com.gargoylesoftware.htmlunit.*; import com.gargoylesoftware.htmlunit.html.*; import java.net.*; public class TestMainPage extends TestCase { public TestMainPage (String dummy) { super(dummy); } public void testLogin() throws Exception { try { final WebClient webClient = new WebClient(); if(webClient.isJavaScriptEnabled()) { System.out.println ("Java Script Enabled"); } final URL url = new URL("http://def.net:8081//Main/login/Login?d=def.net"); final HtmlPage page = (HtmlPage)webClient.getPage(url); // Get the form that we are dealing with and within that form, // find the submit button and the field that we want to change. final HtmlForm form = page.getFormByName("loginInfo"); final HtmlSubmitInput button = (HtmlSubmitInput)form.getInputByName("submitName"); final HtmlTextInput textField = (HtmlTextInput)form.getInputByName("u"); // Change the value of the text field final HtmlPasswordInput pwdField = (HtmlPasswordInput)form.getInputByName("password"); // Change the value of the text field textField.setValueAttribute("biju"); pwdField.setValueAttribute("biju"); final HtmlPage page2 = (HtmlPage)form.submit(); WebResponse wr = page2.getWebResponse(); System.out.println (wr.getContentAsString()); System.out.println ((wr.getUrl()).toExternalForm()); assertEquals("Server Login Successful",page2.getTitleText()); } catch (Exception e) { e.printStackTrace(); } } protected void runTest() throws Exception { testLogin(); } } The problem is that eventhough I am giving the correct login name and password the second page is not loading and it is not displaying and error message also, the content of the page2 is always same as the page1. Help appreciated!! Thanks, Biju A __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ |
From: <Gou...@ne...> - 2003-11-28 11:40:02
|
There is a bug in 1.3pre1 that is already known and seems to be fixed as a developer list says, but is not released yet: inputs are not submitted with the form if they are not direct children. Brad Clarke <bc...@bo...> wrote: >At 08:05 PM 11/25/2003, you wrote: >>Hi >> >>How does one / can one simulate the mime-encoding necessary to upload a >>file using an HtmlFileInput? >> >>I am trying to use 1.3pre1 to successfully do a mime-encoded post of a >>form having a <input type="file" name="foo"> HtmlFileInput (fi) element. >> >>I am assuming that if I write code like: >> >> HtmlFileInput fi = (HtmlFileInput) form.getAllInputsByName("foo")[0]; >> fi.setValueAttribute("/some/path/to/a/real/file"); >> ..... >> form.submit("submit button name"); >> >>that the "foo" parameter would be encoded and sent to the servlet. I >>understand this was just added, so I want to make sure I am doing things >>the right way here. > >As long as the content-type of the form is multipart/form-data this should >work fine > > >>It appears that the "foo" file input is not a submittable element (See >>HtmlForm.isSubmittable()), so it is not getting sent in the post request >>attributes....) > >HtmlForm.isSubmittable() says that any inputs not of type "radio", "image", >"checkbox", or "submit" is a submittable element. __________________________________________________________________ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 |
From: Brad C. <bc...@bo...> - 2003-11-26 15:43:23
|
At 08:05 PM 11/25/2003, you wrote: >Hi > >How does one / can one simulate the mime-encoding necessary to upload a >file using an HtmlFileInput? > >I am trying to use 1.3pre1 to successfully do a mime-encoded post of a >form having a <input type="file" name="foo"> HtmlFileInput (fi) element. > >I am assuming that if I write code like: > > HtmlFileInput fi = (HtmlFileInput) form.getAllInputsByName("foo")[0]; > fi.setValueAttribute("/some/path/to/a/real/file"); > ..... > form.submit("submit button name"); > >that the "foo" parameter would be encoded and sent to the servlet. I >understand this was just added, so I want to make sure I am doing things >the right way here. As long as the content-type of the form is multipart/form-data this should work fine >It appears that the "foo" file input is not a submittable element (See >HtmlForm.isSubmittable()), so it is not getting sent in the post request >attributes....) HtmlForm.isSubmittable() says that any inputs not of type "radio", "image", "checkbox", or "submit" is a submittable element. Brad C |
From: Steven A. <st...@at...> - 2003-11-26 02:05:29
|
Hi How does one / can one simulate the mime-encoding necessary to upload a file using an HtmlFileInput? I am trying to use 1.3pre1 to successfully do a mime-encoded post of a form having a <input type="file" name="foo"> HtmlFileInput (fi) element. I am assuming that if I write code like: HtmlFileInput fi = (HtmlFileInput) form.getAllInputsByName("foo")[0]; fi.setValueAttribute("/some/path/to/a/real/file"); ..... form.submit("submit button name"); that the "foo" parameter would be encoded and sent to the servlet. I understand this was just added, so I want to make sure I am doing things the right way here. It appears that the "foo" file input is not a submittable element (See HtmlForm.isSubmittable()), so it is not getting sent in the post request attributes....) Can someone suggest a way to simulate a file upload using HtmlUnit? Thanks, Steve Atkinson |
From: Dave K. <DKa...@wi...> - 2003-11-17 21:49:56
|
Hi, I was just wondering if anyone has experience testing jakarta-tapestry based applications with htmlunit? I have some questions concerning the "action" parameter and the HtlmElement.submit method. If you could lend any help please mail me back. Dave Kallstrom Software Engineer dka...@wi... Widen Enterprises 608.443.5448 |
From: Dave K. <DKa...@wi...> - 2003-11-13 20:24:58
|
I was wondering if anyone has any experience testing jakarta tapestry applications using htmlunit. I am having trouble getting the return page from HtmlElement.submit. Htmlunit is looking for the action parameter in the form tag or "javascript:" in the onsubmit parameter. Unfortunetly we do not use onsubmit much at all and the action parameter is used by tapestry. Htmlunit finds the submit button correctly but when HtmlElement.submit is called the returned page is the same page that contains the form. It never forwards to the next page. Any help would be appreciated.. Dave Kallstrom Software Engineer Widen Enterprises 608.443.5448 |
From: Mike B. <mb...@Ga...> - 2003-11-07 14:23:11
|
HtmlUnit-1.3-pre1 has been released. See the changes report for a full list of changes. http://htmlunit.sourceforge.net/changes-report.html Please note that there are some incompatible changes between 1.2.x and 1.3 - all detailed in the changes report. Note also that this is a PRE-RELEASE because there have been some significant structural changes and we want an opportunity to bash on it for a bit before declaring it final. Please try it out and let us know if you find any problems. Download from: http://sourceforge.net/project/showfiles.php?group_id=47038 -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Mike B. <mb...@Ga...> - 2003-10-28 00:44:37
|
Benjamin Thompson wrote: > I am attempting to write a test case for a page that contains a > javascript.confirm() as part of the logic. The page branches one way > if the user clicks "ok", and another if they click "cancel". Is there > a way to not only to capture the confirm dialog, but also to effect > clicking on a button? Yes, check out WebClient.setConfirmHandler(...) -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |