I'm trying to loop through all the documents as the page is dynamic. This is for hotmail because the message goes to spam folder.
This gives me an error at Document doc = docCol.GetByNumber(counter);
Code exception: Object reference not set to an instance of an object
I've been trying to debug by myself but there doesn't seem to be an easy way to see what documents are on the page. Is there a way to represent the collection of documents in the tab in string format?
Thanks,
Код:
DocumentCollection docCol = tb.AllDocuments;
he = null;
int counter = 0;
while((he.IsVoid || he.IsNull) && counter < docCol.Count){
Document doc = docCol.GetByNumber(counter);
he = doc.FindElementById("folderListControlUl").FindChildByAttribute("span", "OuterText", "Junk", "regex", 0);
if(he.IsVoid){
he = doc.FindElementById("folderListControlUl").FindChildByAttribute("a", "OuterText", "Junk", "regex", 0);
}else if(he.IsVoid){
he = doc.FindElementByTag("form", -1).FindChildByAttribute("a", "OuterText", "Junk", "regex", 0);
}
counter++;
}
he.RiseEvent("click", true);
Code exception: Object reference not set to an instance of an object
I've been trying to debug by myself but there doesn't seem to be an easy way to see what documents are on the page. Is there a way to represent the collection of documents in the tab in string format?
Thanks,