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);
有人能幫助我嗎?提前致謝!