获取错误
在等待元素存在60000毫秒时超时。 -预期为“找到”但得到:“未找到”
在函数中使用@前缀调用元素时。
定义如下,
addAttachmentDetailsInAddFigureDialog:function(title,citation,notesForDesigner,pathToSrcFile,pathToFinishedFgr,accesibilityDescription){
//var addFigureAttachmentDialogSection=client.page.Sections().section.addFigureAttachmentDialog;
return client.perform(function(){
console.log("Adding attachment details in Add figure dialog\n");
}).page.Sections().section.addFigureAttachmentDialog.waitForElementPresent('@attachmentdialogIframeElement')
}
,调用元素为
addAttachmentDetailsInAddFigureDialog:function(title,citation,notesForDesigner,pathToSrcFile,pathToFinishedFgr,accesibilityDescription){
//var addFigureAttachmentDialogSection=client.page.Sections().section.addFigureAttachmentDialog;
return client.perform(function(){
console.log("Adding attachment details in Add figure dialog\n");
})
.waitForElementPresent(client.page.Sections().section.addFigureAttachmentDialog.elements.attachmentdialogIframeElement.selector)
}
运行时出现错误
在等待元素存在60000毫秒时超时。 -预期为“找到”但得到:“未找到”
但是如果我像下面这样调用元素,则不会出现此类错误。
auto B2 = B<int(*A)()>(&A);
}
请帮助我,如何在本节中定义的@前缀的帮助下访问元素。