[Selenium-users] Java driven mode, file uploads

16 views
Skip to first unread message

clear...@openqa.org

unread,
Jun 23, 2005, 11:31:36 AM6/23/05
to selenium-users...@googlegroups.com
All,

Does Selenium have any commands for specifying a file upload? I'm
attempting to use Selenium to test a site that has several pages that
require users to upload data to the server. This is a singular
deficiency of almost every open source web testing framework I've
tried so far (at least in terms of Java-based tools, like jWebUnit,
httpunit, canoo webtest, etc) -- some support it, but you always have
to jump through hoops to get it to work, and even then it's a
crapshoot.

Additionally, I have had serious issues attempting to get Selenium to
work in Java "driven" mode. Aside from there not really being much
documentation in terms of setting it up (nor even any javadoc for the
selenium java classes), I can't get it to reliably complete tests, at
least on my Windows XP SP 2 platform (the only one I've tried yet). I
configured a "driver" servlet in Tomcat using the CommandBridge class,
and pointed my Junit test to it. I used CommandBridge directly because
I have no interest in having Selenium auto-deploy or in any way
directly manipulate Tomcat. I can run the tests using Firefox as my
default browser and they complete MOST of the time, but every now and
again the browser will "hang" in the middle of an operation and the
Selenium test will fail with a timeout error. Additionally, at the END
of the driven tests, Firefox pegs the processor and hangs for a good
30 seconds before coming back to life. Neither of these things happens
when running similar tests in TestRunner/html mode.

Moving away from Firefox, when trying to test using IE as the browser
instead, IE seems to get caught in an infinite loop if I use
"type...()" methods to try to insert text in form fields. Those same
commands work using the TestRunner in IE, but the infinite loop
happens every time in Java.

My takeaway is that Java "Driven" mode is not yet ready for prime time
- At least in the "adjacent" mode that I need it to run in (using the
CommandBridge servlet and not spawning my own private Jetty process).
Has anyone had better success using Selenium this way?

Overall I'm excited about this testing framework, and I think it'll be
the right approach as it matures further.

Thanks,
-Peter



Alex Borshik

unread,
Jun 23, 2005, 11:48:25 AM6/23/05
to selenium-users...@googlegroups.com
Peter / All

I too am having the same issues as you using driven mode. I wish to use
the same setup as you (CommandBridge in external Tomcat) I am also
experiencing selenium timeouts on both the client and server side. I have
tried this on Win XP and Linux with both selenium 0.5.0 and selenium build
574. I could also not get the integration-tests target to work from the
source distribution, they were failing with the same error.

I am also very excited about selenium, it shows huge potential and will
hopefully make my life a lot easier, keep up the good work!

Thanks,
Alex Borshik
CRD Application Developer
| CBEC | Glasgow | CRD Build Team | (: +44 141 GDP 228 5211 | Ê: +44 141 228 5005 |
pwp




Peter Solderitsch <nop...@gmail.com>
Sent by: selenium-us...@lists.public.thoughtworks.org
23/06/2005 16:31
Please respond to ps; Please respond to selenium-users


To: seleniu...@lists.public.thoughtworks.org
cc:
Subject: [Selenium-users] Java driven mode, file uploads
_______________________________________________
Selenium-users mailing list
Seleniu...@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users



att1.dat
att1.dat
Reply all
Reply to author
Forward
0 new messages