Can you explain to me for understanding why is not possible to use Xamarin.UITest to click on OK button in order to close the picker after choosing values?
Because the Picker will disappear immediately when querying “OK” button to tap on, so it’s impossible to tap it.
I am working on:
- Xamarin.UITest 3.0
- iPhone's iOS 12.2
- Syncfusion 17.1.0.41
The method used to tap “OK” button: app.Tap(c => c.Text("OK"))
It's very strange because we can use Xamarin.UITest to flash "OK" button, but we cannot tap on it.
We also try another way to tap by:
- find the coordinate of OK button
- use Xamarin.UITest to TapCoordinate, but the Picker still disappear.
Thank you a lot!
Hi Hung,
We have validated your query
, While automation scripts are running ,coordinates
get tapped outside of the picker dialog window so it gets closed
automatically before the ok button is selected.
We have created a sample to solve this and please
find the sample from below link
Sample Link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/PickerAutomationSample-1136644085
In this sample, we have raised closed event to avoid
the picker get closed when tapping coordinates outside of the picker
dialog as like below code snippet
pickerControl.Closed += PickerControl_Closed; |
Please get back us, if you have any concern.
Regards,
Jeya k.
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());
Syncfusion.SfPicker.XForms.iOS .SfPickerRenderer.Init();
return base.FinishedLaunching(app, options);
} |