We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Impossible to control SfPicker by Xamarin.UITest (iOS platform)

Thread ID:

Created:

Updated:

Platform:

Replies:

145147 Jun 10,2019 08:02 AM UTC Nov 15,2019 07:02 AM UTC Xamarin.iOS 7
loading
Tags: SfPicker
hung
Asked On June 10, 2019 08:08 AM UTC

Dear Expert,

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!


Jeya Kasipandi [Syncfusion]
Replied On June 15, 2019 06:05 AM UTC

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;
        
void PickerControl_Closed(object sender, EventArgs e)
        {
            
if (!opened)
            {
                pickerControl.IsOpen = 
true;
                  
            }

        }

Please get back us, if you have any concern.

Regards,

Jeya k.

 


hung
Replied On June 24, 2019 03:56 AM UTC

Thanks @Jeya Kasipandi a lot for your explanation.
I will update you as soon as possible.

Muneesh Kumar G [Syncfusion]
Replied On June 24, 2019 12:35 PM UTC

Hi Hung, 
 
Thanks for your update and we will wait to hear from you. 
  
Thanks, 
Muneesh Kumar G. 
 


Scott Roberts
Replied On September 23, 2019 06:07 PM UTC

Hi Muneesh,

I am facing the same issue, but with a Xamarin Forms app.   I was to run your solution successfully, however I made once change to reset the opened flag otherwise the code only works successfully on the first button click and not subsequent ones:

   void Button_TouchUpInside(object sender, EventArgs e)
        {
            pickerControl.IsOpen = !pickerControl.IsOpen;
            opened = false;   // I added this line
        }

However, I am unable to get a Forms version of the app working as setting the IsOpen = true in the picker closed event having no effect (the modal still closes).   Would it be possible to provide me with a Xamarin Forms version of your solution?   

Thanks,
Todd

I am using 
- Syncfusion 17.2.0.51
-iPhone iOS Simulator 12.2
- Xamarin.Forms v4.2.0.815419


Muneesh Kumar G [Syncfusion]
Replied On September 25, 2019 09:01 AM UTC

Hi Scott,

 
Greetings from Syncfusion. 
 
We can able to reproduce the reported issue "Picker dialog get closed when the user clicks outside of the dialog after setting IsOpen to true in Xamarin.Forms iOS " and we have fixed the reported issue. Please find the patch for this issue from below location. 
 
Assemblies: 
 
Sample: 
Assembly Version: v17.2.0.51 
 
Disclaimer: 
 
Please note that we have created this patch for the version v17.2.0.51 specifically to resolve the issue reported in this. 
 
This fix will be included in our upcoming volume 3 main release which will be available on end of September 2019. 
  
Thanks,  
Muneesh Kumar G.  
 


sucharitha podduturi
Replied On November 14, 2019 12:04 PM UTC

Hi,
I have downloaded the syncfusion picker and integrated to my code its working fine on android but its not working iOS(I mean its showing a blank page).

Hemalatha Marikumar [Syncfusion]
Replied On November 15, 2019 07:02 AM UTC

Hi Sucharitha podduturi,  
 
We would like to let you know that you can resolve this as per in below code snippet 
     
Code snippet [C#]:  
   
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);  
        }  
 
 
Please let us know if you have any other concerns 
 
Regards, 
Hemalatha M. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon