3

How do I run test cases made with Selenium IDE (Firefox Plugin) in a headless browser?

When I create test cases with the firefox plugin it saves them as .html files.

I am trying to setup a way of running them in a headless browser, (using phantomJS or another tool/lib). I have seen many people mention running firefox in a hidden frame, but this is not the same as headless (ie. PhantomJS)

I have already figured out how to run selenium test cases from command line, but only in firefox or ie, I can't get it to run .html testcases on phantomjs:

java -jar selenium-server-standalone-2.39.0.jar -htmlSuite "*firefox" "http://127.0.0.1" "ts-ProjectList/TestSuite.html" "ProjectList-results.html"

I know the IDE can export test cases in different languages, but I want non-tech team members to be able to create tests using the firefox plugin.

SiKing
  • 10,003
  • 10
  • 39
  • 90
David Rust-Smith
  • 473
  • 4
  • 11
  • 1
    I am not sure if what you are asking is possible. However, the Selenese tests are generally very brittle. What you are proposing is going to lead to many false negatives, and low confidence in the automation effort. I would very much recommend that you consider dedicating a resource that translates the Selenese (non-tech) tests to a real language and a real framework, which will allow you the flexibility that you are asking for. – SiKing Jul 08 '14 at 19:58

1 Answers1

0

Have you looked at http://code.tutsplus.com/tutorials/headless-functional-testing-with-selenium-and-phantomjs--net-30545?

Changing "*firefox" to phantomjs should get you started.

You'll need the phantomJS driver: http://selenium.googlecode.com/svn/trunk/docs/api/py/webdriver_phantomjs/selenium.webdriver.phantomjs.webdriver.html

DMart
  • 2,401
  • 1
  • 14
  • 19