HtmlUnit for PHP

Hi,

I read on the google site about HtmlUnit that's written in Java. From my limited understanding of HtmlUnit it's used as a testing unit to fill out forms, submit forms even when these pages are created with Javascript such as jQuery or Prototype.

1) I'm wondering if there is something similar written for PHP. If not then I was thinking of learning Java.

2) What I'd like to do is retrieve the HTML snapshots when logging in and then submit forms. Can HtmlUnit do this? I was looking at curl for PHP but it doesn't seem to handle Javascript as well or am I wrong?

3) It seems like the HmtlUnit will be able to actually click buttons too so I can see how this can be useful for testing and also the submission of forms. I suppose there is nothing written, perhaps, in PHP and Javascript to click on buttons and similar level of functionality of the HtmlUnit, is there?

Thank you,
Vkimura
Victor KimuraSEO, Web DeveloperAsked:
Who is Participating?
 
a_bCommented:
Try looking into Selenium. Easily the best tool in case you are not a java person or donot want to spend time with fiddling with code. There is a Selenium IDE plugin for firefox, that makes things even easier. You can record you test cases and play then over and over again.
0
 
Victor KimuraSEO, Web DeveloperAuthor Commented:
Hi a_b,

Selenium looks like an excellent program/IDE. I was just browsing the site and notice Selenium works with Ruby. I'd like to test forms based on retrieving data from MySQL. Do you know if I can get Selenium to work with MySQL and PHP. There is some reference to Java as well.

Thank you,
vkimura
0
 
a_bCommented:
Have a look at this - http://geekswithblogs.net/Saqib/archive/2008/01/14/setting-up-php-environment-for-selenium.aspx

You might have to have a look at PHPUnit
0
 
Victor KimuraSEO, Web DeveloperAuthor Commented:
Thank you.
Victor
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.