jonathanpenn / AutomationExample

Sample code for how to run UI Automation from the command line.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automation doesn't seem to kick off with xcode5

prolificcoder opened this issue · comments

Though at the end I see Tests passed! notice, application is not being launched and coffee is not being clicked.

Hmm. Are you on Xcode 5 gold master? I just tried it on my machine and it ran the app and clicked the coffee cell. Did it show any other messages in the output?

Yes I am on xcode 5 GM.
There are bunch of messages before building the app.

After that I see.

** BUILD SUCCEEDED **

./unix_instruments: line 54: /dev/ptyvf: Resource busy
Tests passed!

Also BTW, were you able to run UIATarget.localTarget().logElementTree(); in
instruments? I am not able to.

On Wed, Sep 18, 2013 at 12:08 PM, Jonathan Penn notifications@github.comwrote:

Hmm. Are you on Xcode 5 gold master? I just tried it on my machine and it
ran the app and clicked the coffee cell. Did it show any other messages in
the output?


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-24690912
.

Yes, I am able to run UIATarget.localTarget().logElementTree(); in
Instruments. Not sure why you can't, but let's focus on the other problem
first.

You're falling prey to a known bug in the way instruments logs it's output.
My instruments wrapper sometimes gets stuck and holds open a PTY file that
it uses to pipe Instruments' output and grep it for error information. Try
using the ps aux | grep unix_instruments at the command line and see if
you have any lingering processes. Use the kill command to kill those
process ids. Or you can use the easy route and just restart your machine.

Let me know if that works!

On Wed, Sep 18, 2013 at 3:02 PM, prolificcoder notifications@github.comwrote:

Yes I am on xcode 5 GM.
There are bunch of messages before building the app.

After that I see.

** BUILD SUCCEEDED **

./unix_instruments: line 54: /dev/ptyvf: Resource busy
Tests passed!

Also BTW, were you able to run UIATarget.localTarget().logElementTree();
in
instruments? I am not able to.

On Wed, Sep 18, 2013 at 12:08 PM, Jonathan Penn notifications@github.comwrote:

Hmm. Are you on Xcode 5 gold master? I just tried it on my machine and
it
ran the app and clicked the coffee cell. Did it show any other messages
in
the output?


Reply to this email directly or view it on GitHub<
https://github.com/jonathanpenn/AutomationExample/issues/4#issuecomment-24690912>

.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-24694684
.

You are partially right, I restarted computer and now app is opening up but
there is a failure

2013-09-18 13:34:53.394 ScriptAgent[1104:2d07] CLTilesManagerClient:
initialize, sSharedTilesManagerClient
2013-09-18 13:34:53.396 ScriptAgent[1104:2d07] CLTilesManagerClient: init
2013-09-18 13:34:53.397 ScriptAgent[1104:2d07] CLTilesManagerClient:
reconnecting, 0xa127950
2013-09-18 20:34:54 +0000 Debug:
target.frontMostApp().mainWindow().tableViews()[0].cells()["coffee"].tap()
2013-09-18 20:34:54 +0000 Error: Expected to see 'coffee'
Instruments Trace Complete (Duration : 10.380440s; Output :
/Users/malugus/code/AutomationExample/automation_results/trace.trace)

On Wed, Sep 18, 2013 at 1:17 PM, Jonathan Penn notifications@github.comwrote:

Yes, I am able to run UIATarget.localTarget().logElementTree(); in
Instruments. Not sure why you can't, but let's focus on the other problem
first.

You're falling prey to a known bug in the way instruments logs it's
output.
My instruments wrapper sometimes gets stuck and holds open a PTY file that
it uses to pipe Instruments' output and grep it for error information. Try
using the ps aux | grep unix_instruments at the command line and see if
you have any lingering processes. Use the kill command to kill those
process ids. Or you can use the easy route and just restart your machine.

Let me know if that works!

On Wed, Sep 18, 2013 at 3:02 PM, prolificcoder notifications@github.comwrote:

Yes I am on xcode 5 GM.
There are bunch of messages before building the app.

After that I see.

** BUILD SUCCEEDED **

./unix_instruments: line 54: /dev/ptyvf: Resource busy
Tests passed!

Also BTW, were you able to run UIATarget.localTarget().logElementTree();
in
instruments? I am not able to.

On Wed, Sep 18, 2013 at 12:08 PM, Jonathan Penn <
notifications@github.com>wrote:

Hmm. Are you on Xcode 5 gold master? I just tried it on my machine and
it
ran the app and clicked the coffee cell. Did it show any other
messages
in
the output?


Reply to this email directly or view it on GitHub<

https://github.com/jonathanpenn/AutomationExample/issues/4#issuecomment-24690912>

.


Reply to this email directly or view it on GitHub<
https://github.com/jonathanpenn/AutomationExample/issues/4#issuecomment-24694684>

.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-24695786
.

Ah, figured it out. iOS 7 changed how the elements were represented on the detail screen. Made a quick change and pushed to master. Reopen the issue if it still doesn't work.

Thanks!