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: Karl M. D. <ka...@ju...> - 2018-02-02 03:59:10
|
Howdy all, Finally tracked down the cause of an odd problem I'd been seeing in HtmlUnit, but not in FF/Chrome/etc.: I've got a form that hides itself when the user clicks out of it, via an onblur event listener. Turns out, the culprit is here: org.openqa.selenium.htmlunit.HtmlUnitMouse.moveOutIfNeeded(DomElement) line 113 I don't think firing an onblur as part of a mouseOut is expected? I'm definitely not seeing it in my desktop browsers. (This also wasn't happening with older versions of HtmlUnit.) Anyone know if this is a bug in my expectations, or in HtmlUnit? Thanks! Karl M. Davis |
From: Vasudevan C. <vco...@gm...> - 2018-01-30 13:40:16
|
Hi Ronald, Today, I tried creating the Cookie with the host name. That cookie value was getting set and sent to the host also. Looks like the Cookie should have the host name set instead of partial host name. Thanks for the pointer. Regards Vasu On 30 January 2018 at 01:19, Ronald Brill <rb...@rb...> wrote: > > Setting a cookie at the client side using addCookie to the webclient > >after constructing a Cookie does not seem to work. > > Sorry but i can only guess. the version you are using is realy outdated > and i have no time to support this version. > > > I am instantiating a webClient instance with Javascript disabled. The > >server has sent a set of cookies which are stored in the CookieManager of > >the webclient instance. > > > > Now, I want to add one more cookie from the client side. > > > > I constructed the cookie using New Cookie with the necessary > >parameters. The domain value is set to ".naukri.com". > > > > I add the new cookie using AddCookie Method for the corresponding > >cookieManager. > > Sounds good so far. Set a breakpoint CookieManager.getCookies() and check > if you cookie is part of the result. > If yes try to figure out who of the following calls ignors your one (might > be HttpClient) > Try with cookie with host name also > > ronald > > > > > I checked through Charles if the new Cookie value is set. BUt > >unfortunately it is not. > > > > Am I missing something?. I am using HTMLUnit 2.23. The same set of > >calls worked on HtmlUnit 2.9. > > > > Appreciate your help in advance. > > > >Regards > > Vasu > > > >On 25 January 2018 at 01:37, Ronald Brill <rb...@rb...> wrote: > > > >> > The second question on setting a Cookie by the client using > Javascript. > >> >Can I accomplish the same without enabling Javscript for a WebClient > >> > instance and set the cookie using addCookie Method. I am using 2.23 > >> >right now. > >> > >> I think yes; the javascript call does also calls this method with the > >> current page and the webclient as param > >> > >> RBRi > >> -------------------------- > >> WETATOR > >> Smart web application testing > >> http://www.wetator.org > >> > > > > > > |
From: Ronald B. <rb...@rb...> - 2018-01-29 18:49:34
|
> Setting a cookie at the client side using addCookie to the webclient >after constructing a Cookie does not seem to work. Sorry but i can only guess. the version you are using is realy outdated and i have no time to support this version. > I am instantiating a webClient instance with Javascript disabled. The >server has sent a set of cookies which are stored in the CookieManager of >the webclient instance. > > Now, I want to add one more cookie from the client side. > > I constructed the cookie using New Cookie with the necessary >parameters. The domain value is set to ".naukri.com". > > I add the new cookie using AddCookie Method for the corresponding >cookieManager. Sounds good so far. Set a breakpoint CookieManager.getCookies() and check if you cookie is part of the result. If yes try to figure out who of the following calls ignors your one (might be HttpClient) Try with cookie with host name also ronald > I checked through Charles if the new Cookie value is set. BUt >unfortunately it is not. > > Am I missing something?. I am using HTMLUnit 2.23. The same set of >calls worked on HtmlUnit 2.9. > > Appreciate your help in advance. > >Regards > Vasu > >On 25 January 2018 at 01:37, Ronald Brill <rb...@rb...> wrote: > >> > The second question on setting a Cookie by the client using Javascript. >> >Can I accomplish the same without enabling Javscript for a WebClient >> > instance and set the cookie using addCookie Method. I am using 2.23 >> >right now. >> >> I think yes; the javascript call does also calls this method with the >> current page and the webclient as param >> >> RBRi >> -------------------------- >> WETATOR >> Smart web application testing >> http://www.wetator.org >> > > |
From: Vasudevan C. <vco...@gm...> - 2018-01-29 13:32:42
|
Hi Ronald. Setting a cookie at the client side using addCookie to the webclient after constructing a Cookie does not seem to work. I am instantiating a webClient instance with Javascript disabled. The server has sent a set of cookies which are stored in the CookieManager of the webclient instance. Now, I want to add one more cookie from the client side. I constructed the cookie using New Cookie with the necessary parameters. The domain value is set to ".naukri.com". I add the new cookie using AddCookie Method for the corresponding cookieManager. I checked through Charles if the new Cookie value is set. BUt unfortunately it is not. Am I missing something?. I am using HTMLUnit 2.23. The same set of calls worked on HtmlUnit 2.9. Appreciate your help in advance. Regards Vasu On 25 January 2018 at 01:37, Ronald Brill <rb...@rb...> wrote: > > The second question on setting a Cookie by the client using Javascript. > >Can I accomplish the same without enabling Javscript for a WebClient > > instance and set the cookie using addCookie Method. I am using 2.23 > >right now. > > I think yes; the javascript call does also calls this method with the > current page and the webclient as param > > RBRi > -------------------------- > WETATOR > Smart web application testing > http://www.wetator.org > |
From: Ronald B. <rb...@rb...> - 2018-01-24 19:42:03
|
yourWebRequest.setEncodingType(FormEncodingType.MULTIPART); Hope the same methods are available in your old version also RBRi On Thu, 25 Jan 2018 01:08:33 +0530 Vasudevan Comandur wrote: > >Hi Ronald, > > I am constructing my own WebRequest with HTTPMethod set to POST. > > I construct the NameValue Pair and POST the request. I see HTMLUnit set >the content-type to x-form-encoded in this case. > > However, I want the similar feature to construct a >multi-part/formencoded content-type in HTMLUnit. Is it possible? > > I have another question. For one of the sites, the client(javascript) >is setting a cookie value and sending it to the server. Is it possible > in HTMLUnit to add that cookie to the cookie manager of Webclient >using addCookie Method?. Will that work. Because, such a call does > not set the Cookie in HTMLUnit in later version. Earlier versions of >HtmlUnit 2.9, I was able to do that. > > Looking forward to your reply. > >Regards > Vasu > > > > >On 25 January 2018 at 00:57, Ronald Brill <rb...@rb...> wrote: > >> Hi Vasu, >> >> i'm not sure that i got your point. >> Do you like >> * to manipulate the form before clicking the submit button or >> * have you created your own WebRequest and like to change the encoding >> type? >> >> Maybe you can illustrate your ide with some (pseudo) code >> >> RBRi >> >> BTW: 2.29 and 2.30 is on the way >> >> >> >Hi, >> > >> > I have been using htmlunit 2.23 version. I wanted to know if it is >> >possible to set >> > the content-type as multipart/form-data in HTTPRequestHEader and post a >> >form. >> > >> > Is it possible to achieve the above scenario without creating a sample >> >html file >> > and click on the submit button? >> > >> > Thanks for your input & suggestions in advance. >> > >> >Regards >> > Vasu >> >> > > |
From: Vasudevan C. <vco...@gm...> - 2018-01-24 19:38:41
|
Hi Ronald, I am constructing my own WebRequest with HTTPMethod set to POST. I construct the NameValue Pair and POST the request. I see HTMLUnit set the content-type to x-form-encoded in this case. However, I want the similar feature to construct a multi-part/formencoded content-type in HTMLUnit. Is it possible? I have another question. For one of the sites, the client(javascript) is setting a cookie value and sending it to the server. Is it possible in HTMLUnit to add that cookie to the cookie manager of Webclient using addCookie Method?. Will that work. Because, such a call does not set the Cookie in HTMLUnit in later version. Earlier versions of HtmlUnit 2.9, I was able to do that. Looking forward to your reply. Regards Vasu On 25 January 2018 at 00:57, Ronald Brill <rb...@rb...> wrote: > Hi Vasu, > > i'm not sure that i got your point. > Do you like > * to manipulate the form before clicking the submit button or > * have you created your own WebRequest and like to change the encoding > type? > > Maybe you can illustrate your ide with some (pseudo) code > > RBRi > > BTW: 2.29 and 2.30 is on the way > > > >Hi, > > > > I have been using htmlunit 2.23 version. I wanted to know if it is > >possible to set > > the content-type as multipart/form-data in HTTPRequestHEader and post a > >form. > > > > Is it possible to achieve the above scenario without creating a sample > >html file > > and click on the submit button? > > > > Thanks for your input & suggestions in advance. > > > >Regards > > Vasu > > |
From: Ronald B. <rb...@rb...> - 2018-01-24 19:27:21
|
Hi Vasu, i'm not sure that i got your point. Do you like * to manipulate the form before clicking the submit button or * have you created your own WebRequest and like to change the encoding type? Maybe you can illustrate your ide with some (pseudo) code RBRi BTW: 2.29 and 2.30 is on the way >Hi, > > I have been using htmlunit 2.23 version. I wanted to know if it is >possible to set > the content-type as multipart/form-data in HTTPRequestHEader and post a >form. > > Is it possible to achieve the above scenario without creating a sample >html file > and click on the submit button? > > Thanks for your input & suggestions in advance. > >Regards > Vasu |
From: Vasudevan C. <vco...@gm...> - 2018-01-23 20:38:39
|
Hi, I have been using htmlunit 2.23 version. I wanted to know if it is possible to set the content-type as multipart/form-data in HTTPRequestHEader and post a form. Is it possible to achieve the above scenario without creating a sample html file and click on the submit button? Thanks for your input & suggestions in advance. Regards Vasu |
From: Ronald B. <rb...@rb...> - 2017-12-28 16:43:36
|
Hi all, if you like to get the latest news about the HtmlUnit development you can now follow us on twitter https://twitter.com/HtmlUnit RBRi |
From: Ronald B. <rb...@rb...> - 2017-12-28 16:37:39
|
Hi all, it is a pleasure to announce the availability of HtmlUnit 2.29. The main enhancements are: - Support Chrome 63 - as always various fixes, specially with JavaScript The full list of changes can be found in [1] Thanks to all the contributors. Happy Scraping! The HtmlUnit team [1] http://htmlunit.sourceforge.net/changes-report.html#a2.29 |
From: Ronald B. <rb...@rb...> - 2017-11-22 17:28:59
|
>great work, thank you very much... I wasn?t expecting that and helped myself meanwhile by modifying the WebSocketPolicy-Class. >But I just pulled the snapshot and tried and can confirm, that it works. >HTMLUnit is a great help for many of the tasks I have to do. Thanks a lot for supporting this, your work is highly appreciated!! You are welcome, thanks for the feedback RBRi -------------------------- WETATOR Smart web application testing http://www.wetator.org |
From: Yves <yv...@gm...> - 2017-11-22 07:41:35
|
Hi Ronald, great work, thank you very much... I wasn´t expecting that and helped myself meanwhile by modifying the WebSocketPolicy-Class. But I just pulled the snapshot and tried and can confirm, that it works. HTMLUnit is a great help for many of the tasks I have to do. Thanks a lot for supporting this, your work is highly appreciated!! Yves Am 21.11.2017 um 20:45 schrieb Ronald Brill: > Hi Yves, > >> I am using HTMLUnit (latest Version 2.28 from maven). >> >> The page I am retrieving makes extensive usage of javascript and has a lot of dynamic content. >> The page also uses a WebSocket Connection and here sometimes it my occur, that the server sends messages that exceed a 64k limit. >> >> If this happens, I receive the following exception and after this the page "is broken", meaning, it doesn?t update dynamic contents etc.: >> >> org.eclipse.jetty.websocket.api.MessageTooLargeException: Text message size [82491] exceeds maximum size [65536] >> at org.eclipse.jetty.websocket.api.WebSocketPolicy.assertValidTextMessageSize(WebSocketPolicy.java:140) >> >> Is there a way to increase the pre-set maximum size? > Have just added four new configuration options. Please use the latest Snapshot build from maven (2.29-SNAPSHOT). > For changing the limits do something like > webClient.getOptions().setWebSocketXXX() > And please report if this does the job for you. > > Hope that helps and HtmlUnit does a nice job for you. > > > RBRi > -------------------------- > WETATOR > Smart web application testing > http://www.wetator.org > |
From: Ronald B. <rb...@rb...> - 2017-11-21 18:46:09
|
Hi Yves, >I am using HTMLUnit (latest Version 2.28 from maven). > >The page I am retrieving makes extensive usage of javascript and has a lot of dynamic content. >The page also uses a WebSocket Connection and here sometimes it my occur, that the server sends messages that exceed a 64k limit. > >If this happens, I receive the following exception and after this the page "is broken", meaning, it doesn?t update dynamic contents etc.: > >org.eclipse.jetty.websocket.api.MessageTooLargeException: Text message size [82491] exceeds maximum size [65536] > at org.eclipse.jetty.websocket.api.WebSocketPolicy.assertValidTextMessageSize(WebSocketPolicy.java:140) > >Is there a way to increase the pre-set maximum size? Have just added four new configuration options. Please use the latest Snapshot build from maven (2.29-SNAPSHOT). For changing the limits do something like webClient.getOptions().setWebSocketXXX() And please report if this does the job for you. Hope that helps and HtmlUnit does a nice job for you. RBRi -------------------------- WETATOR Smart web application testing http://www.wetator.org |
From: Yves <yv...@gm...> - 2017-11-21 12:12:40
|
Hi, I am using HTMLUnit (latest Version 2.28 from maven). The page I am retrieving makes extensive usage of javascript and has a lot of dynamic content. The page also uses a WebSocket Connection and here sometimes it my occur, that the server sends messages that exceed a 64k limit. If this happens, I receive the following exception and after this the page "is broken", meaning, it doesn´t update dynamic contents etc.: org.eclipse.jetty.websocket.api.MessageTooLargeException: Text message size [82491] exceeds maximum size [65536] at org.eclipse.jetty.websocket.api.WebSocketPolicy.assertValidTextMessageSize(WebSocketPolicy.java:140) at org.eclipse.jetty.websocket.common.Parser.assertSanePayloadLength(Parser.java:127) at org.eclipse.jetty.websocket.common.Parser.parseFrame(Parser.java:501) at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:252) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:679) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:511) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597) at java.lang.Thread.run(Thread.java:745) Is there a way to increase the pre-set maximum size? Thank you, yves |
From: jp l. <jp....@gm...> - 2017-11-14 20:40:42
|
Hi folks I am using version 2.28, I am having some issues trying to click a button that redirects me twice to different URLs. The result of the click method it is an UnexpectedPage ... (response status code 200). I tried to set: webClient.getCache().setMaxSize(0); webClient.getOptions().setRedirectEnabled(true); but I can't reach the page after. I have JavaScript enable. Any clue ? |
From: Ronald B. <rb...@rb...> - 2017-11-13 17:07:32
|
You are welcome, and of course i will try to help. Can you please open an issue for that and provide some more details. At least can you provide some sample code for "add cookies with dot domains". Just to make sure i got your point and can dig into the right direction. RBRi > >Hi, > >We have been using HTML unit 2.24. With this version we are not able to get >cookies with dot domains. Today, we upgraded to latest 2.28, with this we >are able to get cookies with dot domains BUT add cookies with dot domains >are not working. Interestingly, both things are working with version 2.15. >Please help us to figure out the issue. > >Thanks, |
From: Manoj K. S. <man...@fi...> - 2017-11-13 14:46:42
|
Hi, We have been using HTML unit 2.24. With this version we are not able to get cookies with dot domains. Today, we upgraded to latest 2.28, with this we are able to get cookies with dot domains BUT add cookies with dot domains are not working. Interestingly, both things are working with version 2.15. Please help us to figure out the issue. Thanks, |
From: beshoo <be...@gm...> - 2017-11-11 20:41:55
|
Dear all, thank you for this wonderful peas of art. Htmlunit. Well as far as I know, htmlunit has a lot of problems with advice javascript, like Facebook, instagram ajax javascript. I tried to log in to instagram, but i can't see how can i implement this. A lot of errors returns. The target is to login, open a profile page, then read some information. Like a photo. Any one can show me a small demo if that can be done? Regards |
From: Ronald B. <rb...@rb...> - 2017-11-11 14:18:11
|
Hi all, it is a pleasure to announce the availability of HtmlUnit 2.28. The main enhancements are: - Support Chrome 62 - setup of user defined BrowserVersion's is rewritten to be more robust - Promise implementation rewritten to support async execution and chaining - as always various fixes, specially with JavaScript The full list of changes can be found in [1] Thanks to all the contributors. Happy Scraping! The HtmlUnit team [1] http://htmlunit.sourceforge.net/changes-report.html#a2.27 |
From: Ronald B. <rb...@rb...> - 2017-10-16 07:10:13
|
Without more details i can only provide some general hints * use the latest snapshot build * try if different browsers * use the type method for setting the input field instead of setValueAttribube * wait for js jobs to finish after typing * wait after the button click for jobs * reget the page by asking the current window for the enclosed page And Finally use a proxy like Charles to fine a difference between the real browser and HtmlUnit. RBRi |
From: Stephen M. <ste...@gm...> - 2017-10-16 00:12:31
|
At the end of the day I need to programmatically visit this url: https://<sharepointroot>.sharepoint.com/sites/<o365 group name>/_layouts/15/groupstatus.aspx?Target=NOTEBOOK I have tried this: com.gargoylesoftware.htmlunit.WebClient webClient = new com.gargoylesoftware.htmlunit.WebClient( com.gargoylesoftware.htmlunit.BrowserVersion.FIREFOX_45 ); webClient.getOptions().setJavaScriptEnabled(true); webClient.getOptions().setCssEnabled(false); // I think this speeds the thing up webClient.getOptions().setRedirectEnabled(true); webClient.setAjaxController(new com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController()); webClient.getCookieManager().setCookiesEnabled(true); webClient.setAlertHandler(new com.gargoylesoftware.htmlunit.AlertHandler() { public void handleAlert( com.gargoylesoftware.htmlunit.Page page, String message) { log.warn( message ); } }); webClient.addWebWindowListener( new com.gargoylesoftware.htmlunit.WebWindowListener() { @Override public void webWindowClosed( com.gargoylesoftware.htmlunit.WebWindowEvent event ) { log.info( "Closed" ); } @Override public void webWindowContentChanged( com.gargoylesoftware.htmlunit.WebWindowEvent event) { log.info( "2nd Page : " + event ); } @Override public void webWindowOpened( com.gargoylesoftware.htmlunit.WebWindowEvent event) { log.info( "Opened" ); } }); com.gargoylesoftware.htmlunit.html.HtmlPage page = webClient.getPage( "https://<sharepointroot>.sharepoint.com/sites/<o365 group name>/_layouts/15/groupstatus.aspx?Target=NOTEBOOK" ); com.gargoylesoftware.htmlunit.html.HtmlForm form = page.getHtmlElementById( "credentials" ); log.info( "creds: " + form ); com.gargoylesoftware.htmlunit.html.HtmlEmailInput userid = page.getHtmlElementById( "cred_userid_inputtext" ); userid.setValueAttribute("<userid>"); com.gargoylesoftware.htmlunit.html.HtmlPasswordInput password = page.getHtmlElementById( "cred_password_inputtext" ); password.setValueAttribute("<password>"); com.gargoylesoftware.htmlunit.html.HtmlButton button = page.getHtmlElementById( "cred_sign_in_button"); log.info( "obj: " + button ); log.info( "PRE - HIT BUTTON" ); button.click(); log.info( "POST - HIT BUTTON" ); But it looks like I am just getting back the main login screen. The logging output looks like: 2017-10-15 20:00:45,142 WARN [IncorrectnessListenerImpl:38] () Obsolete content type encountered: 'application/x-javascript'. 2017-10-15 20:00:45,303 ERROR [StrictErrorReporter:82] () runtimeError: message=[An invalid or illegal selector was specified (selector: '*,:x' error: Invalid selector: :x).] sourceName=[ https://secure.aadcdn.microsoftonline-p.com/ests/2.1.6693.13/content/cdnbundles/jquery.1.11.min.js] line=[2] lineSource=[null] lineOffset=[0] 2017-10-15 20:00:45,384 WARN [IncorrectnessListenerImpl:38] () Obsolete content type encountered: 'application/x-javascript'. 2017-10-15 20:00:45,513 INFO [AppTest:46] () 2nd Page : WebWindowEvent(source=[TopLevelWindow[name=""]] type=[CHANGE] oldPage=[null] newPage=[HtmlPage( https://login.microsoftonline.com/45759b01-d1ea-48ff-b30d-1c64ce38b9dc/oauth2/authorize?client_id=00000003-0000-0ff1-ce00-000000000000&response_mode=form_post&response_type=code%20id_token&resource=00000003-0000-0ff1-ce00-000000000000&scope=openid&nonce=4992A006C932B1234F853A2DB5D6FC406E000B216379F8A5-0AFFAB897525A7130B8C49C9E0D2DCEE954C6A61121FF4CDD6E164B67A10655A&redirect_uri=https:%2F%2F <sharepointroot>.sharepoint.com %2F_forms%2Fdefault.aspx&state=0&wsucxt=1&client-request-id=864a239e-3090-4000-8841-fe092e5084bc)@1391119179]) 2017-10-15 20:00:45,795 INFO [AppTest:59] () creds: HtmlForm[<form id="credentials" method="post" action="/45759b01-d1ea-48ff-b30d-1c64ce38b9dc/login">] 2017-10-15 20:00:45,795 INFO [AppTest:68] () obj: HtmlButton[<button id="cred_sign_in_button" class="button normaltext cred_sign_in_button refresh_domain_state control-button button-two button_primary" style="opacity: 1.0;">] 2017-10-15 20:00:45,795 INFO [AppTest:70] () PRE - HIT BUTTON 2017-10-15 20:00:45,827 INFO [NicelyResynchronizingAjaxController:63] () Re-synchronized call to https://login.microsoftonline.com/common/userrealm?user= <userid>%40<sharepointroot>.onmicrosoft.com &api-version=2.1&stsRequest=rQIIAaWRO4vUUACFcyezYUcEF7HYUnQr4Sb3ndyA4M1LdMFZLSwEWTJ5MIHJJJvc2VHBTsRysLSwsByw0ErEX7BYbO0vECuxshJ3sLEU_IrDKQ_fuWZiG_t76A8UbhKissQwKzbtL7qL53ZeX739fIWMGy_Ur5F98OzTGvhTrdved5y-Tju9TLVO6zYvju1-mnZF21RzbWdN7RyWTVf3Tl6U6WKm7bRvH30A4BSArwCsB0dMSqIQEqGkJMCEssTjVJEo4JFIQoZEfLYgIFhQVyae4hCpJFGBJ11OuHIxRYEXMhnKGEUkCuNYchYKJTAmOElYGEUixoIFwlUYCc7Vl8GFsVroKdlE01VPih-D0WbjYdv0-pUJ0Nr8Jy3vzT3GXS4nCMMcFylkXlnCCUU5xJlgWUG9icyzE9Nq2mJe5adD8G14Hpn-9ra1A3aNy8bPIXizdSb3yjtRPni6HL_sPl-Cbx8aJ1tOcMAxn81xs0iWj-_ktBLIvX9cy_m9_eV-NZveHN-qPdIdOd3d68THKwusLOu7ZXwc_ccvvwE1&checkForMicrosoftAccount=true 2017-10-15 20:00:45,944 INFO [AppTest:74] () POST - HIT BUTTON Has anyone been able to login to office 365 using HtmlUnit ? |
From: jp l. <jp....@gm...> - 2017-10-07 16:21:14
|
nevermind ! found it in team city https://ci.canoo.com/teamcity/viewLog.html?buildTypeId=HtmlUnit_FastBuild&buildId=lastSuccessful&tab=artifactsOn Sat, Oct 7, 2017 at 6:13 PM, jp list <jp....@gm...> wrote: > Hi Ronald, > > thank you for you answer and support. > > Where can I find latest snapshot ? I could't find it. I checkout trunk > and compile that one. On Sat, Oct 7, 2017 at 5:17 PM, Ronald Brill > <rb...@rb...> wrote: > >>Hi There. > > > > Hi > > > >>I am building a spider for a web page that is generating a link for a > >>PDF ... but I can't get the link ... I incremented the TO to 60.000 > >>and tried different Browsers ... but not luck ... I am using 2.27 > >>version. > > > > It is always a good idea (at least if you face some problems) to > use the latest snapshot build. Usually it contains some fixes and > improvements. Because the snapshots are only available from builds > passing the whole test suite there is no risk. > > > >>any clue what could be the issue ? > > > > Not really, i was able to get the pdf with this code (only minor > changes - maybe the latest snapshot is the trick). > > > > public static void main(String[] args) throws Exception { > > String folioNumber = "928540be-cdeb-48b0-9e93-3d0f9b29fed1"; > > > > try (final WebClient webClient = new > WebClient(BrowserVersion.BEST_SUPPORTED)) { > > webClient.getOptions().setThrowExceptionOnScriptError(false); > > > > final HtmlPage home = > webClient.getPage("https://www.afphabitat.cl/herramientas-y-servicios/validar-certificados/"); > > webClient.waitForBackgroundJavaScript(6000); > > > > final HtmlInput cuitInput = > home.getFirstByXPath("//*[@id=\"folio\"]"); > > cuitInput.type(folioNumber); > > > > final HtmlAnchor validarButton = > home.getFirstByXPath("//*[@id=\"form\"]/div/div/div[2]/div[2]/a"); > > HtmlPage result = validarButton.click(); > > webClient.waitForBackgroundJavaScript(6000); > > // System.out.println(home.asXml()); > > > > > > final HtmlAnchor pdfLink = > result.getFirstByXPath("//*[@id=\"descargapdf\"]"); > > System.out.println(pdfLink.getHrefAttribute()); > > > > UnexpectedPage pdf = pdfLink.click(); > > // write your pdf to a file > > > > } > > } > > > > RBRi > > -------------------------- > > WETATOR > > Smart web application testing > > http://www.wetator.org > > </rb...@rb...> </jp....@gm...> |
From: jp l. <jp....@gm...> - 2017-10-07 16:13:28
|
Hi Ronald, thank you for you answer and support. Where can I find latest snapshot ? I could't find it. I checkout trunk and compile that one. On Sat, Oct 7, 2017 at 5:17 PM, Ronald Brill <rb...@rb...> wrote: >>Hi There. > > Hi > >>I am building a spider for a web page that is generating a link for a >>PDF ... but I can't get the link ... I incremented the TO to 60.000 >>and tried different Browsers ... but not luck ... I am using 2.27 >>version. > > It is always a good idea (at least if you face some problems) to use the latest snapshot build. Usually it contains some fixes and improvements. Because the snapshots are only available from builds passing the whole test suite there is no risk. > >>any clue what could be the issue ? > > Not really, i was able to get the pdf with this code (only minor changes - maybe the latest snapshot is the trick). > > public static void main(String[] args) throws Exception { > String folioNumber = "928540be-cdeb-48b0-9e93-3d0f9b29fed1"; > > try (final WebClient webClient = new WebClient(BrowserVersion.BEST_SUPPORTED)) { > webClient.getOptions().setThrowExceptionOnScriptError(false); > > final HtmlPage home = webClient.getPage("https://www.afphabitat.cl/herramientas-y-servicios/validar-certificados/"); > webClient.waitForBackgroundJavaScript(6000); > > final HtmlInput cuitInput = home.getFirstByXPath("//*[@id=\"folio\"]"); > cuitInput.type(folioNumber); > > final HtmlAnchor validarButton = home.getFirstByXPath("//*[@id=\"form\"]/div/div/div[2]/div[2]/a"); > HtmlPage result = validarButton.click(); > webClient.waitForBackgroundJavaScript(6000); > // System.out.println(home.asXml()); > > > final HtmlAnchor pdfLink = result.getFirstByXPath("//*[@id=\"descargapdf\"]"); > System.out.println(pdfLink.getHrefAttribute()); > > UnexpectedPage pdf = pdfLink.click(); > // write your pdf to a file > > } > } > > RBRi > -------------------------- > WETATOR > Smart web application testing > http://www.wetator.org </rb...@rb...> |
From: Ronald B. <rb...@rb...> - 2017-10-07 15:17:24
|
>Hi There. Hi >I am building a spider for a web page that is generating a link for a >PDF ... but I can't get the link ... I incremented the TO to 60.000 >and tried different Browsers ... but not luck ... I am using 2.27 >version. It is always a good idea (at least if you face some problems) to use the latest snapshot build. Usually it contains some fixes and improvements. Because the snapshots are only available from builds passing the whole test suite there is no risk. >any clue what could be the issue ? Not really, i was able to get the pdf with this code (only minor changes - maybe the latest snapshot is the trick). public static void main(String[] args) throws Exception { String folioNumber = "928540be-cdeb-48b0-9e93-3d0f9b29fed1"; try (final WebClient webClient = new WebClient(BrowserVersion.BEST_SUPPORTED)) { webClient.getOptions().setThrowExceptionOnScriptError(false); final HtmlPage home = webClient.getPage("https://www.afphabitat.cl/herramientas-y-servicios/validar-certificados/"); webClient.waitForBackgroundJavaScript(6000); final HtmlInput cuitInput = home.getFirstByXPath("//*[@id=\"folio\"]"); cuitInput.type(folioNumber); final HtmlAnchor validarButton = home.getFirstByXPath("//*[@id=\"form\"]/div/div/div[2]/div[2]/a"); HtmlPage result = validarButton.click(); webClient.waitForBackgroundJavaScript(6000); // System.out.println(home.asXml()); final HtmlAnchor pdfLink = result.getFirstByXPath("//*[@id=\"descargapdf\"]"); System.out.println(pdfLink.getHrefAttribute()); UnexpectedPage pdf = pdfLink.click(); // write your pdf to a file } } RBRi -------------------------- WETATOR Smart web application testing http://www.wetator.org |
From: jp l. <jp....@gm...> - 2017-10-05 22:38:54
|
Hi There. I am building a spider for a web page that is generating a link for a PDF ... but I can't get the link ... I incremented the TO to 60.000 and tried different Browsers ... but not luck ... I am using 2.27 version. here is my code: public void start() throws Exception { try { String folioNumber = "928540be-cdeb-48b0-9e93-3d0f9b29fed1"; try (final WebClient webClient = new WebClient(BrowserVersion.BEST_SUPPORTED)) { webClient.getOptions().setThrowExceptionOnScriptError(false); final HtmlPage home = webClient.getPage("https://www.afphabitat.cl/herramientas-y-servicios/validar-certificados/"); webClient.waitForBackgroundJavaScript(60000); final HtmlInput cuitInput = home.getFirstByXPath("//*[@id=\"folio\"]"); cuitInput.setValueAttribute(folioNumber); final HtmlAnchor validarButton = home.getFirstByXPath("//*[@id=\"form\"]/div/div/div[2]/div[2]/a"); HtmlPage result = validarButton.click(); webClient.waitForBackgroundJavaScript(60000); final HtmlAnchor pdfLink = result.getFirstByXPath("//*[@id=\"descargapdf\"]"); Assert.assertTrue(StringUtils.isNotEmpty(pdfLink.getHrefAttribute())); } } catch (Exception e) { throw e; } } any clue what could be the issue ? |