In my recent automation project, I am trying to get Bitmap stream from drawable object of the image from Android app using Xamarin UI Test.
I am using below code snippet for that:
java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();
App.Query(x => x.Class("AppCompatImageView").Id("IMAGE_ID").Invoke("getDrawable").Invoke("getBitmap").Invoke("compress", Bitmap.CompressFormat.Png, 100, out));
But Xamarin UITest throws runtime error on 2nd line and says unable to load jvm.dll file.
I have already set JAVA_HOME, PATH with JDK, also set JDK path in Visual Studio with Xamarin framework.
But still it throws error.
Anyone has any idea about this, how I can reslove this error?
Thanks.