Open mc-murphy83 opened 8 years ago
did some more research - it currently looks like that the function "assertSelectOptions" hands in an array instead of a string into PHPUnit_Framework_Assert::assertRegExp() - which in turn causes the Failure, as an array can not easily be transformed into a suitable string respresentation that would allow for comparision. It looks like the Interface / return value used has changed.
This function is dynamically generated deep down the Selenium 1 driver (that's very old code). I would workaround this by caling getSelectOptions()
and asserting the result yourself, but I don't know how to write this in Selenese.
If you want to write a Pull Request fixing the problem, what you're looking for is PHPUnit_SeleniumTestCase_Driver::autoGenerateCommands()
and PHPUnit_SeleniumTestCase_Driver::assertCommand()
methods.
assertSelectOptions gives an error when trying to check for Option-Fields with neither value nor innerHTML set. example:
When using the following Selenese (which works fine in the SeleniumIDE)
Results in the following error:
Argument #2 (No Value) of PHPUnit_Framework_Assert::assertRegExp() must be a string Caused by PHPUnit_Framework_Exception: Argument #2 (No Value) of PHPUnit_Framework_Assert::assertRegExp() must be a string
I think this is due to the empty strings that are used for matching.