I am trying to test a fileupload via browser in selenium.
Setup is : Eclipse on Mac, Selenium in Bamboo on Linux, Java, Chrome
On my website the file upload works with a button . This button opens native browser file upload dialog(without a input; the button calls a JS on ng-click).
<button class="cs-button-link-01" ng-click="uploadFile()" ng-if="context.permissions.edit">
<i class="cs-icon cs-icon-circle-plus cs-iconsize-200"></i>
<span cs-translate="'csAssetFileListWidget.AddFileBtn'">File</span>
</button>
So the fileupload works fine for mac and linux on my mac with using a robot class like in File Upload using Selenium WebDriver and Java Robot Class for linux it works well with:
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_V);
robot.keyRelease(KeyEvent.VK_V);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.delay( 1000 * 4 );
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
But now I have the problem that I want to run it on Bamboo (on Linux, headless). (AutoIt cannot work cause its 4 Windows)
Do you have any ideas how to solve this problem?