-
1. Re: File upload testing with selenium
ppitonak Aug 25, 2009 10:14 AM (in response to boraldo1)Hi,
I've been dealing with FileUpload recently. As far as I know, it only works with Firefox and I think you have to run your browser using *chrome instead of *firefox. Then you just callselenium.attachFile(myLocator, "file:///someFile")
where locator points to the tag "input" on the page. Be careful that the first time you have to attach your file to tag with id e.g. j_id353:upload:file, but then a new tag appears so you have to attach second file to j_id353:upload:file0, third file to j_id353:upload:file1 etc. -
2. Re: File upload testing with selenium
ilya_shaikovsky Aug 25, 2009 10:47 AM (in response to boraldo1)
I've been dealing with FileUpload recently. As far as I know, it only works with Firefox
Hope you talking about testing possibility only and not about actual component ;) Was confused before read till the sentence end :) -
3. Re: File upload testing with selenium
prabhat.jha Aug 25, 2009 10:55 AM (in response to boraldo1)Yes, it's for testing only..component works rock solid with all browsers. :-) We are still struggling with selenium + IE combo for fileupload test.
-
4. Re: File upload testing with selenium
boraldo1 Aug 25, 2009 12:13 PM (in response to boraldo1)"ppitonak@redhat.com" wrote:
selenium.attachFile(myLocator, "file:///someFile")
This concerns usual html file upload. But I mean richfaces component http://livedemo.exadel.com/richfaces-demo/richfaces/fileUpload.jsf -
5. Re: File upload testing with selenium
ilya_shaikovsky Aug 25, 2009 12:16 PM (in response to boraldo1)richfaces control is set of simple input type=text under the hood if the flash turned off (by default)
-
6. Re: File upload testing with selenium
boraldo1 Aug 26, 2009 2:33 AM (in response to boraldo1)"ilya_shaikovsky" wrote:
richfaces control is set of simple input type=text under the hood if the flash turned off (by default)
I turned off Flash plugin and saw Get Adobe Flash player logo and component doesn't work. -
7. Re: File upload testing with selenium
nbelaevski Aug 26, 2009 5:52 AM (in response to boraldo1)Hi,
Switch Flash off using attribute. -
8. Re: File upload testing with selenium
boraldo1 Aug 26, 2009 11:31 AM (in response to boraldo1)"nbelaevski" wrote:
Switch Flash off using attribute.
Yes. This works.
But didn't you test this component with flash by Selenium ? -
9. Re: File upload testing with selenium
typek_pb Mar 2, 2012 6:28 AM (in response to boraldo1)hi guys,
I'm dealing with this problem in Richfaces 4.1, not sure if meanwhile something changed, but may I ask you for a code sniplet how you do the testing?
I'm not sure how to switch flash via attribute (the solution mentioned above).
thanks
-
10. Re: File upload testing with selenium
ppitonak Mar 2, 2012 6:57 AM (in response to typek_pb)Hi Peter,
rich:fileUpload in RichFaces 4.1 doesn't use Flash.
Regards,
Palo
-
11. Re: File upload testing with selenium
typek_pb Mar 4, 2012 12:15 AM (in response to ppitonak)Hi Palo,
thanks for reply. Does it mean, that there is currently no way to do the test?
I've found following bug report: https://issues.jboss.org/browse/RFPL-949
Should I wait till it's solved? Or can someone share some ideas on solution?
I'm running my tests on windows as well as linux => any windows only solution doesn't fit me.
Thanks.
-
12. Re: File upload testing with selenium
ppitonak Mar 6, 2012 5:09 AM (in response to typek_pb)Hi Peter,
we will investigate that soon. Meanwhile you can try http://stackoverflow.com/a/6130887/469043.
Regards,
Palo
-
13. Re: File upload testing with selenium
typek_pb Mar 7, 2012 4:13 AM (in response to ppitonak)Hi Pavol,
thanks for your response as well as progress on relevant charm.
I'll check the solution proposal whenever I have some time and provide the feedback.
-
14. Re: File upload testing with selenium
typek_pb Mar 11, 2012 6:57 AM (in response to ppitonak)Hi Pavol,
the suggested solution works for me (Windows+ FirefoxDriver).
Thanks a lot!