使用UIVeri5为SAP UI5应用程序编写测试时:如何以编程方式将一些文本输入到sap.m.Input类型的元素中?我尝试了如下方法:inputKeys
it("should enter some text", function() {
let inputElement = element(by.control({
viewName : "com.example.myapp.View.main",
controlType: "sap.m.Input"
}));
expect( inputElement ).toBeDefined(); // is okay
inputElement.sendKeys("Some Text"); // fails!
// ...
});
找到了元素,但语句inputElement.sendKeys("Some Text")
失败并出现以下错误:
Control Element sap.m.Input#__xmlview0--myInput has no dom representation
我在 Protractor 的ElementFinder中找不到任何其他似乎适合实现此目的的方法。