Cannot find in scope error
Nobody has claimed this yet.
- Dominant language
- Objective-C
- Stars
- 5.7k
- Forks
- 737
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 5
Description
I followed the tutorial to setup Earlgrey in Xcode, things seems to be fine until I pasted the `Earlgrey.swift` and tried to run the sample code, Xcode threw the error of `Cannot find in scope error` for all the lines of code in the `Earlgrey.swift` ascwell for the sample code I tried running.
Please, what's the way forward. Thanks.
```
Swift Compiler Error Group
Cannot find 'grey_keyWindow' in scope
Cannot find 'grey_tap' in scope
Cannot find 'grey_sufficientlyVisible' in scope
```
The simple test code
```
func testExample() throws {
// UI tests must launch the application that they test.
let app = XCUIApplication()
app.launch()
EarlGrey.selectElement(with: grey_keyWindow()).perform(grey_tap())
.assert(grey_sufficientlyVisible())
// Use recording to get started writing UI tests.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
```

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the tutorial setup in Xcode, the pasted Earlgrey.swift file, and the sample UI test, then reproduce the reported compiler errors for grey_keyWindow, grey_tap, and grey_sufficientlyVisible. Done means the sample compiles and runs without the cannot-find-in-scope errors; the issue names no specific repository tests or additional files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, objective-c, swift
- Domain
- mobile, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100