I’ve been working with sending and receiving email through various web-mail clients using WatiN, I’ve got logging in, writing and sending emails working perfectly, however I am having issues opening specific emails.
Each email I send has a specific id codein the subject, but I can’t work out how to tell WatiN to actually click the specific email. I would of thought it would be something like:
ie.Link(Find.ByText("UN1QU3_1D")).Click();
But due to how Gmail and Live set up their display this doesn’t seem to work…
Also, a slightly simpler question, is there a way of preventing WatiN closing the browser once it has finished with it?
Does anyone have any bright ideas?
Many thanks.
Since all gmail message titles are actually in spans not links, I think this will work:
Also, as far as I remember, WatiN won’t close a browser unless you specifically closed them, like:
UPDATE:
Finally it worked for me 😀 Span ieFramesSpan = ie.Frames[3].Span( delegate(Span s) { return s.InnerHtml==null? false: s.InnerHtml.Contains(“UN1QU3_1D”); }); ieFramesSpan.MouseDown();