locked
How to manipulate data from my UI test environment? RRS feed

  • Question

  • User254143 posted

    First of all, a sincere greeting to the members of this forum. I am currently testing an application and created two test projects:

    The first one is focuses on the app logic I have called AppName.Tests. While the second one is focuses on the user interface, I have called this AppName.UITests.

    I would like to know if I can go directly to the components to test them, I would like to invoke them and pass them a list or any type of binding information to a property. Example UserDialogs.ActionSheet(title, cancel, buttons);

    Is it possible using Xamarin.UITest?

    Monday, January 20, 2020 5:46 PM

All replies

  • User369979 posted

    I would like to know if I can go directly to the components to test them Use app.Query to retrieve elements. Then we could access its property like Text. If you want to test click event of button we could use Tap: https://docs.microsoft.com/zh-cn/dotnet/api/xamarin.uitest.iapp.tap?view=xamarin-uitest-sdk But I think UserDialogs.ActionSheet(title, cancel, buttons); this should be initialized in Forms and we could fire button's click event to show it up.

    Tuesday, January 21, 2020 9:24 AM
  • User254143 posted

    Let me explain myself better, I already know how to use the tap and the query, but my application is something big and I don't want to wait for some windows to run the tests, instead I would like to invoke some public methods within my shared project and invoke them so that Fill in the test lists that I already have predefined.

    Tuesday, January 21, 2020 4:28 PM
  • User369979 posted

    If you want to test some certain pages we have to write down the logic code in the Forms project. Navigate to them directly from the main page then you could skip some unnecessary pages. I think we should start with the basic projects instead of the test projects.

    Wednesday, January 22, 2020 9:56 AM