Forum Xamarin Test Cloud (Read Only)
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Setting an iOS UISwitch field

Hello,

I'm putting together a test suite for an iOS app and I'm having difficulty in setting a specific UISwitch Switch field to having the 'set' or 'on' property. I've tried to record this action through Xamarin Test Recorder which gave me this line:

app.Tap(x=>x.Class("UIView").Index(47));

But unfortunately when I run this command in Xamarin Studio, as part of my Xamarin UI Tests, this command sets another switch field, which is present on the screen, and not the switch field that I am wanting.

The switch field does have a name property of 'swchConfirm', which is indicated in the Storyboard file, but I've tried to find an element with this name the test fails, because Xamarin is unable to locate such an element.

Could someone please tell me if there is a specific way of using this iOS field?

Thanks in advance.

Sign In or Register to comment.