30
votes
7answers
14k views

Selenium 2 (WebDriver) and Phpunit?

Any one know how to use Selenium 2 with Phpunit? Are there any Selenium 2 samples in PHP?
12
votes
1answer
491 views

“Could not connect to the Selenium RC server” after some time of executing script

I have got a test case in my test class and some problems with it. I run the script from console. The script is executed to a certain point and then the test fails with error: Could not connect to ...
8
votes
5answers
3k views

PHPUnit - 15+ hrs wasted and still doesn't work

So I want to get PHUnit up so I can run selenium server, but I've come to that sad realization that this will likely never happen for me. I have tried it with numerous different versions of WAMP and ...
8
votes
1answer
5k views

How can I remove completely PHPUnit using the PEAR Installer?

I installed PHPUnit using the PEAR installer a few days ago (I also installed Selenium RC for testing in PHP purpose). Now I want to uninstall it (also delete all related folders and files) I ran the ...
7
votes
8answers
10k views

How do I solve this error: “Class PHPUnit_Extensions_SeleniumTestCase could not be found”

I am trying to run a SeleniumTestCase with phpunit but I cannot get it to run with the phpunit.bat script. My goal is to use phpunit with Selenium RC in CruiseControl & phpUnderControl. This is ...
7
votes
1answer
311 views

PHPUnit Selenium, clickAndWait() function doesn't work in Opera

I have problem with PHPUnit_Selenium in Opera. If I have clicked on element in my test code, the page will not load. In other browsers such as Firefox, IE, Chrome and Safari, it works correctly. ...
6
votes
2answers
2k views

What is the best way to assert redirections in Selenium?

I am writing a selenium test and I need to assert that the page is redirected. How should I verify this? What would be the best way? I am using PHPUnit and the PHPUnit_Extensions_SeleniumTestCase.
6
votes
2answers
3k views

Run a PHPUnit Selenium test case programatically (“within PHP”)

How can I run a test "within PHP" instead of using the 'phpunit' command? Example: <?php require_once 'PHPUnit/Extensions/SeleniumTestCase.php'; class MySeleniumTest extends ...
5
votes
2answers
1k views

How do you test pages that require authentication with Selenium?

I need to test a web application using Selenium. The app is fairly common in its setup: it requires signing in for most of the functionality to be exposed. Upon loading a page, if the user is not ...
5
votes
2answers
452 views

What is the best way to organize Selenium tests with PHPUnit?

I am getting started with writing front-end tests for my project, and I would like to know the best way to organize my selenium test cases. Should I make a separate suite for each section of the ...
5
votes
2answers
611 views

Selenium test case returns Process finished with exit code 0

I have installed phpunit on windows and have coppied the example program. Changing the url to google.com <?php require_once 'PHPUnit/Autoload.php'; require_once ...
5
votes
2answers
1k views

Selenium + PHPUnit: sessionId should not be null; has this session been started yet?

I'm running Selenium RC with PHP. I run a simple login test, that completes successfully, but just before closing the browser, I get the following error: 23:50:09.969 INFO - Command request: ...
4
votes
3answers
174 views

Is it realistic to start using unit testing when you're almost done?

I've been working for 2 months and a half in a project and it is practically finished. However I keep seeing some errors I fixed in the past that come back to annoy me. I then fix them again and ...
4
votes
2answers
1k views

Browser session in setUp(), tearDown(), no per testcase setup?

I've previously written some selenium tests using ruby/rspec, and found it quite powerful. Now, I'm using Selenium with PHPUnit, and there are a couple of things I'm missing, it might just be because ...
4
votes
1answer
342 views

Selenium don't show failed number lines

I have Selenium server working with PHPUnit on a MAMP local server. When an Assert fail, the failed number line is not showing, instead I see a phpunit number line. When I execute a "phpunit only" ...

1 2 3 4 5 18
15 30 50 per page