lundi 22 juin 2015

Add supported app at runtime in Selendroid

I'm using the code as from the Selendroid quickstart tutorial (pasted below) to launch the selendroid-standalone application.

SelendroidConfiguration config = new SelendroidConfiguration();
// Add the selendroid-test-app to the standalone server
config.addSupportedApp("src/main/resources/selendroid-test-app-0.15.0.apk");
selendroidServer = new SelendroidLauncher(config);
selendroidServer.launchSelendroid();

Now, since I want to test multiple applications which I don't know a priori, I'd like to leave the standalone executing and adding new supported applications at runtime. I could not find anything related to this in the documentation, except from a command-line option -folder which is said to specify a directory to monitor for new .apk files to sign and support.

It is close to what I want, but not exactly. I'd like to be able to individually pick supported apps to add via Java APIs to the standalone. I'd rather avoid havin to create a folder and copy the .apk in there from the code. Can I keep invoking config.addSupportedApp even after the selendroidServer has been launched, in example? I could not find any proper documentation for that method.

Aucun commentaire:

Enregistrer un commentaire