473,324 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

WebBrowser Control - events etc

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.
Nov 15 '05 #1
1 1906
"Oliver" <sp*************@yahoo.com> wrote in message
news:58**************************@posting.google.c om...
I'm struggling with the Web Browser control and mshtml -

1) if I try and capture click events (or any event) - like this:
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


It's a well-known bug. The workaround is to implement HtmlDocumentEvents2 in
your application - search Google for Jim Allison's post in this newsgroup.

You might also be interested in the solutions here:

http://www.itwriting.com/htmleditor/index.php

which takes another approach to catching the events; or in fact you can
combine the two approaches.

Tim
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Noozer | last post by:
I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a few difficulties with it. Just looking for a few pointers, not whole solutions here. I've tried looking at the MSDN help files...
1
by: boxim | last post by:
Hi All, Just after some other opinions really.... We're writing this application that in places implements the WebBrowser control to make certain bits look nicer as well as make things quicker...
1
by: Tuong | last post by:
I have a situation where i have a form that contains a webbrowser control. With this I was able to implement an application that can browse websites. One particular website i visited opens up...
3
by: Newton Godoy | last post by:
Hi all, I'm having some dificulties in using the webbrowser events in a windows forms. Events like downloadcomplete, navigatecomplete etc seem not be raised at all. For testing, I have placed a...
2
by: spamlaanbroek | last post by:
The .NET WebBrowser control in the Compact Framework 2.0 is a major headache. Once it takes the focus (e.g. by the user tapping on it) it keeps it and keyboard events are not passed to the form...
7
by: Dave Booker | last post by:
I am using a WebBrowser object in my .NET 2.0 application, but it is not shown to the user. Every time a timer event triggers it to perform a m_WebBrowser.Navigate() I get that classic IE 'click'...
2
by: =?Utf-8?B?c25naWxi?= | last post by:
The WebBrowser control is described as exposing numerous public mouse events. See: http://msdn2.microsoft.com/en-us/library/ayestehw.aspx. many of the event are described as: "This event is not...
5
by: kimiraikkonen | last post by:
Hi, I couldn't find a necessary class which shows when mouse hovers on a link in Webbrowser control. Think of there's a status bar(text), when mouse comes on a link, the URL must be shown in...
2
by: Anil Gupe/keen inc. | last post by:
I used the following to create a new Web Browser Control Dim WithEvents webBrowserContent As New AxSHDocVw.AxWebBrowser It works fine for some things for example webBrowserContent.Navigate(url)...
11
by: kimiraikkonen | last post by:
Hi there, I needed to use MouseOver event on Webbrowser which is NOT provided by webbrowser control natively(what a disappointment), so i decided to go with another route to simulate this like: ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.