Forum Discussion
Kanika wrote:For Example - I have to fill a questionnaire having 10 questions and out of which one question also contains image which by chance fail to load during loading of questionnaire questionnaire. How can I check this scenario and can capture error image?
Try:
Log.Picture (obj.Picture(), "image");
Of course obj needs to be set. I've used this while writing code to find an object with XPath:
var obj = page.FindChildByXPath("//table[@id='grdCribPrivileges_DXMainTable']//td[text()='" + Privileges[i] + "']/parent::node()/td[@onclick]", true);
Thanks for the reply. When I am running my script, "Has Picture" column capturing pictures of all actions performed . No matter whether it is pass or fail . I think Log. Picture() also post picture in "Has Picture" column. I dont want pictures of pass scenario and only want pictures of failed scenario . It would be better if you able to tell me how to handle failed scenario (effective way or good practice ) also with there screens.