HsacAcceptanceTests.SlimTests.BrowserTest.FileUploadTest


This test ensures we can deal with file upload inputs.

variable defined: HTML= {{{ <html> <body> Choose file: <input name="chosenFile" type="file"> <input name="chosenFile2" type="file"> <button>Upload</button> </body> </html>}}}

script mock xml server setup
add response
<html>
<body>
Choose file:
<input name="chosenFile" type="file">
<input name="chosenFile2" type="file">
<button>Upload</button>
</body>
</html>
$url<-[http://127.0.0.1:8000/FitNesseMock] get mock server url

script file fixture
$generated<-[bye1.txt] create bye1.txt containing Bye Bye 1



script browser test
open $url->[http://127.0.0.1:8000/FitNesseMock]
note Select file for first file upload on page
select file $generated->[bye1.txt]
check value of name=chosenFile /bye1.txt/ found in: C:\fakepath\bye1.txt
check value of name=chosenFile2 BLANK
note Select file for specific file upload on page
select file $generated->[bye1.txt] for name=chosenFile2
check value of name=chosenFile /bye1.txt/ found in: C:\fakepath\bye1.txt
check value of name=chosenFile2 /bye1.txt/ found in: C:\fakepath\bye1.txt


script mock xml server setup
stop