O
Oliver
hi -
- I'm trying to write a test tool that will automatically browse web
pages, and do simple assertions etc.
I'm struggling with the Web Browser control and mshtml -
1) if I try and capture click events (or any event) - like this:
document = (mshtml.HTMLDocument) ie.Document;
mshtml.HTMLDocumentEvents2_Event eventsDoc;
eventsDoc = (mshtml.HTMLDocumentEvents2_Event) document;
eventsDoc.onclick += new
HTMLDocumentEvents2_onclickEventHandler(eventsDoc_onclick);
it works! - click events are handled. However I find that in can't
type text into the text boxes in the browser, and buttons don't
animate... hmmm
anyone got any idea what's happening? - I guessed (struggling with
documentation on all this) that I just needed to set the
eventsArgs.cancelBubble property and/or the boolean return value...
but no
in fact - the odd behaviour happens without the event firing - just
the affect of wiring it in screws things up....
2) does it sound feasible to record the sequence of a users actions -
in such a way as to play them back at leisure ? - I thought this would
be a good basis for an auto-testing tool..
thanks all,
Oliver.
- I'm trying to write a test tool that will automatically browse web
pages, and do simple assertions etc.
I'm struggling with the Web Browser control and mshtml -
1) if I try and capture click events (or any event) - like this:
document = (mshtml.HTMLDocument) ie.Document;
mshtml.HTMLDocumentEvents2_Event eventsDoc;
eventsDoc = (mshtml.HTMLDocumentEvents2_Event) document;
eventsDoc.onclick += new
HTMLDocumentEvents2_onclickEventHandler(eventsDoc_onclick);
it works! - click events are handled. However I find that in can't
type text into the text boxes in the browser, and buttons don't
animate... hmmm
anyone got any idea what's happening? - I guessed (struggling with
documentation on all this) that I just needed to set the
eventsArgs.cancelBubble property and/or the boolean return value...
but no
in fact - the odd behaviour happens without the event firing - just
the affect of wiring it in screws things up....
2) does it sound feasible to record the sequence of a users actions -
in such a way as to play them back at leisure ? - I thought this would
be a good basis for an auto-testing tool..
thanks all,
Oliver.