问题标签 [kif-framework]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ios - KIF Test Case Crash at UIView-KIFAdditions.m class iOS
I want to write UI automation testing for one of my projects. I have did the following steps to setup the environment,
1.Create a new project (KIFDemo) with “Include Unit Tests” and “Include UI Tests”. 2.Created a Login page with “Username, Password TextFields and Login button”. Added Accessibility Label values. 3.Added KIF through Cocoa Pod like this,
target 'KIFDemo' do
Uncomment this line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
Pods for KIFDemo
target 'KIFDemoTests' do inherit! :search_paths
Pods for testing pod 'KIF', '~> 3.2.0' pod 'Specta', '~> 1.0.2' end
target 'KIFDemoUITests' do inherit! :search_paths
Pods for testing
end
end
4.Created one UITests.m (SubClass of KIFTestCase) under “KIFDemoTests” folder. I have added this “beforeAll” function and code,
- (void) beforeAll {
[tester enterText:@"user@example.com" intoViewWithAccessibilityLabel:@"UsernameTF"]; [tester enterText:@"thisismypassword" intoViewWithAccessibilityLabel:@"PasswordTF"];
[tester tapViewWithAccessibilityLabel:@"LoginButton"]; }
When I try to test this, am getting crash on following line,
// Handle touches in the normal way for other views UITouch *touch = [[UITouch alloc] initAtPoint:point inView:self]; [touch setPhaseAndUpdateTimestamp:UITouchPhaseBegan];
UIEvent *event = [self eventWithTouch:touch];
[[UIApplication sharedApplication] sendEvent:event];// Getting Thread 1: EXC_BAD_ACCESS
Can anyone please help me to fix this and test the app? I don't know what is breaking this one. Looking forward help. Thanks in advance.
Thanks, Yuvaraj M
ios - 如何找到此系统警报的 UI 视图?
Xcode 8.2 KIF 测试
我想自动化一个需要将照片保存到库的权限的绘图应用程序。
有了 KIF,我给了
但它说,未能找到可访问性元素。作为一种解决方案,我尝试使用
如何找到此系统警报的 UIView?还有其他方法可以点击此元素吗?
swift - 使用 KIF 失败一个简单的测试用例
我尝试在 swift 项目中使用 KIF。我在 iPhone 模拟器上运行测试用例。可能我没有正确设置 KIF,因为第一次使用它。我用了这本手册
在这个简单的代码中测试失败
func testSelectingOrganizerRole() {
tester().tapView(withAccessibilityLabel: "ORGANIZE")
}
故事板的初始 ViewConroller 上存在一个带有辅助功能标签“ORGANIZE”的按钮。
ios - Cocoapods ld:找不到框架 KIF - 仅在真实设备上测试时
正如标题所说,我收到以下错误:
显示最近的消息 ld: framework not found KIF
错误:无法解析“/Users/[User]/Library/Developer/Xcode/DerivedData/[App]/Build/Products/Debug-iphoneos/[App].app/PlugIns/[AppTests].xctest/”的调试映射[AppTests]":没有这样的文件或目录
奇怪的是,上述情况仅发生在真实设备上,并且仅在我测试应用程序时发生。
我使用 swift 3 和 Xcode 8,这是我的Podfile
:
ios - 如何在一个测试用例类中同时使用 KIF 和 XCTest?
我正在尝试调整此解决方案以在我的 KIF 测试类中的每次测试后重置应用程序。所以我修改了 main.m 文件并添加了
进入 Setup{} 块
然后我在模拟器上运行测试并立即在 Setup 块中捕获异常:
"NSInternalInconsistencyException", "没有通过测试配置指定目标应用程序路径:XCTestConfiguration: 0x600000141600
错误日志:
是否可以解决此错误并使其正常工作?
此外,在某些情况下,我可以同时应用 KIF 和 XCTest 的方法。那么,是否可以在一个测试用例中同时使用这些框架?
ios - 如何用 KIF 点击子元素?
我在工作中使用 KIF 框架对应用程序进行 UI 测试。其中一个屏幕在带有文本字段和按钮的单元格中输出信息,这些文本字段和按钮在每个单元格中具有相同的可访问性标签,其中一些具有动态可变的值。所以如果我使用
将点击第一个单元格中的按钮。我知道如何在确定的单元格中指定按钮,例如
那么如何使用 KIF 指定相同的方式呢?或者,它有特殊的方法?
ios - 是否可以通过 KIF 测试获得新的应用会话?
我正在尝试编写一个测试,我的下一个测试应该有一个新的应用程序会话,以便清除我在之前的测试中所做的所有活动。我想知道KIF是否有可能?
macos - osx 的 KIF 替代品
我使用KIF执行 iOS 自动化 UI 测试。不幸的是,它似乎不适用于OSX。有什么替代方案吗?
更新:
我知道苹果应用程序有一个名为 XCTest 的内置 UITest 框架,但我确实需要一个更强大且更易于使用的框架。
KIF使 UI 测试变得非常简单和有用,它提供了许多比 XCTest 简单的 API
ios - 如何在 KIF 测试中加载特定的视图控制器?
目前,我正在浏览所有视图控制器以到达特定的视图控制器进行测试。但是有没有办法可以加载一个特定的视图控制器来测试那个特定的页面?
ios - 向下滑动10次(拉动刷新)IOS KIF
我要Pull刷新10次
下面的代码一次工作