我正在尝试运行对WebDriver findElements数组进行迭代的测试,但是我获得了0通过。如何循环运行此类测试? 看来它甚至都没有到达for wait循环中的“ it(title,callback)”。
testing@1.0.0 test /selenium
mocha "test/googletest.js"
0 passing (4ms)
describe("test", async function(){
this.timeout(700000);
describe("google", async () => {
await driver.manage().deleteAllCookies();
await driver.get('http://www.google.co.uk');
await driver.wait(until.elementLocated(By.css(".FPdoLc.VlcLAe")));
let inputs = await driver.findElements(By.css("input"));
for await (let ins of inputs){
let title = await ins.getAttribute("value");
it(title,async () => {
assert.equal(1,1);
})
}
})
});