Unplanned
Last Updated: 28 Feb 2022 15:38 by Chris
Chris
Created on: 04 Feb 2022 20:13
Category: ComboBox
Type: Bug Report
1
ComboBox: [iOS] Cannot scroll dropdown list in UI tests

When using Xamarin.UITest for testing an app page containing RadComboBox, attempts to scroll the dropdown fail due to the popup for the dropdown disappearing whenever the popup created by RadComboBox is accessed by the testing framework other than a direct query by Id. (This includes in the Xamarin.UITest REPL with its "tree" command.) This prevents us from completing our automated test suite, which requires that we are able to compare all the items in the dropdown after various operations, as well as being able to scroll through the list to select particular items in it.

Attached is a simple reproduction, with an XF application for iOS and Android using RadComboBox, and a test library project which is able to perform scrolling of the dropdown popup on Android but not iOS.

Attached Files:
7 comments
Chris
Posted on: 28 Feb 2022 15:38
Unfortunately, we cannot avoid scrolling the dropdown for this test as we need to enumerate all the elements within the dropdown list for comparison before and after. Until this issue is resolved, it means that we need to continue with manual testing for a good number of our test cases on iOS that we are able to run automated on Android. We will have to await the fix for this issue.
ADMIN
Didi
Posted on: 28 Feb 2022 15:34

Hello Chris,

Thank you for the provided project. 

I confirm this is an issue in the ComboBox control on iOS. I have changed the bug item status to "Unplanned". Find your Telerik points updated as a small sign of gratitude for bringing this issue to our attention. I can assure you that the issue is logged in our backlog with high priority and escalated to the development team. 

We have tested the behavior with different testing frameworks and the same issue occurs. I am sorry for the inconvenience caused. I am afraid, I couldn't find a workaround for this issue. 

Possible approaches:
You can modify the test to avoid scrolling in the ComboBox popup or stop executing this test. I hope one of these suggestions could be an option for you. 

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Chris
Posted on: 22 Feb 2022 15:52

Neither IsDropDownClosedOnSelection nor ScrollDownTo work, whether or not they are used together or separately. Even with IsDropDownClosedOnSelection=false, the popup still closes whenever any kind of automation action takes place (i.e. using taps or scrolls via the Xamarin.UITest framework instead of physically tapping the device). And ScrollDownTo doesn't do the trick since it rightly considers that the last element returned when querying all the elements in the popup's list (which are only the visible elements) is already visible, leading to no scrolling behaviour.

Updated repro project included.

Attached Files:
Chris
Posted on: 22 Feb 2022 15:31
A further problem is that even using the UI test screenshot method causes the popup to disappear.
ADMIN
Didi
Posted on: 22 Feb 2022 14:43

Hello Chris,

The function of the IsDropDownClosedOnSelection  = "False" is to prevent the Combobox dropdown from closing. When you select an item it remains open. So the idea is to set IsDropDownClosedOnSelection  = "False", then open the dropdown, select the first element and then scroll down using the ScrollDownTo() method. 

I am sorry to hear that IsDropDownClosedOnSelection  = "False" wasn't of help in this case. Did you try the ScrollDownTo() method?

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Chris
Posted on: 22 Feb 2022 13:59
I tried using IsDropdownClosedOnSelection=false before filing this issue, but it didn't help. Additionally, using IsDropdownClosedOnSelection=false means having to tell the combo box to close when an item is selected in our actual app, which would lead to our tests continuing to fail since selecting the first item just to be able to scroll the list would lead the list to close. We're aware that RadPopup is used for the combo box list.

I had not gotten a chance to reply or update the repro project until now, and I should be attaching an update for the repro project shortly.
ADMIN
Didi
Posted on: 09 Feb 2022 14:22

Hi Chris,

I am sorry to hear you have came across of this issue. The DropDown used in the ComboBox is the RadPopup control. 

We have reviewed the provided project and noticed the ScrollDown() method is used. If the tap happens somehow outside of the Combo on iOS then the drop down will be closed and this is expected. Could you please verify this? 

Approach you can try in the test: 

1) Add ComboBox IsDropDownClosedOnSelection="False",

2) Then in the test select the first item and then use ScrollDownTo() method. Replace the ScrollDown with ScrollDownTo. 

Let me know whether this approach solves the issue on iOS.

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.