我遇到了selenium脚本的问题,它自动化了一个操作场景:每个web元素都由他的id使用driver.findElement
标识。我无法识别单选按钮并且脚本向我发出错误ElementNotVisibleError:元素不可见error screenshot
这是我的代码,我收到错误
setTimeout(function()
{
driver.wait(until.elementLocated(By.id('hkitdyn5')), 6000, 'radRadioSub not located');
if (pattern.comment.length > 0)
{
driver.findElement(By.id('remarksAreaID')).sendKeys(pattern.comment);
console.log("Trying to update remarks area")
}
// Select Discard radio >> radRadioDis
console.log("Trying to click on disegard/aprove")
driver.findElement(By.id(actionToDo)).click().then(function()
{
console.log('We clicked on the element' + actionToDo);
});
// Send : >> btnSolveTaskToolbar
driver.findElement(By.id('btnSolveTaskToolbar')).click().then(function()
{
console.log('We clicked on the element btnSolveTaskToolbar');
});
},10000);
有人能帮助我吗?提前致谢