Comments (1)
Hi Bobbyphtr, it's impossible to proxy SwiftUI View to the testing process because it's struct, and EDOObject can only proxy runtime classes.
To make your use case work, it's better to move your GREYMatcher
generating method to the app side, and use eDO to get a proxy of your GREYMatcher. You can do this by creating a Swift classes as below:
@objcMembers
public class MyTestHelperInApp: NSObject {
dynamic required public init() {}
dynamic public func grey_swiftui_element() -> GREYMatcher {
...
}
}
Then your test can access your helper class and get the matcher there:
let matcher = GREYRemoteClassInApp(classVal: MyTestHelperInApp.self).init().grey_swiftui_element()
EarlGrey.select(withMatcher:matcher)...
This way your SwiftUI views won't be sent across the process and will be accessed only within your app-under-test.
from earlgrey.
Related Issues (20)
- Missing rounded corners
- [EarlGrey2] AppFramework does not build - 'GREYUILibUtils.h' file not found HOT 2
- Library not loaded: @rpath/AppFramework.framework/AppFramework
- [EarlGrey1] "Failed to load the test bundle" error in Xcode 14
- Failed to load module 'Helper Bundle' after running some test cases in EarlGrey2
- Blacklist UICompatibilityInputViewController from being tracked above iOS 13. HOT 1
- NSInvalidArgumentException unrecognized selector exception EarlGrey2
- How to integrate UILib (libUILib.a) into UITest/Bundle
- [EarlGrey2] Cocoapods support for MacOS Bundle (White Box Testing)
- Default example test crashes
- [EarlGrey2] Host background port not assigned. Application under test may have failed to launch with latest Cocoapods HOT 1
- Apple Watch Support HOT 2
- SwiftUI ViewRepresentable and UIViewRepresentable is not correctly placed in element hierarchy. HOT 2
- Videos/tutorials for new starters
- EarlGrey build failure
- Apple Vision Pro support
- Cannot find 'EDOHostPort' in scope HOT 2
- Earlgrey Cocoapods v2.2.2 crashes on XCode 15 HOT 3
- Version 2.2.2 fails to build in Xcode 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from earlgrey.