Skip to content

Instantly share code, notes, and snippets.

# FillTheForm
.idea/*
!/.idea
!tools/filltheform/*.apk
!.idea/runConfigurations
.idea/runConfigurations/*
!.idea/runConfigurations/installFillTheForm.xml
!.idea/runConfigurations/pushFillTheFormConfiguration.xml
!.idea/runConfigurations/pushFillTheFormConfigurationTwo.xml
<!--suppress ALL -->
<fillTheFormConfig>
<packages>
<!-- Here goes your app package name -->
<package>com.ivan9jukic.filltheformtutorial</package>
</packages>
<profiles>
<!-- Your test profiles go here -->
<profile name="John Doe Profile">
<!-- Ids and values of EditText elements go here -->
task pushFillTheFormConfiguration(type: com.novoda.gradle.command.Files) {
def filename = project.hasProperty('config_file_name') ? project.property('config_file_name') : 'sample_app_config_one'
script {
push("$project.rootDir/tools/filltheform/" + filename + ".xml", "/sdcard/FillTheForm/" + filename + ".xml")
}
doLast {
assertDeviceAndRunCommand(['shell', 'am broadcast',
'-a com.hrs.filltheform.INTENT_READ_CONFIGURATION_FILE',
'--es com.hrs.filltheform.INTENT_EXTRA_CONFIGURATION_FILE_PATH /FillTheForm/' + filename + '.xml',
'--ei com.hrs.filltheform.INTENT_EXTRA_CONFIGURATION_FILE_SOURCE 1',
task installFillTheForm(type: com.novoda.gradle.command.Install) {
apkPath "$project.rootDir/tools/filltheform/filltheform.apk"
}