• 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
  • Resent-date: Tue, 06 Jan 2015 11:34:50 -0500
  • Resent-from: Juan Felipe Alvarez Saldarriaga <email@hidden>
  • Resent-message-id: <email@hidden>
  • Resent-to: email@hidden

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

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: launch file required for iPhone 6,6+ ?
  • Next by Date: availability question
  • Previous by thread: Re: launch file required for iPhone 6,6+ ?
  • Next by thread: availability question
  • Index(es):
    • Date
    • Thread