Codeception/Codeception — Issue #1: Error by using selenium
Author: dullus
Created: 2012-01-26 13:06:08+00:00
State: open

When I test acceptance test with Selenium I got some bug. Maybe it is related to Xpath element positionoing ? All other test with selenium runs just fine, just this one throws error.
* Selenium 2.15.0 + Java 1.6.0.21
* Codecept version 1.0.1
* PHP 5.3.8 (32b)
* Win7 64b

searchAjaxCept.php:

```php
wantToTest("EHMK/searchAjax");
$I->amOnPage("/");

/*for Selenium*/
$I->fillField("html body.lang-sk div#wrapper.container_12 div#main.container_12 div#box_search form#search_form fieldset div#search_bg input[name=search-input]", "mus");
//now ajax fires and finds "music" and "museums"
//JS parses ajax output creates

music
museums

//now I simulate click on in second

//XPath
$I->click("/html/body/ul/li[2]/a");
$I->see("museums");
?>
```

D:\codecept run acceptance --debug

There was 1 error:

Couldn't test ehmk/searchajax (searchAjaxCept.php)
Exception thrown Symfony\Component\CssSelector\Exception\ParseException:
Unexpected symbol: / at 0
Stack trace:
#1 tokenizeSymbol D:\devel\apache\php\PEAR\Symfony\Component\CssSelector\Tokenizer.php:99
#2 tokenize D:\devel\apache\php\PEAR\Symfony\Component\CssSelector\CssSelector.php:93
#3 parse D:\devel\apache\php\PEAR\Symfony\Component\CssSelector\CssSelector.php:61
#4 toXPath D:\devel\apache\php\PEAR\mink\src\Behat\Mink\Selector\CssSelector.php:27
#5 translateToXPath D:\devel\apache\php\PEAR\mink\src\Behat\Mink\Selector\SelectorsHandler.php:94
#6 selectorToXpath D:\devel\apache\php\PEAR\mink\src\Behat\Mink\Element\Element.php:67
#7 findAll D:\devel\apache\php\PEAR\mink\src\Behat\Mink\Element\Element.php:57
#8 find D:\devel\apache\php\PEAR\Codeception\src\Codeception\Util\Mink.php:127
#9 findEl D:\devel\apache\php\PEAR\Codeception\src\Codeception\Util\Mink.php:109

I cannot use CSS selector unless some changes are made in web page source, so then I get:

There was 1 failure:

Couldn't test ehmk/searchajax (searchAjaxCept.php)
Exception thrown PHPUnit_Framework_AssertionFailedError:
Link or Button or CSS for 'html body.lang-sk ul.ui-autocomplete li.ui-menu-item a.ui-corner-all' not found'
Stack trace:
#1 fail D:\devel\apache\php\PEAR\Codeception\src\Codeception\Util\Mink.php:128
#2 findEl D:\devel\apache\php\PEAR\Codeception\src\Codeception\Util\Mink.php:109