I can't enable modules in the while running the selenium test cases. I am able to do so in the SimpleTest test cases. I tried it on a fresh install of drupal too.

Comments

ygerasimov’s picture

It should work completely the same. You should be able to enable modules passing arguments to setUp().

Implementation of the setUp() method for DrupalSeleniumWebTestCase is

protected function setUp() {
$modules = func_get_args();
parent::setUp($modules);
//...
}
So everything passed to it is passed to parent setUp method that should enable modules for you.

Please let me know if it doesn't work and give me example so I can reproduce the problem.

pbuyle’s picture

In D6, DrupalWebTestCase::setUp used a variable-length argument list as modules list. In D7, it supports both a variable-length argument list or an array as first argument. The array as first argument is the recommended way of using it and the variable-length argument list support will be removed in D8.

DrupalSeleniumWebTestCase::setUp call parent::setUp(func_get_args()) and thus only support the old deprecated Drupal 6 way of enabling module in a SimpleTest class.

PatchRanger’s picture

Category: task » support
Status: Active » Closed (duplicate)

Closed as a duplicate of #1876120: Fix setUp: let it get modules list as a single array, since that one has a patch.

PatchRanger’s picture

Issue summary: View changes

tried on fresh install