我正在使用Selenium for JavaScript,并尝试创建一个包含表单输入值的数组。我知道getAttribute (和大多数其他方法一样)返回一个Promise。但是,为什么即使我调用了await,values数组中的值也是有效的呢 Then(/^The Author form should be empty$/, () => { expect(inputs.length
我正在尝试用selenium创建一个谷歌搜索程序const { Builder, By, Key, until } = require('selenium-webdriver})(); var el =等待driver.findElement(By.something(‘.’);等待driver.wait(until.elementIsVisible(el),1000);等待el.do_something();
每次都变得很困难
return true; else{ }这总是返回false,即使传递正确的值也是如此。但是,我知道name.getAttribute("value")正在返回正确的值,因为当我将结果输出到控制台时,它将显示正确的值。当我将上述方法中的option作为一个string输入时,它会给出以下错误:This condition will always return 'false' since the types