calabash / calabash-ios

Calabash for iOS
Other
1.81k stars 369 forks source link

Touch event sent, but nothing happens #1229

Open raffabhaktin opened 7 years ago

raffabhaktin commented 7 years ago

Hi! I'm struggling with my Calabash setup. From the console it fires correctly. Simulator running. Connection stablished. All good. Having a super simple UI with a text field and a button, I want to touch the text field, input some text, and touch the button. Simple as that.

From the console I try to touch the text field to bring the keyboard. I get a positive response from calabash that returns me results (check below), but nothing happens on the simulator side. No keyboard appears.

Any clues? Thanks.

Environment: macOS El Capitain [10.11.6 (15G31)] Xcode 8.0 [8A218a] iOS 10.0 Simulator

GEMS: ansi (1.5.0) awesome_print (1.7.0) bigdecimal (1.2.8) builder (3.2.2) bundler (1.13.6) calabash-cucumber (0.20.3) CFPropertyList (2.3.3) clipboard (1.1.1) command_runner_ng (0.1.0) cucumber (2.4.0) cucumber-core (1.5.0) cucumber-wire (0.0.1) did_you_mean (1.0.0) diff-lcs (1.2.5) edn (1.1.1) geocoder (1.4.0) gherkin (4.0.0) httpclient (2.8.2.4) i18n (0.7.0) io-console (0.4.5) json (1.8.3) minitest (5.8.5) multi_json (1.12.1) multi_test (0.1.2) net-telnet (0.1.1) power_assert (0.2.6) psych (2.1.0) rake (11.3.0, 10.5.0, 10.4.2) rdoc (4.2.1) run_loop (2.2.2) slowhandcuke (0.0.3) test-unit (3.1.5) thor (0.19.1)

`calabash-ios 0.20.3> touch("* id:'myButton'") DEBUG: Sending request to perform 'touch' with:

{ "gesture": "touch", "specifiers": { "coordinate": { "x": 384, "y": 963 } }, "options": { } }

DEBUG: HTTP: post http://127.0.0.1:27753/1.0/gesture {:retries=>100, :timeout=>10} [ [0] { "id" => "myButton", "description" => "<UIButton: 0x7fd7d0e18080; frame = (361 948; 46 30); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x600000227600>>", "label" => "Button", "frame" => { "y" => 948, "x" => 361, "width" => 46, "height" => 30 }, "accessibilityElement" => true, "value" => nil, "alpha" => 1, "enabled" => true, "visible" => 1, "selected" => false, "class" => "UIButton", "rect" => { "y" => 948, "center_x" => 384, "center_y" => 963, "x" => 361, "width" => 46, "height" => 30 } } ]`

lheluszko commented 7 years ago

Hi @raffabhaktin

Check how many elements with this id is accessible on this view - query("* id:'myButton'") Maybe there is more than one element with same id and is clicked but you do not see result.

jmoody commented 7 years ago

We think that we have reproduced this. Unfortunately, we will not have a solution in run-loop 2.2.3.

Related to:

Tests are skipping after running the first feature successfully with the connection refused error. #1211