我想知道 Karate 框架是否可以使用 Angular 特定的定位器来支持 Angular JS 应用程序。
答案 0 :(得分:0)
Karate 为您提供了针对 HTML DOM 运行 JS 的简单方法,这正是您所需要的。
这是一个例子:https://stackoverflow.com/a/67629911/143475
另见:https://stackoverflow.com/a/66900081/143475
* def filter = function(x){ x.text.contains('Unique Identifier') }
* def list = locateAll('.grand-parent-class', filter)
* list[0].parent.children[4].click()
您应该能够轻松编写一个可重用的函数,将特定于角度的定位器转换为实际元素。一定要回馈您的发现,以帮助他人。