[英]how can I select the values Kendo MultiselectTextBox in a protractor test
这是一个示例工作测试套件,演示了如何从 Kendo 下拉列表中选择一个元素 - 在这种情况下是“低俗小说”。 然后,您可以扩展示例以在您的用例中工作:
"use strict";
describe("Kendo Multi-Select", function () {
beforeEach(function () {
browser.ignoreSynchronization = true;
browser.get("http://demos.telerik.com/kendo-ui/multiselect/api");
});
it("should select a movie", function () {
// click the input to trigger the dropdown
var movieInput = $("input[aria-owns*=movies_taglist]");
movieInput.click();
// filter an item from the dropdown
var movieToSelect = $$("div#movies-list li.k-item").filter(function (movie) {
return movie.getText().then(function (movieText) {
return movieText === "Pulp Fiction";
})
}).first();
// move to the element and click
browser.actions().mouseMove(movieToSelect).click().perform();
// expectations
});
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.