giorgiosironi / phpunit-selenium

Selenium RC integration for PHPUnit
http://www.phpunit.de/
Other
602 stars 271 forks source link

com.google.common.collect.Maps$TransformedEntriesMap cannot be cast to org.openqa.selenium.WebElement #364

Closed cbergau closed 8 years ago

cbergau commented 8 years ago

This is probably not a PHPUnit-Selenium framework error, but i have to start somewhere asking this question.

HTML:

<object type="text/html" data="https://aide.esprit.fr/fr_fr/245" class="ShowTermsSize" id="ShowTermsFrame">
    <param name="src" value="https://aide.esprit.fr/fr_fr/245"/>
</object>

PHPUnit-Selenium Code:

 $frame = $this->testCase->byId('ShowTermsFrame');

I am getting the exception:

com.google.common.collect.Maps$TransformedEntriesMap cannot be cast to org.openqa.selenium.WebElement

 /home/vagrant/htdocs/checkout/trunk/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase/Driver.php:165
 /home/vagrant/htdocs/checkout/trunk/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php:108
 /home/vagrant/htdocs/checkout/trunk/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php:134
 /home/vagrant/htdocs/checkout/trunk/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php:175
 /home/vagrant/htdocs/checkout/trunk/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php:81
 /home/vagrant/htdocs/checkout/trunk/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase.php:344

I googled that exception, but getting Java WebDriver stuff only that i can not apply in PHP.

EDIT: Using latest dev-master Code (updated today) with PHPUnit 4.8

cbergau commented 8 years ago

https://bugs.chromium.org/p/chromedriver/issues/detail?id=1276

Will be fixed in ChromeDriver Version 2.21 (current stable is 2.20 tho)

Thats a Chromebug. I will close this issue.