New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to test two application simultaneously through Selendroid? #551
Comments
Ygsh, you need to work with 2 selendroid server instances. Each of the instances would work with dedicated app. Make sure to use different ports. |
Thank you operatiay. I will try this. Best, |
Hi Operatiay, I tried to do this and also went through #106 but have come across 2nd Selenium server not coming up on my device. For the first Selendroid server I get as below: INFO: got response status code: 200 It does not proceed from here. For the 2nd Selendroid instance I am getting error as below: INFO: I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8084: Connection reset This is my code that interacts with these Selenium servers: SelendroidConfiguration config1 = new SelendroidConfiguration(); Please let me know if there are mistakes in my approach. Best, |
Hi Ygsh, You can only run one instance of Selendroid Standalone server at any instance of time. so you dont need to create two Configs. use config.addSupportedApp("test1.apk"), config.addSupportedApp("test2.apk") function to add as many AUT's you are planning to test. Create two web driver objects with same URL http://localhost:4444/wd/hub, but with two different capabilities. Use Selendroid Driver object, and use driver.backgroundApp() to move AUT to background, and use driver.resumeApp() to bring the AUT to foreground. I didnt tried this but this should work. Probably I will try this and get back to you soon. Regards, |
Hi Kamesh, Thank you for your input. I have tried this but does not seem to work. When the 2nd app is getting installed at that time I get an error saying "Device in use". Do let me know if you are able to do this. |
Hi Ygsh, This is working, I am able to switch between AUTs. Below is the sample code I used in my setup method.
In case you see any issues, restart adb server from command line. Regards, |
A while ago I verified this and in general it works. The issue is, that before #106 is not done, this is not available via selendroid-standalone. |
Thank you so much @sri096 @DominikDary. |
Hi,
I am looking to automate the testing of our product that basically has two apps that talk to each other.
I have tried to follow the example configuration provided and see if this is possible, so far I have not had success. Can you please tell me if this is possible at all?
Small snippet is below, the fist app's config launches fine, on the 2nd app, I am getting the following error.
Aug 28, 2014 3:27:38 PM io.selendroid.server.model.DeviceStore findAndroidDevice
INFO: Evaluating if this device is a match for this session: AndroidEmulator [screenSize=WQVGA432, targetPlatform=ANDROID17, serial=emulator-5554, avdName=Android4.4.2_Test]
Aug 28, 2014 3:27:38 PM io.selendroid.server.model.DeviceStore findAndroidDevice
INFO: Device is in use.
This is the command I used to launch the server with both the application provided.
java -jar selendroid-standalone-0.11.0-with-dependencies.jar -app test_android.apk -app test_android_service.apk
Thanks,
Ygsh
The text was updated successfully, but these errors were encountered: