watin

disable IE visibility while using WatiN

為{幸葍}努か 提交于 2019-12-29 09:27:10
问题 I use watin, because I need to open some websites in the background for which the user needs to support Javascript. I don't know if WatiN is the best for this job, but at the moment it takes very long until Internet Explorer gets visible. I need to disable to popping up of Internet Explorer while using WatiN. User doesn't need to see the opening of sites. Is it possible while using WatiN to visit a website without showing it the user or should I use another alternative which supports JS on

WatiN FireEvent not passing event properties in FireFox

余生长醉 提交于 2019-12-29 08:15:27
问题 This had been logged as a bug in sourceforge though now deleted. I'm using FireFox 3.6 with associated jssh. I can see in Firebug that the Event Properties are not being set. I'm trying to drag and drop with code below var mouseDownEvent = new NameValueCollection {{"button", "1"}, {"clientX", "0"}, {"clientY", "0"}}; firstStoryRow.FireEventNoWait("onmousedown", mouseDownEvent); There are workarounds for passing these properties but not they're not nice. Does anyone know if this is an genuine

WatiN and .net winforms WebBrowser control - is DialogWatcher possible?

老子叫甜甜 提交于 2019-12-29 05:35:10
问题 Our target is: Watin-enabled browser testing embedded in a .net winform. Currently, we are using a .net WebBrowser control to embed browser behavior in a winform. We are attaching WatiN to the WebBroswer control on the form with code like this ( thanks prostynick ): var thread = new Thread(() => { Settings.AutoStartDialogWatcher = false; var ie = new IE(webBrowser1.ActiveXInstance); ie.GoTo("http://www.google.com"); }); thread.SetApartmentState(ApartmentState.STA); thread.Start(); The problem

Finding the child of a parent's sibling element with WatiN

孤者浪人 提交于 2019-12-25 08:17:17
问题 The scenario that I am looking at is that we have a table with multiple columns. One of those columns has a name, another has a dropdown list. I need to manipulate the dropdown for a row that contains a particular name. I looked at the source output, and tried getting the element's grandparent (the table row) so that I could search for the list. However, there was no such search functionality when I used the parent object. It seems like there would be a lot of this kind of scenario in

Is it possible to have control on WinForm from another c# console app?

☆樱花仙子☆ 提交于 2019-12-25 07:50:23
问题 I'm 2 days old .NET C# coder trying to get control on ProjectA - WinForm from ProjectB - C# console app. Basically I'm using WatiN to automate test within WebBrowser control in ProjectA. When I run ProjectB which executes winformWithWebBrowserTest.exe, the winform with webbrowser shows up. But then it fails to access form1. How can I access the webbrowser control from ProjectB ??? Error: System.Runtime.IteropServices.InvalidComObjectException COM object that has been separated from its

Unit testing the MS AJAX Toolkit HTML editor

主宰稳场 提交于 2019-12-25 04:15:35
问题 Is it possible to unit test the MS AJAX Control Toolkit's HTML Editor? I've tried Watin, WebAii and Selenium without any success... Watin I can find the textbox related to the control but I get an exception trying to access it: using (Browser ie = new IE()) { ie.GoTo(testUri); Assert.IsTrue(ie.ContainsText("Expected text")); var textBox = ie.TextField(Find.ById(id => id.Contains("Editor"))); textBox.TypeText("testing 123"); } System.Runtime.InteropServices.COMException: Can't move focus to

How to get complete html content using WatiN properties

我只是一个虾纸丫 提交于 2019-12-25 03:58:31
问题 I am using WatiN tool in my asp.net web application. I want complete html content of the IE which I had launched. IE class in WatiN provides a property called "Html" this returns only the body content of the html source. What is the way to get Head tag content also along with it. Here is my source code: IE myIE = new IE(); myIE.GoTo("http://wsspg.dequecloud.com/worldspace/wsservice/eval/checkCompliance.jsp"); myIE.TextField(Find.ByName("txtUrl")).TypeText("http://rockycode.com/blog/watin-and

WatiN - Find HTML Table

老子叫甜甜 提交于 2019-12-24 13:26:01
问题 I´m trying to get the values of TDs inside a table using WatiN. The problem is that I´m not able to select a table by Id (because it´s missing) and three tables have the same CSS class: table class='tablePpal' width='100%' cellspacing='2' cellpadding='1' border='0' table class='tablePpal' width='100%' cellspacing='2' cellpadding='1' border='0' table class='tablePpal' width='100%' cellspacing='2' cellpadding='1' border='0' I need to select second table TDs. I tryed: Table _table = browser

Running WatiN using Scheduled task or Windows service

╄→尐↘猪︶ㄣ 提交于 2019-12-24 07:42:50
问题 My WatiN automation for doing file download is working fine when executed in command window normally. But failing with timeout exceptions or fileDownload Dialog not found exception when executed as a scheduled task. Is it possible to execute WatiN exe (with filedownload dialog handler) as a scheduled task. If NO is there any other way to execute it as a schedule task. Note: I have seen some blogs referring to running WatiN using cc.net. So, is it possible to run above scenario using cc.net

System.InvalidCastException: Specified cast is not valid

橙三吉。 提交于 2019-12-24 05:05:00
问题 Automation using WatiN is being carried out. Using couple of simultaneous threads to test the application. Few threads are failed and log report/stack trace says the following. System.InvalidCastException: Specified cast is not valid. at SHDocVw.IWebBrowser2.get_HWND() at WatiN.Core.Native.InternetExplorer.IEBrowser.get_hWnd() at WatiN.Core.Browser.get_hWnd() at WatiN.Core.DomContainer.StartDialogWatcher() at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, IDialogHandler logonDialogHandler,