0

I installed phpunit-selenium using composer according to here; https://phpunit.de/manual/3.7/en/selenium.html

The problem is that I only have selenium 2 for phpunit. PHPUnit_Extensions_Selenium2TestCase.php is there. But the file PHPUnit_Extensions_SeleniumTestCase.php does not exist in the extension map where it supposed to be. So selenium 1 function can not be used.

How can I get selenium 1 for php unit using composer (on a windows machine)? I know there is an answer involving pear; How do I solve this error: "Class PHPUnit_Extensions_SeleniumTestCase could not be found"

But pear is not preferred because composer is shared with the team. It would save installing it.

Community
  • 1
  • 1
user3379159
  • 81
  • 10

1 Answers1

2

Solved it. I needed to move back a version in phpunit-selenium:

  "require-dev": {  
    "phpunit/phpunit-selenium": "1.4.*"
}

instead of using the latest version which probably only works with selenium 2.

  "require-dev": {  
    "phpunit/phpunit-selenium": ">=1.2"
}
user3379159
  • 81
  • 10