cobrateam/splinter — pull request #183 by medwards (2012-11-16 15:20:43+00:00)
Title: Remote driver tests

A few fixes here, first fixing the tests so the failures are exposed and then some more stuff:
* Replace `ps` check for selenium with an urlopen to the default url
* Remove the subprocess patch that was missed (and the tests never got executed because of the above issue)
* Default to firefox because passing `None` for capabilities raises an Exception and passing an empty dictionary gives you an HTMLUNIT driver by default which has weird behaviour and doesn't pass tests.

Now, I still have 3 failures with checking for the existence of the async-elements. I've tried adding wait_time's with mixed success. I'd like to get some help investigating and resolving these test failures in the remote driver, but this stuff at least gets the tests executing.

Here is the test output + test script arguments which should help in reproducing the problem. Note you will need to have the selenium server running locally on your machine.

```
(splinter_testing)medwards@heretix:~/forks/splinter$ ./run_tests.py -w tests.test_webdriver_remote
..........................................................F.............................................F................F..............................................

FAILURES

Test method: test_find_by_id_should_found_an_async_element (tests.test_webdriver_remote.RemoteBrowserTest)
Traceback (most recent call last):
File "/home/medwards/forks/splinter/tests/async_finder.py", line 28, in test_find_by_id_should_found_an_async_element
assert 1 == len(self.browser.find_by_id('async-header'))
AssertionError
========================================================================================================================

Test method: test_is_element_not_present_by_id_returns_false_if_element_is_present (tests.test_webdriver_remote.RemoteBrowserTest)
Traceback (most recent call last):
File "/home/medwards/forks/splinter/tests/is_element_present.py", line 173, in test_is_element_not_present_by_id_returns_false_if_element_is_present
self.assertFalse(self.browser.is_element_not_present_by_id('async-header'))
AssertionError: True is not false
========================================================================================================================

Test method: test_is_element_present_by_id (tests.test_webdriver_remote.RemoteBrowserTest)
Traceback (most recent call last):
File "/home/medwards/forks/splinter/tests/is_element_present.py", line 146, in test_is_element_present_by_id
self.assertTrue(self.browser.is_element_present_by_id('async-header'))
AssertionError: False is not true
========================================================================================================================

168 tests. 3 failures. 0 errors.
```