instaclick/php-webdriver — pull request #52 by coverslide (2014-05-12 16:41:06+00:00)
Title: Allow file uploads to remote servers.

I am currently blocked on a project where I need to test file uploads on our selenium grid setup. Part of this is because you have Session#file set as an ObsoleteMethod, thus blocking file uploads completely. I looked through the java client source code, and figured out how to implement file uploads, which is a process of encoding the file as a zip, base64 encoding that data, and sending it to the :sessionId/file endpoint as the "file" parameter. Fairly simple to implement, really. I have tested my patch for my current project, and it works flawlessly.