cucumber test claims accessibility is off when it is actually active

238 views
Skip to first unread message

Rob Serafini

unread,
Sep 15, 2011, 2:52:10 PM9/15/11
to Frank
I am using iOS5 (xcode_4.2_and_ios_5_sdk_beta_7_for_lion).

I built my Frankified app and tried to run the included
my_first.feature. The iOS simulator comes up and launches the app, and
when I request the symbiote page (http://localhost:37265/
accessibility_check) I get back the json
{"accessibility_enabled":"true"}. Otherwise the symbiote page seems to
be working as expected.

When I try to run the cucumber test I get back:


$ cucumber
Feature:
As an iOS developer
I want to have a sample feature file
So I can see what my next step is in the wonderful world of Frank/
Cucumber testing

Scenario: # features/
my_first.feature:6
Rotating the simulator for demonstration purposes
71:158: execution error: System Events got an error: Access for
assistive devices is disabled. (-1728)
/usr/local/rvm/gems/ree-1.8.6-p20090610/gems/sim_launcher-0.3.3/lib/
sim_launcher/client.rb:47: warning: parenthesize argument(s) for
future version

PING FAILED!
FRANK! Given I launch the app #
features/step_definitions/launch_steps.rb:1

71:165: execution error: System Events got an error: Access for
assistive devices is disabled. (-1728)
Given the device is in landscape orientation # frank-
cucumber-0.7.4/lib/frank-cucumber/core_frank_steps.rb:134
expected orientation to be landscape after rotating left, but it
is (RuntimeError)
features/my_first.feature:9:in `Given the device is in landscape
orientation'
Given the device is in portrait orientation # frank-
cucumber-0.7.4/lib/frank-cucumber/core_frank_steps.rb:148
Given the device is in landscape orientation # frank-
cucumber-0.7.4/lib/frank-cucumber/core_frank_steps.rb:134
Given the device is in portrait orientation # frank-
cucumber-0.7.4/lib/frank-cucumber/core_frank_steps.rb:148

Failing Scenarios:
cucumber features/my_first.feature:6 # Scenario:
Rotating the simulator for demonstration purposes

1 scenario (1 failed)
5 steps (1 failed, 3 skipped, 1 passed)
0m4.063s


Access for assistive devices is definitely enabled. Any ideas?

Pete Hodgson

unread,
Sep 15, 2011, 3:49:33 PM9/15/11
to Frank
Hi Rob,

As well as enabling accessibility in the Simulator, you also need to
enable it on the host machine - the one running the simulator. We need
it turned on to automate stuff like rotating the device. Go to System
Preferences, select Universal Access, and check “Enable access for
assistive devices”. It would be good to have a more descriptive error
message for this, like we have when accessibility isn't turned on in
the Simulator.

Cheers,
Pete

Rodney Degracia

unread,
Sep 15, 2011, 3:49:51 PM9/15/11
to frank-...@googlegroups.com

Rob,

The error message suggests that Accessibility is not enabled on the Simulator.

Make sure that Accessibility is enabled.

Rodney

Rob Serafini

unread,
Sep 15, 2011, 6:22:58 PM9/15/11
to Frank
That was it. Working great now.

Thanks!
Reply all
Reply to author
Forward
0 new messages