-1
我在使用夜間測試進行測試時遇到以下錯誤。無法使用其編號找到夜間元素
預期元素是可見的 - 元素沒有被發現 - 預計「看得見」,但有「未找到」
我有以下兩個文件: -
頁的對象模型(simpleLogin.js)
module.exports = {
\t url: 'http://google.com',
\t sections :{
\t \t google: {
\t \t selector:'div#fkbx',
\t \t elements: {
\t \t \t searchBar :{
\t \t \t \t selector : 'input[type=text]'
\t \t \t },
\t \t \t
\t \t \t searchButton :{
\t \t \t \t selector : 'button[name=btnG]'
\t \t \t },
\t \t }
\t \t }
\t }
};
測試JS
module.exports = {
'Test': function (client) {
var homepage = client.page.simpleLogin();
\t homepage.navigate()
\t homepage.expect.section('@google').to.be.visible;
var googleSection = homepage.section.google;
\t client.end();
}
};
任何人可以幫助我解決這個問題?