Bat file: How can I run Selenium IDE script from a bat file? Anyone give me an example?

1,252 views
Skip to first unread message

java_non_ninja

unread,
Mar 9, 2013, 3:42:09 PM3/9/13
to seleniu...@googlegroups.com
Can provide the code I have used in the past to make it work, and the code I am trying now if necessary, but tried that in another thread and no one replied.

tester

unread,
Mar 11, 2013, 11:41:03 AM3/11/13
to seleniu...@googlegroups.com

Instead of running IDE in bat file, you can export your recorded script to a java and run the java program in bat file.

java_non_ninja

unread,
Mar 11, 2013, 12:13:26 PM3/11/13
to seleniu...@googlegroups.com
No I can't. The reason I am trying to do this is that we have given up trying to make that work, exporting it as webdriver you mean? This requires java and webdriver knowledge that we do not have at my work and are not permitted / can not afford to take the time to learn. We did spend a long time trying to do what you said, but it never worked, whereas in the past we have had batch files running it, but now the seleniumserver version they used etc is out of date.

tester

unread,
Mar 11, 2013, 12:57:10 PM3/11/13
to seleniu...@googlegroups.com

I would recommend check out the Selenium support page, there are a lot of Seleinum-based products listed there that may help you: http://docs.seleniumhq.org/support/.

java_non_ninja

unread,
Mar 11, 2013, 1:24:47 PM3/11/13
to seleniu...@googlegroups.com
There is nothing in the docs about this therefore this would just direct me to the support groups ie here!


On Saturday, 9 March 2013 20:42:09 UTC, java_non_ninja wrote:

Greg Arndt

unread,
Mar 11, 2013, 2:06:14 PM3/11/13
to seleniu...@googlegroups.com
First, you do not have to save selenium IDE scripts as webdriver, you can also save them as RC code.  Although I am not sure if that will solve the problems you have.  Just wanted to point out that it's not webdriver only.

I do not usually use the IDE, but hopefully this is some information that will get you closer to solving your problem.

If you download the selenium server jar from http://docs.seleniumhq.org/download/ you can then call that from the command line, pass the htmlSuite parameter and the necessary information for the test suite created in IDE to be run.

Export your test suite as an html file from the IDE (or hand create it yourself) and then run a command such as:

java -jar selenium-server-standalone-2.31.0.jar -port 4444 -htmlSuite *firefox "{{your beginning url}}" "{{path to the test suite html file}}l" "{{path to a results html file that it will use"

You could wrap that up in a batch file.

java_non_ninja

unread,
Mar 11, 2013, 4:21:24 PM3/11/13
to seleniu...@googlegroups.com
Thanks Greg, thats got me a bit further - its at least trying to open my site now, I had a link to a test rather than a test suite.

The test is falling over right at the start but need to work out whether that is a problem with the test or the batch file.


On Saturday, 9 March 2013 20:42:09 UTC, java_non_ninja wrote:
Reply all
Reply to author
Forward
0 new messages