Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It's impossible to type value if value type is integer #165

Closed
emaks opened this issue Aug 28, 2012 · 1 comment
Closed

It's impossible to type value if value type is integer #165

emaks opened this issue Aug 28, 2012 · 1 comment

Comments

@emaks
Copy link
Contributor

emaks commented Aug 28, 2012

TEST

'Firefox', 'browserName' => 'firefox', 'host' => 'localhost', 'port' => 4444); $this->setupSpecificBrowser($browser); $this->setBrowserUrl('http://www.google.com'); } ``` public function integerValueTest() { $this->element($this->using('xpath')->value("//*[@id='gs_tti0']"))->value(1.13); } ``` } Result: PHPUnit 3.6.12 by Sebastian Bergmann. InvalidArgumentException : The JSON parameters must be an array, or a NULL value in case they are not required. #0 ...\PHPUnit\Extensions\Selenium2TestCase\SessionCommand\Keys.php(66): PHPUnit_Extensions_Selenium2TestCase_Command->__construct(1.13, Object(PHPUnit_Extensions_Selenium2TestCase_URL)) #1 ...\PHPUnit\Extensions\Selenium2TestCase\CommandsHolder.php(120): PHPUnit_Extensions_Selenium2TestCase_SessionCommand_Keys->__construct(1.13, Object(PHPUnit_Extensions_Selenium2TestCase_URL)) #2 ...\PHPUnit\Extensions\Selenium2TestCase\CommandsHolder.php(146): {closure}(1.13, Object(PHPUnit_Extensions_Selenium2TestCase_URL)) #3 ...\PHPUnit\Extensions\Selenium2TestCase\CommandsHolder.php(100): PHPUnit_Extensions_Selenium2TestCase_CommandsHolder->newCommand('value', 1.13) #4 ...\integerValueTest.php(16): PHPUnit_Extensions_Selenium2TestCase_CommandsHolder->__call('value', Array) #5 ...\integerValueTest.php(16): PHPUnit_Extensions_Selenium2TestCase_Element->value(1.13) #6 [internal function]: integerValueTest->integerValue() #7 ...\PHPUnit\Framework\TestCase.php(942): ReflectionMethod->invokeArgs(Object(integerValueTest), Array) #8 ...\PHPUnit\Extensions\Selenium2TestCase.php(276): PHPUnit_Framework_TestCase->runTest() #9 ...\PHPUnit\Framework\TestCase.php(804): PHPUnit_Extensions_Selenium2TestCase->runTest() #10 ...\PHPUnit\Framework\TestResult.php(649): PHPUnit_Framework_TestCase->runBare() #11 ...\PHPUnit\Framework\TestCase.php(751): PHPUnit_Framework_TestResult->run(Object(integerValueTest)) #12 ...\PHPUnit\Extensions\Selenium2TestCase.php(243): PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult)) #13 ...\PHPUnit\Framework\TestSuite.php(772): PHPUnit_Extensions_Selenium2TestCase->run(Object(PHPUnit_Framework_TestResult)) #14 ...\PHPUnit\Framework\TestSuite.php(745): PHPUnit_Framework_TestSuite->runTest(Object(integerValueTest), Object(PHPUnit_Framework_TestResult)) #15 ...\PHPUnit\TextUI\TestRunner.php(325): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false) #16 ...\PHPUnit\TextUI\Command.php(192): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Extensions_SeleniumTestSuite), Array) #17 ...\ide-phpunit.php(95): PHPUnit_TextUI_Command->run(Array, true) #18 ...\ide-phpunit.php(434): IDE_PHPUnit_TextUI_Command::main() #19 {main}
@giorgiosironi
Copy link
Owner

value() and keys() have to detect the type of the variable, because it is possible to send an array containing some non-printable characters. I think they can check with is_scalar() instead of is_string().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants