1

I was looking for selenium webdriver PHP bindings. In their documentation they say that PHP bindings are provided by third party. On their documentation page, they enlist following 3rd party bindings:

While I am new to Web UI automation, I do not know what problems I might face moving forward with any of these drivers.

I have already tried Selenium IDE as Firefox plugin, and in future I want to use those test cases/recordings along with my webdriver project.

Which one should I choose?

1 Answer 1

1

There are also a few more that have been released in the last few months

PHP by Adam Goucher

PHP by Nearsoft

I've used the Facebok bindings as it had the best documentation/examples at the time which meant I could get something up and running asap.

I'm trying the Nearsoft bindings now as their library is very similar (method names) to the official bindings in Java and the other supported languages...so hopefully once an official PHP library comes about it shouldn't take too much time to port my tests.

So (in no order but all important), choose bindings that...

  • Have good documentation/support/community activity
  • Have the methods you need
  • You can get running a basic test with

Some issues I have encountered with the bindings are...

  1. Lack of examples if you are struggling to get a particular call working
  2. Lack of support/discussion with owners/community that use the bindings
  3. Trying to use Selenium to test Facebook applications is doable but flakey...there are tricks such as logging in as a test user and re-polling an element until it ready to be checked against...I think one of the saucelabs videos covers little quirks like this
  4. You can use open your Selenium IDE tests and select "Options" > "Format" to see what they might look like as test cases, helps understand how you might use your asserts/verifys in phpunit. You may have to enable the "Formats" option and install PHP formats for this to work though, and take note of the warning message the IDE mentions when switching formats

Update June 2012 Just feeding back to say that the bindings from Nearsoft have turned out to be great, the "waitForElementUntilIsPresent" method and "WebDriverWait" class has meant my tests are much more reliable, even when using AJAXy features where the element isn't always ready.

Also Norton Internet Security 2012 was the thing interfering with my initial testing using these bindings.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for helping. I will look into it. Meanwhile, as other posts suggest, I have decided to move to Java Drivers.
What was the general message that you got from the other posts, were the Java bindings more reliable seeing as they are official?
yep. Java bindings are official and for later versions of webdriver, I did not want to rely on facebook to support those in PHP. One less dependency.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.