• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UIAutomation, cannot tap UIImagePickerController Choose button
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UIAutomation, cannot tap UIImagePickerController Choose button


  • Subject: UIAutomation, cannot tap UIImagePickerController Choose button
  • From: Juan Felipe Alvarez Saldarriaga <email@hidden>
  • Date: Mon, 05 Jan 2015 21:26:46 -0500

Hi,

I’m trying to make some test with UIAutomation, basically, I select an image from the camera roll, UIImagePickerController allowsEditing property is set to YES. When I try to tap the “Choose” button I got this error:

	Script threw an uncaught JavaScript error: target.frontMostApp().windows()[0].buttons()[2] could not be tapped…

Looking at the view hierarchy of UIImagePickerController here’s what I got:

	target.frontMostApp().windows()[0].logElementTree();

	UIAWindow: rect:{{0, 0}, {320, 568}}
		UIANavigationBar: name:Moments rect:{{-320, 0}, {320, 44}}
		UIACollectionView: value:page 1 of 1 rect:{{-96, 0}, {320, 568}}
		UIAImage: name:UINavigationVerticalColumnShadow.png rect:{{-9, 0}, {9, 568}}
		UIAScrollView: rect:{{0, 0}, {320, 568}}
		UIAButton: name:Cancel rect:{{13, 514}, {56, 34}}
		UIAButton: rect:{{145, 515}, {30, 34}}
		UIAButton: name:Choose rect:{{244, 514}, {63, 34}}

So I access the “Choose” button this way: target.frontMostApp().windows()[0].buttons()[2] and log the view hierarchy:

	target.frontMostApp().windows()[0].buttons()[2].logElementTree();

	UIAButton: name:Choose rect:{{244, 514}, {63, 34}}

So, definitely is not nil, but when I tap it, I got the error above.

	Script threw an uncaught JavaScript error: target.frontMostApp().windows()[0].buttons()[2] could not be tapped…

Somebody can help me?, UIAutomation is so obscure.

Thank you.

--
Juan Felipe Alvarez Saldarriaga
http://juan.im
Twitter: @nebiros
Google Talk: email@hidden
Skype: jfasaldarriaga

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: Re: Blurry is the New Sharp
  • Next by Date: Re: Blurry is the New Sharp
  • Previous by thread: Re: NSVisualEffectView & NSVisualEffectBlendingModeBehindWindow & transparency
  • Next by thread: NSCollectionView.selectionIndexes goes wrong
  • Index(es):
    • Date
    • Thread