Selenium and PHP



  • As I read on the net, Selenium tests should be written in the language of the App if this is possible. Our intranet-application is written in PHP. I was able to get Selenium working with PHPUnit but for me it looks like PHP is really uncommon. All books and most of the other stuff I found on the net are using Selenium together with Java. So my questions are: Does it really make sense to use Selenium with PHP or do I have to learn Jave or C#? Where can I find the most information related to Selenium together with PHP? I understand the object oriented model of PHP but I'm not a very strong developer.. Is there something better than Selenium to automated testing a PHP application (GUI tests)?



  • Yes, it definetely makes sense to use it in a language you are comfortable with. PHPUnit has Selenium integration out of the box, did you look at the introduction in the PHPUnit manual? Selenium has its quirks, but is widely used, so there is a lot of information about it available. There are other projects, though, like http://phantomjs.org/. If you are not comfortable with programming your tests in PHP, maybe you should consider using Selenium IDE, which has a GUI that helps you build your tests.



Suggested Topics

  • 2
  • 3
  • 2
  • 2
  • 2