Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed selenium-server-standalone-2.33.0.jar, phpUnit, selenium extension for phpUnit.

This test runs ok:

$this->assertEquals('my title',$this->title());

But when I try to use $this->byClassName('sideNav');

I get

Uncaught exception 'BadMethodCallException' with message 'The command is not recognized by the server.

What can be the reason ?!

share|improve this question

Post is related to a rapidly changing event.

Try the following, it should work:

$this->element($this->using('css selector')->value('*[class="sideNav"]'));

instead of

share|improve this answer

You need to run selenium server before you execute your test cases.

Try following steps:

  1. Open Terminal / CMD.
  2. Navigate to directory where your selenium-server-standalone-2.33.0.jar is stored.

E.g: cd /User/Documents/Selenium

  1. Execute following command to run the server

    java -jar selenium-server-standalone-2.33.0.jar

This will start selenium server.

Note: You will require JRE to be installed to run jar files in your machine.

share|improve this answer

Here is an example from the tests of the project of how to use this method:

public function testElementsKnowTheirTagName()
    $element = $this->byClassName('theDivClass');
    $this->assertEquals('div', $element->name());
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.