I try to use this function:
downloadBytes(exportLink.@href)
but I get array of bytes. How can I get zip file.
I try to use this function:
downloadBytes(exportLink.@href)
but I get array of bytes. How can I get zip file.
A file is nothing but an array of bytes. What do you need to actually do? You can save it somewhere by using a FileOutputStream, for example. You can use a ZipInputStream (with a ByteArrayInputStream) to read the entries directly in Java... So, what do you want to actually do?
I found another solution for saving zip in geb without asking directory. I configured my GebConfig.groovy :
profile.setPreference("browser.download.folderList",2)
profile.setPreference("browser.download.manager.showWhenStarting",false)
profile.setPreference("browser.download.dir", new File("").getAbsolutePath())
profile.setPreference("browser.helperApps.neverAsk.saveToDisk","application/zip")