From: Ahmed A. <asa...@ya...> - 2015-07-05 06:26:52
|
Hi, I tried with BrowserVersion.CHROME, since I don't have IE8. input.files was not implemented, now it is fixed in SVN. Once we have new successful build, you can use it. Please note it is supported in only BrowserVersion.CHROME/FF/IE11 If you still need IE8, then please trace down the single JavaScript line which returned null (but not in real IE8). You can use proxy (e.g. Charles) to change the incoming JavaScript and compare the results between HtmlUnit and real IE8. Ahmed From: "Parham, Clinton" <cp...@bi...> To: "htm...@li..." <htm...@li...> Sent: Friday, July 3, 2015 3:24 PM Subject: [Htmlunit-user] RichFaces fileUpload: Cannot call method "match" of undefined <!--#yiv9648094149 _filtered #yiv9648094149 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv9648094149 #yiv9648094149 p.yiv9648094149MsoNormal, #yiv9648094149 li.yiv9648094149MsoNormal, #yiv9648094149 div.yiv9648094149MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", "sans-serif";}#yiv9648094149 a:link, #yiv9648094149 span.yiv9648094149MsoHyperlink {color:blue;text-decoration:underline;}#yiv9648094149 a:visited, #yiv9648094149 span.yiv9648094149MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv9648094149 span.yiv9648094149EmailStyle17 {font-family:"Calibri", "sans-serif";color:windowtext;}#yiv9648094149 .yiv9648094149MsoChpDefault {font-family:"Calibri", "sans-serif";} _filtered #yiv9648094149 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv9648094149 div.yiv9648094149WordSection1 {}-->Hello HTMLUnit users, I’ve been using HTMLUnit for a while with the RichFaces fileUpload component. But after a recent RichFaces update (from 4.3.7 to 4.5.7), my test no longer works: TypeError: Cannot call method "match" of undefined I’ve tried updating to HTMLUnit 2.17 and still get the error. A testcase to reproduce is included below. How can I get this working again? Thanks, Clint package myTests; import org.junit.Test; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlInput; import com.gargoylesoftware.htmlunit.html.HtmlPage; public class HTMLUnitTestCase { final WebClient webClient = new WebClient(); @Test public void testRichFacesFileUpload() throws Exception { final HtmlPage page = webClient .getPage("http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=fileUpload&skin=blueSky"); HtmlInput htmlInput = (HtmlInput) page.getByXPath( "//input[@type='file']").get(0); htmlInput.setValueAttribute("/tmp/KYN_TopLeft.PNG"); } } | The contents contained herein may contain confidential information. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, printing or action taken on the contents is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete this message. | ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |