- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我们的测试工作完美,但没有明显的原因(检查提交),UI 测试只是停止在模拟器中工作(尚未在设备上测试)。每次它需要对 UI 组件执行操作(如 tap()
或 typeText("string here")
)时,我们都会在标题中收到错误,无法获取事件应用程序列表:AX 错误 -25205
。
这是一切出错时的日志:
t = 13.57s Find: Elements matching predicate '"TextFieldUsuario" IN identifiers'
t = 13.74s Assertion Failure: UI Testing Failure - Failure getting list of active applications: AX error -25205
/Users/desenvolvimento/projetos/Mobile-iOS/Mobile-iOSUITests/SupportUITests.swift:45: error: -[Mobile_iOSUITests.LoginViewControllerUITest testLoginComSucesso] : UI Testing Failure - Failure getting list of active applications: AX error -25205
2016-07-15 09:46:42.722 XCTRunner[22227:716756] -[__NSCFString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x7f8728d66170
t = 13.74s Tear Down
/Users/desenvolvimento/projetos/Mobile-iOS/Mobile-iOSUITests/SupportUITests.swift:45: error: -[Mobile_iOSUITests.LoginViewControllerUITest testLoginComSucesso] : failed: caught "NSInvalidArgumentException", "-[__NSCFString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x7f8728d66170"
(
0 CoreFoundation 0x0000000102552d85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000101fc6deb objc_exception_throw + 48
2 CoreFoundation 0x000000010255bd3d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00000001024a1cfa ___forwarding___ + 970
4 CoreFoundation 0x00000001024a18a8 _CF_forwarding_prep_0 + 120
5 XCTest 0x0000000101a70fcb -[XCAXClient_iOS activeApplications] + 438
6 XCTest 0x0000000101a71eb9 -[XCAXClient_iOS interruptingUIElementAffectingSnapshot:] + 102
7 XCTest 0x0000000101a92ad9 -[XCUIElementQuery matchingSnapshotsHandleUIInterruption:withError:] + 180
8 XCTest 0x0000000101a83d74 __43-[XCUIElement resolveHandleUIInterruption:]_block_invoke + 238
9 XCTest 0x0000000101a63629 -[XCTestCase startActivityWithTitle:block:] + 350
10 XCTest 0x0000000101a83c79 -[XCUIElement resolveHandleUIInterruption:] + 140
11 XCTest 0x0000000101aa3d81 __63-[XCUIElement(XCUIElementEventSynthesis) _dispatchEvent:block:]_block_invoke + 82
12 XCTest 0x0000000101a63629 -[XCTestCase startActivityWithTitle:block:] + 350
13 XCTest 0x0000000101aa3d20 -[XCUIElement(XCUIElementEventSynthesis) _dispatchEvent:block:] + 405
14 XCTest 0x0000000101aa4ea7 -[XCUIElement(XCUIElementEventSynthesis) tap] + 121
15 Mobile-iOSUITests 0x0000000110d7cfca _TFC17Mobile_iOSUITests14SupportUITests13executarLoginfTCSo15XCUIApplication5loginSS5senhaSS_T_ + 1210
16 Mobile-iOSUITests 0x0000000110d7d653 _TFC17Mobile_iOSUITests14SupportUITests32performarLoginValidoComAplicacaofCSo15XCUIApplicationT_ + 627
17 Mobile-iOSUITests 0x0000000110d77d3a _TFC17Mobile_iOSUITests25LoginViewControllerUITest19testLoginComSucessofT_T_ + 138
18 Mobile-iOSUITests 0x0000000110d77d82 _TToFC17Mobile_iOSUITests25LoginViewControllerUITest19testLoginComSucessofT_T_ + 34
19 CoreFoundation 0x000000010243b5cc __invoking___ + 140
20 CoreFoundation 0x000000010243b41e -[NSInvocation invoke] + 286
21 XCTest 0x0000000101a5fef3 __24-[XCTestCase invokeTest]_block_invoke_2 + 362
22 XCTest 0x0000000101a94613 -[XCTestContext performInScope:] + 190
23 XCTest 0x0000000101a5fd78 -[XCTestCase invokeTest] + 169
24 XCTest 0x0000000101a603a2 -[XCTestCase performTest:] + 459
25 XCTest 0x0000000101a5dcf7 -[XCTestSuite performTest:] + 396
26 XCTest 0x0000000101a5dcf7 -[XCTestSuite performTest:] + 396
27 XCTest 0x0000000101a4ab10 __25-[XCTestDriver _runSuite]_block_invoke + 51
28 XCTest 0x0000000101a6bb4c -[XCTestObservationCenter _observeTestExecutionForBlock:] + 640
29 XCTest 0x0000000101a4aa55 -[XCTestDriver _runSuite] + 453
30 XCTest 0x0000000101a4b7d1 -[XCTestDriver _checkForTestManager] + 259
31 XCTest 0x0000000101a95a9a _XCTestMain + 628
32 CoreFoundation 0x00000001024782ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
33 CoreFoundation 0x000000010246df75 __CFRunLoopDoBlocks + 341
34 CoreFoundation 0x000000010246d6d2 __CFRunLoopRun + 850
35 CoreFoundation 0x000000010246d0f8 CFRunLoopRunSpecific + 488
36 GraphicsServices 0x000000010460dad2 GSEventRunModal + 161
37 UIKit 0x0000000102908f09 UIApplicationMain + 171
38 XCTRunner 0x00000001019cf8ad XCTRunner + 6317
39 libdyld.dylib 0x0000000104e2f92d start + 1
)
我发现有类似问题的人,但他们似乎都没有找到解决我们案例的方法:
结果 1:
https://forums.developer.apple.com/thread/47696
Solution: Installing El Capitan and updating Xcode; we are already in El Capitan, and our Xcode is the latest version according to the App Store app.
结果 2:
iOS UI Testing : Failure getting list of active applications: AX error -25205
Solution: None of the answers give a solution.
结果 3:
UITesting Failure getting list of active application
Solution: "Enable UI Atomation" on the device (Settings > Developer). It's already enabled in the Simulator.
我的 Xcode 版本是 7.3.1 (7D1014),OS X 版本是 10.11.4 (15E65)。
有人知道如何解决这个问题吗?也许将 El Capitan 更新到最新版本?
最佳答案
[Mobile_iOSUITests.LoginViewControllerUITest testLoginComSucesso]
似乎是真正的原因。您确定调用的方法是否正确,因为方法名称 testLoginComSucesso 中有拼写错误?
因为跟随抛出异常
[NSObject(NSObject) doesNotRecognizeSelector:]
您的 LoginViewControllerUITest 似乎无法识别该方法
关于ios - (使用 Swift 进行 UI 测试)获取事件应用程序列表失败 : AX error -25205,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38397035/
我在使用以下代码时遇到问题: function http_file_exists($url){ $f=fopen($url,"r"); if($f){ fclose($f); retu
我已经通过 Git 部署到 Azure 几个月了,没有出现重大问题,但现在我似乎遇到了一个无法克服的错误。 我创建了一个新的 Azure 网站,为正在开发的项目创建单独的预览链接。我在新站点上设置了
我已经通过flutter创建了一个App并完成了它,我想在flutter文档中阅读时进行部署。 我收到此错误: FAILURE: Build failed with an exception. * W
我在Windows 10中使用一些简单的Powershell代码遇到了这个奇怪的问题,我认为这可能是我做错了,但我不是Powershell的天才。 我有这个: $ix = [System.Net.Dn
我正在尝试使用 RapidJSON 解析从服务器接收到的数据。以下是收到的确切字符串: [ { "Node": "9478149a08f9", "Address": "172.17
我尝试为 ios 编译 OpenCV。我总是收到这些错误。我用不同版本的opencv试了一下,结果都是一样的。 我运行这个:python 平台/ios/build_framework.py ios_o
我在一台机器上做基本的发布/订阅,我的客户端是 StackExchange-Redis 的 C# 客户端,我在同一台机器上运行基于 Windows 的 Redis 服务器(服务器版本 2.8.4) 当
我有这段代码,但无法执行,请帮我解决这个问题 连接 connect_error) { die ("connection failed: " . $terhubung->connect_erro
我在 tomcat 上运行并由 maven 编译的 Web 应用程序给出了以下警告和错误。我可以在本地存储库中看到所有 JAR,但有人可以帮忙吗。 WARNING: Failed to scan JA
我正在 Windows 8 上使用 Android Studio 开发一个 android 应用程序,我正在使用一些 native 代码。突然间我无法编译我的 C 文件。当我运行 ndk-build
下面的代码对类和结构的成员进行序列化和反序列化。序列化工作正常,但我在尝试使用 oarch >> BOOST_SERIALIZATION_NVP(outObj); 反序列化时遇到了以下错误; 代码中是
如果我运行此命令“rspec ./spec/requests/api/v1/password_reset_request_spec.rb”,此文件中的所有测试都会通过。 但是,当我运行“rspec”时
我在尝试执行测试以使用 Protractor 上传文件时出错,我的代码是这个 it('it should be possible to upload a file', function() {
System.loadLibrary("nativefaceswap"); 当我运行我的应用程序时,我在 Android Studio 中发现了此类错误。在logcat中显示: java.lang.U
我希望有人能帮助我!使用任何方法或命令行的任何 SSL/HTTPS 调用均无效。 我在 Windows 10 中使用 Ubuntu Server 18.04 作为子系统。我的问题是昨天才开始出现的,因
通过删除这两个值将日期字段从 null=True 和 Blank=True 更改为 required 时,使用 db.alter 命令时遇到问题。 当以下行被注释掉时,迁移运行不会出现问题。
我第一次使用 Heroku 尝试创建应用程序(使用 SendGrid 的 Inbound Parse Webhook"和 Twilio SMS 通过电子邮件发送和接收 SMS 消息)。通过 Virtu
我正在将我的 swift 项目更新到 Xcode 7 上的 Swift 2.0。xcode 在构建项目时报告了以下错误: 命令/Applications/Xcode.app/Contents/Deve
在我的代码中,SSL 库函数 SSL_library_init() 没有按预期返回 1。我如何才能看到它返回了什么错误? 我在 SSL_library_init() 之后调用了 SSL_load_er
我正在尝试运行在以下链接中找到的答案: Asynchronously Load the Contents of a Div 但是当我这样做时,我会遇到我不太理解的错误。 我的代码: $(documen
我是一名优秀的程序员,十分优秀!