-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use portable
newTemporaryFile
method in Grease
- Loading branch information
Showing
2 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
...-Parasol.package/WAWebDriverFunctionalTestCase.class/instance/testUploadFunctionalTest.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
testing | ||
testUploadFunctionalTest | ||
|
||
| file | | ||
| filePathString | | ||
self selectTest: 'WAUploadFunctionalTest'. | ||
|
||
file := GRPlatform current newTemporaryFileReferenceNamed: 'testfile.txt'. | ||
filePathString := GRPlatform current newTemporaryFileNamed: 'testfile.txt'. | ||
GRPlatform current | ||
writeFileStreamOn: file pathString | ||
writeFileStreamOn: filePathString | ||
do: [ :stream | stream nextPutAll: 'blabla' ] | ||
binary: false. | ||
|
||
(driver findElementByCSSSelector: 'input[type=file]') sendKeys: file pathString. | ||
(driver findElementByCSSSelector: 'input[type=file]') sendKeys: filePathString. | ||
(driver findElementByCSSSelector: 'input[value=Load]') click. | ||
|
||
self assert: (driver findElementByCSSSelector: 'pre') getText equals: 'blabla' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters