Re: [Watin-users] Solution for using WebBrowser control in WinForms with WatiN
Brought to you by:
jvmenen
From: Jeroen v. M. <jv...@li...> - 2010-12-16 14:10:33
|
Hi, Maybe I can fit this new class in to the BaseWithBrowserTest class. That way the class will be seen as one of the browser implementations (like IE and FireFox) and all browser generic tests will be run with this new class/browser too. Problems will be identified quickly so we at least know what stuff works and what doesn't Thanks! Jeroen 2010/12/16 Łukasz Palka <luk...@gm...> > It would be a pleasure and honor for me :) > > Keep in mind, however, that I haven't spent too much time yet to test > it. So far everything looks good. I've only added Form.Invoke call > because of cross-thread operations, so now the beginning looks like > this: > > public WebBrowserIE(WebBrowser webBrowserControl) > : base(webBrowserControl.ActiveXInstance, false) > { > InitHwnd(webBrowserControl.FindForm()); > StartDialogWatcher(); > } > > private void InitHwnd(System.Windows.Forms.Form form) > { > if (form.InvokeRequired) > { > form.Invoke(new Action(() => InitHwnd(form))); > } > else > { > hwnd = form.Handle; > } > } > > Also, internally WatiN uses hWnd property sometimes, so something > could go wrong or could not working. Capturing to image does not work. > Works bringing to front, resizing, changing window style (minimize, > maximize etc.). Maybe this class should be documented in code to draw > other developers attention when using it. > > Regards :) > > 2010/12/16 Jeroen van Menen <jv...@li...>: > > Hi, > > Looking at the latest code for WebBrowserIE, support for winforms > webbrowser > > control has become really simple. Great! Since many people have been > asking > > for this feature, do you mind if I add this class to WatiN? That way, > > support is out of the box and you don't have to keep writing answers on > > StackOverflow regarding this issue :-) Another big plus is that it will > > become part of the test/build cycle and so officially supported. > > Thanks in advance! > > Jeroen > > 2010/12/16 Łukasz Palka <luk...@gm...> > >> > >> I have a feeling, that many people don't know how to use WatiN with > >> WebBrowser control, so I've decided to share link here to my answers > >> on stackoverflow.com : > >> > >> > >> > http://stackoverflow.com/questions/4455607/watin-and-net-winforms-webbrowser-control-is-dialogwatcher-possible/ > >> > >> -- > >> Regards, > >> prostynick > >> > >> > >> > ------------------------------------------------------------------------------ > >> Lotusphere 2011 > >> Register now for Lotusphere 2011 and learn how > >> to connect the dots, take your collaborative environment > >> to the next level, and enter the era of Social Business. > >> http://p.sf.net/sfu/lotusphere-d2d > >> _______________________________________________ > >> Watin-users mailing list > >> Wat...@li... > >> https://lists.sourceforge.net/lists/listinfo/watin-users > >> > >> DISCLAIMER: > >> Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is > >> uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis > hebt > >> ontvangen, wordt u verzocht het te vernietigen en de afzender te > informeren. > >> Wij adviseren u om bij twijfel over de juistheid of de volledigheid van > de > >> e-mail contact met de afzender op te nemen. > >> > >> Nothing in this email shall bind LinkiT in any contract or obligation. > >> This e-mail is for the intended addressee only. If you have received it > in > >> error then please delete it and notify the sender by return e-mail. In > case > >> of doubt about correctness or completeness of this e-mail please contact > the > >> sender. > > > > > > > ------------------------------------------------------------------------------ > > Lotusphere 2011 > > Register now for Lotusphere 2011 and learn how > > to connect the dots, take your collaborative environment > > to the next level, and enter the era of Social Business. > > http://p.sf.net/sfu/lotusphere-d2d > > _______________________________________________ > > Watin-users mailing list > > Wat...@li... > > https://lists.sourceforge.net/lists/listinfo/watin-users > > > > > > > > -- > Pozdrawiam > Łukasz Palka > > > ------------------------------------------------------------------------------ > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d > _______________________________________________ > Watin-users mailing list > Wat...@li... > https://lists.sourceforge.net/lists/listinfo/watin-users > > DISCLAIMER: > Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is > uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis hebt > ontvangen, wordt u verzocht het te vernietigen en de afzender te informeren. > Wij adviseren u om bij twijfel over de juistheid of de volledigheid van de > e-mail contact met de afzender op te nemen. > > Nothing in this email shall bind LinkiT in any contract or obligation. This > e-mail is for the intended addressee only. If you have received it in error > then please delete it and notify the sender by return e-mail. In case of > doubt about correctness or completeness of this e-mail please contact the > sender. > |