47

I am trying to use UIAutomation for testing an iOS 8 Today extension widget. I can change the target to the extension, launch it, but then unable to do anything after that.

Has anyone had any success in using UIAutomation with the extensions?

nairboon
  • 678
  • 5
  • 15
Rohit Gupta
  • 757
  • 4
  • 7
  • Additionally, there seems no way at all to interact with the notification center using UIAutomation. – Koraktor Nov 01 '14 at 11:57
  • Didn't they explicitly change UIAutomation to prevent the use of the device outside of the scope of the app? – Braains Nov 21 '14 at 14:46

1 Answers1

1

I hope I have the right end of the stick on this one.

I think you want to create a set of UI Tests which run like you can do with a normal application.

I found that I was not able to create a specific UI Tests target to then set the target application as WidgetExtension, as you would normally.

However I was able to set the WidgetExtension target to build and run onto a device (>= iOS 14) then within my UI Tests, I was able to record some steps which would allow me to write a clearer UI Test (place the cursor inside a test function to use record, you might already know this).

enter image description here

The tricky bit would be keeping the WidgetExtension target up-to-date onto the testing simulator to run your automated tests.

Ahmad MOUSSA
  • 2,729
  • 19
  • 31
will
  • 944
  • 9
  • 18