File upload
Need
I want to upload a file via my application
Solution
#CLEAN DOWNLOAD FOLDER
emptyDownloadFolder
#DOWNLOAD IMAGE
setBrowser,chrome
launchBrowser
browserClearCache
browserCloseAllTabs
browserNewTab
browserGoToUrl,https://www.pexels.com/fr-fr/photo/rhume-glacier-neige-paysage-10522082/
pressEnter
waitUntilPageLoaded,30000
clickByTextExact,Français
waitUntilTextExact,Télécharger gratuitement
clickByTextExact,Télécharger gratuitement
waitUntilByIdBeforeClick,com.android.chrome:id/positive_button,true
waitUntilByTextExactBeforeClick,File downloaded,true
applicationKill,com.android.chrome
#SEND IMAGE BY MESSAGES APP
applicationStart,com.samsung.android.messaging
clickById,com.samsung.android.messaging:id/fab
waitUntilTextExact,New conversation
enterText,0600000000
clickById,com.samsung.android.messaging:id/attach_gallery_button
waitUntilId,com.samsung.android.messaging:id/gallery_item_selector
clickById,com.samsung.android.messaging:id/gallery_item_selector
waitUntilByTextExactBeforeClick,Resize,true
Explaination
Cleaning the phone's download directory
I download a file to the phone's download directory
I use my downloaded file in my application
Here some screenshots of the test :
 |
Â