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
File Upload - Invalid argument supplied for foreach() #170
Comments
I have the same issue, also on ubuntu. I've only tried using PhantonJS. |
I am looking. It would be very helpful If there is a way for reproducing. The HTTP code is |
whhone if I get spare time I will try to reproduce, I'm using Webdriver via Codeception. phantomjs version 1.9.7 x86 If this helps: |
@leex What is the version of PHP you are using? |
@whhone I'm on PHP 5.4.27 |
Is there any update on this, or can I provide any more information for you? |
I'm having the same issue. If I can help somehow to fix, please let me know |
Closing this as it is over 6 months old. If it is still an issue, please create a new issue with as much current reproduction information as possible. Thanks. |
With the newest versions of Selenium, PhantomJS, and the webdriver module in Codeception, this issue seems to have been fixed along the way. |
I'm using Codeception with the Facebook WebDriver module, Selenium 2, and PhantomJS on a Jenkins server that runs builds for me. The errors only occur on the Jenkins server (an Ubuntu box), not on my local Mac OS X machine.
I'm getting
Invalid argument supplied for foreach()
. Here's the stack trace:I'm using the
attachFile
method in Codeception, which simply passes a CSS selector and a file path.I've traced this back as far as it will go. The problem originates when the WebDriver sends the "sendFile" command inside
webdriver/lib/remote/HttpCommandExecutor.php
, which sends a POST through curl to/session/<session_id>/file
, but the response returns with a value and session_id of null.The null value gets passed back up to the
upload
method inwebdriver/lib/remote/RemoteWebElement.php
. Those values get passed back to thesendKeys
method in the same file, which callsWebDriverKeys::encode
. In theencode
method, the foreach fails because of null values.I've been chasing this bug for days. Do you have any ideas?
Here's the JSON response of the curl POST.
The text was updated successfully, but these errors were encountered: