stepToEnterText:intoViewWithAccessibilityLabel: taps middle scope button in UISearchBars #175

Closed
percysnoodle opened this Issue Nov 19, 2012 · 4 comments

Projects

None yet

3 participants

@percysnoodle
Contributor

I'm testing a screen which has a UISearchBar with three scope buttons, and whenever I use stepToEnterText:intoViewWithAccessibilityLabel: the middle scope button ends up selected. This seems to be because tappablePointInRect: is returning the centre of the view.

@bnickel
Contributor
bnickel commented Sep 11, 2013

It seems there is a lot of stuff I don't know about search bars. I'm thinking of setting up a test suite against them to tackle these kinds of issues.

@bnickel bnickel closed this Sep 11, 2013
@bnickel bnickel reopened this Sep 11, 2013
@bnickel
Contributor
bnickel commented Sep 11, 2013

Accidentally closed.

@bnickel
Contributor
bnickel commented Sep 13, 2013

Take a look at my comments on issue #257. I've created a commit to address this issue. Rather than assigning an accessibilityLabel to your search field, it would allow you to access the search field text box directly with its text:

[tester enterText:@"Hello" intoViewWithAccessibilityLabel:nil traits:UIAccessibilityTraitSearchField expecting:@"Hello"]

You can test it out with:

pod 'KIF', :git => 'https://github.com/kif-framework/KIF.git', :commit => 'accae95'
@phatmann
Contributor
phatmann commented Apr 9, 2014

Closing all KIF 1 issues as it will no longer be maintained.

@phatmann phatmann closed this Apr 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment