support native elements on Android and Ios
complete
g
gpaneda@gmail.com
Able to identify overlay elements that are in native and overall just support native elements
Log In
M
Martin Ceska
complete
M
Martin Ceska
Hi Gerry,
This is already supported. Suitest supports native Android applications as well as native applications for iOS written in Swift or Objective-C.
I believe that this feature request is related to a support request that you have sent us earlier this month. In that particular case, it seems that you are using "raw" AlertDialog without DialogFragment. Under these circustances, there is no adjustment possible on our side that would make such dialog available for any assertions (controlling is still possible). If the AlertDialog would be created via DialogFragment, Suitest would be able to test it fully (https://developer.android.com/develop/ui/views/components/dialogs#DialogFragment).
Here is example of very simple AlertDialog that our library can handle:
public class AlertDialogFragment extends DialogFragment {
@NonNull
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(new
ContextThemeWrapper(getContext(), R.style.dialogFragmentDialog));
builder.setTitle("AndroidX Alert Dialog")
.setMessage("AlertDialog spawned within AndroidX DialogFragment")
.setNegativeButton("Close", (dialog, which) -> dialog.dismiss());
return builder.create();
}
}
Then to invoke it you can just call:
new AlertDialogFragment().show(getSupportFragmentManager(), "AlertDialogFragment");
Kind regards,
Martin