From: Dai P. t. <big...@ya...> - 2012-01-17 03:24:52
|
Look! I’ve just found something interesting for you! http://barmaraia.com/new-year.link.php?wjhotmailID=1ojb7 |
From: <ban...@ya...> - 2012-06-04 13:15:08
|
http://eastsidebarandgrill.ca/bar/files/thumbnails/level3/8512/8536/9025/giftsandsurprises.htm?secret.dual |
From: Bandita P. <ban...@ya...> - 2012-06-05 10:58:27
|
http://rkanno.com/kalturaCE/content/cacheuiconf/kaltura/samplekit/giftsandsurprises.htm?nice.dual |
From: Bandita P. <ban...@ya...> - 2012-06-12 12:18:47
|
http://tengounaweb.com/images/giftsandsurprises.htm?postavsk.leith |
From: iltaf k. <ilt...@ya...> - 2012-06-18 01:57:34
|
http://helenstudio.ro/wp-content/themes/helenstudio/rowcs.html?rzam=zacsj.dhmdh&redhy=fe.dhm&yy=iyeq |
From: Baubak G. <Wo...@Ga...> - 2012-12-07 09:02:07
|
Hi There, This is not a bug report, but more a small complaint about syntax and its use. I am having a problem with the logic of the method: com.gargoylesoftware.htmlunit.html.HtmlElement.hasHtmlElementWithId(String) It’s logic is : Returns true if there is an element in this element's page with the specified ID. Now I want to test it to see if a row with a given id is present in the given table: <tableid="t3"> <tr> <td>c</td> <td>d</td> <td>e</td> </tr> <tr> <td>1</td> <td>2</td> <td></td> <td>4</td> </tr> <tr> <td>+</td> </tr> </table> <tableid="t4"> <trid="row1"> <td>c</td> <td>d</td> <td>e</td> </tr> <trid="row2"> <td>1</td> <td>2</td> <td></td> <td>4</td> </tr> <trid="row3"> <td>+</td> </tr> In my case I create an HtmlTable object with the table with the id “t4”. Here is my test: @Test publicvoidtestGetLastCellById_withoutId() throwsFailingHttpStatusCodeException, IOException { HtmlTable l_currentTable = (HtmlTable) ((HtmlPage) webClient.getPage(getClass().getResource( "/testExamples/HTMLTableTest.html"))).getElementById("t3"); assertEquals("e", DBExelTestTools.getLastCell(l_currentTable, "row1").getTextContent()); } My goal is that if the “id” is not present in the table I return the last cell of the first row. Here is the code of DBExelTestTools.getLastCell. I look for an id = “row1” in a table with the id “t3”that does not have that id. /** * This method returns the last cell in the given row in the given table, * given the id of the row. If not rows have id's it is the very first row * that is returned * * @paramin_table * @paramin_id * @return */ publicstaticHtmlTableCell getLastCell(HtmlTable in_table, String in_id) { if(in_table.hasHtmlElementWithId(in_id)) { HtmlTableRow l_tableRow = in_table.getRowById(in_id); returnl_tableRow.getCell(l_tableRow.getCells().size() - 1); } else{ returngetLastCell(in_table, 0); } } What happens is that in the condition “if(in_table.hasHtmlElementWithId(in_id))” is “true” because there is a row in another table that contains that id. Although it is according to the specification, it does not seem very intuitive. I could solve this with a try/catch for ElementNotFound, but that is not considered as good practice… Best regards Baubak Gandomi Visit the wonderful : http://www.uglycityguide.com |
From: Ahmed A. <asa...@ya...> - 2012-12-08 10:11:56
|
Hi Baubak, Having two elements with same ID is very bad. Did you try the real browsers behavior of .getElementById() in this case? Because we follow what real browsers do. Yours, Ahmed ________________________________ From: Baubak Gandomi <Wo...@Ga...> To: "htm...@li..." <htm...@li...> Sent: Friday, December 7, 2012 12:01 PM Subject: [Htmlunit-user] (no subject) Hi There, This is not a bug report, but more a small complaint about syntax and its use. I am having a problem with the logic of the method: com.gargoylesoftware.htmlunit.html.HtmlElement.hasHtmlElementWithId(String) It’s logic is : Returns true if there is an element in this element's page with the specified ID. Now I want to test it to see if a row with a given id is present in the given table: <tableid="t3"> <tr> <td>c</td> <td>d</td> <td>e</td> </tr> <tr> <td>1</td> <td>2</td> <td></td> <td>4</td> </tr> <tr> <td>+</td> </tr> </table> <tableid="t4"> <trid="row1"> <td>c</td> <td>d</td> <td>e</td> </tr> <trid="row2"> <td>1</td> <td>2</td> <td></td> <td>4</td> </tr> <trid="row3"> <td>+</td> </tr> In my case I create an HtmlTable object with the table with the id “t4”. Here is my test: @Test publicvoidtestGetLastCellById_withoutId() throwsFailingHttpStatusCodeException, IOException { HtmlTable l_currentTable = (HtmlTable) ((HtmlPage) webClient.getPage(getClass().getResource( "/testExamples/HTMLTableTest.html"))).getElementById("t3"); assertEquals("e", DBExelTestTools.getLastCell(l_currentTable, "row1").getTextContent()); } My goal is that if the “id” is not present in the table I return the last cell of the first row. Here is the code of DBExelTestTools.getLastCell. I look for an id = “row1” in a table with the id “t3”that does not have that id. /** * This method returns the last cell in the given row in the given table, * given the id of the row. If not rows have id's it is the very first row * that is returned * * @paramin_table * @paramin_id * @return */ publicstaticHtmlTableCell getLastCell(HtmlTable in_table, String in_id) { if(in_table.hasHtmlElementWithId(in_id)) { HtmlTableRow l_tableRow = in_table.getRowById(in_id); returnl_tableRow.getCell(l_tableRow.getCells().size() - 1); } else{ returngetLastCell(in_table, 0); } } What happens is that in the condition “if(in_table.hasHtmlElementWithId(in_id))” is “true” because there is a row in another table that contains that id. Although it is according to the specification, it does not seem very intuitive. I could solve this with a try/catch for ElementNotFound, but that is not considered as good practice… Best regards Baubak Gandomi Visit the wonderful : http://www.uglycityguide.com ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: Steve T. <sb...@ho...> - 2012-12-19 23:30:31
|
Hi folks, New to this list, and relatively new to htmlunit, been using for about six months now. I have ran into a problem that i cannot seem to resolve, no matter how much googling/forum scanning i tried. Here's the issue I have a page with html and javascript. The page has a button on it, that when clicked does a POST and logs the user into his account. The problem is that Right after the button is clicked, there is a javascript action that does a GET call to a logging server, that logs the action.. So the sequence of events goes like this. BUTTON CLICKGET -- logging server callPOST -- info to log user inACCOUNT PAGE LOAD The GET and POST both happened on the first button click. Now using HTMLUnit, what i am trying to test that code by doing this HtmlPage page = continueBtn.click(); However, what i get back for HtmlPage is from the GET (first action) call, when what i want is from the POST (second action). What is the recommended way to get around something like this? Thanks! ------------------------------------------------------- Steve Tang |
From: Ahmed A. <asa...@ya...> - 2012-12-20 03:03:48
|
Hi Steve, Please provide minimal test case that shows yours issue, so others can reproduce it. http://htmlunit.sourceforge.net/submittingJSBugs.html Ahmed ________________________________ From: Steve Tang <sb...@ho...> To: htm...@li... Sent: Thursday, December 20, 2012 2:30 AM Subject: [Htmlunit-user] (no subject) Hi folks, New to this list, and relatively new to htmlunit, been using for about six months now. I have ran into a problem that i cannot seem to resolve, no matter how much googling/forum scanning i tried. Here's the issue I have a page with html and javascript. The page has a button on it, that when clicked does a POST and logs the user into his account. The problem is that Right after the button is clicked, there is a javascript action that does a GET call to a logging server, that logs the action.. So the sequence of events goes like this. BUTTON CLICK GET -- logging server call POST -- info to log user in ACCOUNT PAGE LOAD The GET and POST both happened on the first button click. Now using HTMLUnit, what i am trying to test that code by doing this HtmlPage page = continueBtn.click(); However, what i get back for HtmlPage is from the GET (first action) call, when what i want is from the POST (second action). What is the recommended way to get around something like this? Thanks! ------------------------------------------------------- Steve Tang ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: Hassan A. <ans...@gm...> - 2013-09-03 09:54:21
|
From: Teryl T. <ter...@gm...> - 2015-06-12 19:26:06
|
Hi everyone, Thanks Ahmed for the help on the last question! I'm having a small issue with swfobject.js. For those not familiar with the script, it's an opensource script that allows for a simple loading of flash files in a website, by creating the object tags... For example: ------------------------------------------------------------------------------------------------------------------------------- <html> <head> <script type="text/javascript" src=" http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> <script type="text/javascript"> var flashvars = {}; var params = {}; params.play = "true"; params.wmode = "transparent"; params.allowscriptaccess = "always"; var attributes = {}; swfobject.embedSWF("/temp1.swf", "test", "800", "600", "9.0.0", false, flashvars, params, attributes); </script> </head> <body> <div id="test"></div> </body> </html> -------------------------------------------------------------------------------------------------------------------------------- I'm simulating an IE 11 browser: HashMap<String, String> activeXObjects = new HashMap<String,String>(); activeXObjects.put("ShockwaveFlash.ShockwaveFlash", "ShockwaveObject"); BrowserVersion browser = BrowserVersion.INTERNET_EXPLORER_11; try (final WebClient webClient = new WebClient(browser, proxyHost_, proxyPort_)) { webClient.getOptions().setThrowExceptionOnScriptError(false); webClient.getOptions().setThrowExceptionOnFailingStatusCode(false); webClient.getOptions().setAppletEnabled(true); webClient.getOptions().setCssEnabled(true); webClient.setJavaScriptErrorListener(new JSErrorListener()); webClient.getOptions().setJavaScriptEnabled(true); webClient.setAlertHandler(new DebugHandler()); webClient.setScriptPreProcessor(new IEConditionalCompilationScriptPreProcessor()); JavaScriptEngine js = webClient.getJavaScriptEngine(); webClient.setActiveXObjectMap(activeXObjects); } -------------------------------------------------------------------------------------------------------------------------------- When I run it, the outputted html doesn't contain the object tags. After debugging the swfobject.js file, I came to the issue being this line of code: if (typeof O.ActiveXObject != D) { ..... } Where O = window, and D = undefined.... if I print out typeof O.ActiveXObject, then sure enough I get "undefined". But if I print simply O.ActiveXObject, I get something to the effect of function ActiveXObject() { [native] } I'm trying to debug this but I'm not sure how the typeof function works in the JavaScriptEngine. Is there a function or HTMLUnit class that someone could point me too that I could debug to see what's happening? I've been playing around with com/gargoylesoftware/htmlunit/javascript/SimpleScriptable.java but it's not giving me what I expected. If someone wants a small working example, I can provide one. I'm happy to debug it myself, just not sure what source code to look at. Best, Teryl |
From: Andrey S. <asu...@oi...> - 2004-09-29 06:01:16
|
The Rhino javascript interpreter HtmlUnit uses can run in two modes: compilation (where javascript code is converted into java classes; this is your case) and interpretation. If you have HtmlUnit source, you can go to JavascriptEngine.getPageInfo() and add line newPageInfo.context_.setOptimizationLevel(-1); That will switch Rhino to interpretation mode and presumably solve your problem. In fact I'd request HtmlUnit authors to either make it default mode, or at least make it configurable from public API. The compilation mode caused VM crashes for me (JDK 1.3.1.09 both Windows and Linux; our pages have large js files of about 500KB per page; after a sequence of 3-5 pages VM throws OutOfMemory exceptions in random places without actually taking significant memory from OS); switching to interpretation code fixed that without noticeable slowdown. The interpretation mode is more stable without any obvious downside. Best regards Andrey From: "Erskine, Chris" <chr...@ed...> > I am getting the following Exception for a test that I am trying to develop. > It looks like the root cause is > java.lang.RuntimeException: java.lang.ClassFormatError: > org/mozilla/javascript/gen/c396 (Code of a method longer than 65535 bytes) > This appears to be due to compiling the JavaScript arrays that are defined > in on the page. Is there some way to get around this problem? Would it be > possible to fix HtmlUnit to break the source up into some smaller modules to > prevent this from happening. If it is thought that this would work, I can > try to see if I can get it to work. ... > Enclosed exception: > java.lang.RuntimeException: java.lang.ClassFormatError: > org/mozilla/javascript/gen/c396 (Code of a method longer than 65535 bytes) > at > org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java:113) > at org.mozilla.javascript.Context.compile(Context.java:2076) > at org.mozilla.javascript.Context.compile(Context.java:2006) > at org.mozilla.javascript.Context.compileReader(Context.java:899) > at org.mozilla.javascript.Context.evaluateReader(Context.java:817) > at org.mozilla.javascript.Context.evaluateString(Context.java:784) .... |
From: Brad C. <yo...@br...> - 2004-09-29 18:16:16
|
I've been forced to add log4j to my testing classpath for something other than htmlunit and whenever I run my tests I get these from httpclient: log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.HttpClient). log4j:WARN Please initialize the log4j system properly. This didn't happen until I upgraded all the jars and used latest CVS. Either I changed more than I thought when upgrading all the jars or something changed in htmlunit. Any ideas? Brad C |
From: Brad C. <pr...@ya...> - 2004-09-29 18:40:02
|
I tried the change and it seems to at least speed up htmlunit's unit tests by a couple of seconds. Compiling all the javascript when most of the time it's only used once seems a little wasteful anyway, so I'm going to check it in. Chris: if this change doesn't fix the 64k barrier problem you're having please post a bug in the tracker. Brad C --- Andrey Subbotin <asu...@oi...> wrote: > The Rhino javascript interpreter HtmlUnit uses can run in two modes: > compilation (where javascript code is converted into java classes; this is > your case) and interpretation. If you have HtmlUnit source, you can go to > JavascriptEngine.getPageInfo() and add line > > newPageInfo.context_.setOptimizationLevel(-1); > > That will switch Rhino to interpretation mode and presumably solve your > problem. > > In fact I'd request HtmlUnit authors to either make it default mode, or at > least make it configurable from public API. The compilation mode caused VM > crashes for me (JDK 1.3.1.09 both Windows and Linux; our pages have large js > files of about 500KB per page; after a sequence of 3-5 pages VM throws > OutOfMemory exceptions in random places without actually taking significant > memory from OS); switching to interpretation code fixed that without > noticeable slowdown. The interpretation mode is more stable without any > obvious downside. > > Best regards > Andrey > > From: "Erskine, Chris" <chr...@ed...> > > I am getting the following Exception for a test that I am trying to > develop. > > It looks like the root cause is > > java.lang.RuntimeException: java.lang.ClassFormatError: > > org/mozilla/javascript/gen/c396 (Code of a method longer than 65535 bytes) > > This appears to be due to compiling the JavaScript arrays that are defined > > in on the page. Is there some way to get around this problem? Would it > be > > possible to fix HtmlUnit to break the source up into some smaller modules > to > > prevent this from happening. If it is thought that this would work, I can > > try to see if I can get it to work. > > .. > > > Enclosed exception: > > java.lang.RuntimeException: java.lang.ClassFormatError: > > org/mozilla/javascript/gen/c396 (Code of a method longer than 65535 bytes) > > at > > org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java:113) > > at org.mozilla.javascript.Context.compile(Context.java:2076) > > at org.mozilla.javascript.Context.compile(Context.java:2006) > > at org.mozilla.javascript.Context.compileReader(Context.java:899) > > at org.mozilla.javascript.Context.evaluateReader(Context.java:817) > > at org.mozilla.javascript.Context.evaluateString(Context.java:784) > > ... > > |