0
你好,我是一个新手硒,我想使用webdriver框架自动化一个场景:通过它的id找到一个web元素。在该方案的最后一步,我不能找到一个单选按钮和我的代码引发此错误Timeout Error无法找到网页元素硒
这是我的硒代码:
setTimeout(function(){
driver.wait(until.elementLocated(By.id('radRadioSub')), 24000, 'radRadioSub not located');
if (pattern.comment.length > 0) {
driver.findElement(By.name('remarksArea')).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');
});
},6000);
有人能帮助我吗?提前致谢!