ActionSheet()ではなくaccessibility_idでアクションシートの要素を操作する

UIAutomationで、actionSheetの取得は正常に実施できないので、accessibility_idによる要素取得にしたほうが良さそうだ。

alertは問題ないので、alert viewに関してはそこまで考えなくても良さそう。

例えば、以下のようにactionSheetを取得しようとすると、UIAElementNilが取得される。むむむ。。。


info: [debug] Got result from instruments: {"status":17,"value":"Cannot perform action on invalid element: UIAElementNil from target.frontMostApp().actionSheet().buttons()[\"キャンセル\"]"}

info: [debug] Responding to client with error: {"status":17,"value":{"message":"An error occurred while executing user supplied JavaScript.","origValue":"Cannot perform action on invalid element: UIAElementNil from target.frontMostApp().actionSheet().buttons()[\"キャンセル\"]"},"sessionId":"b412bcd4-d867-43df-9e3e-cafe2672ca05"}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s