watin

WatiN Compatibility with Windows

半城伤御伤魂 提交于 2019-12-01 16:46:43
I am running tests successfully on Windows XP but not even got a single successful build while running through Windows 2003. Any one knows whether it is compatible or not as I read on some site that WatiN is fully tested on XP and not on other Windows editions. I'd ordinarily post this as a comment on Sam's answer, but I'm trying to make a stack trace searchable, so here goes... WatiN.Core.Exceptions.IENotFoundException : Could not find an IE window matching constraint: Timeout while waiting to attach to newly created instance of IE.. Search expired after '30' seconds. at WatiN.Core.IE

WatiN Compatibility with Windows

断了今生、忘了曾经 提交于 2019-12-01 16:34:33
问题 I am running tests successfully on Windows XP but not even got a single successful build while running through Windows 2003. Any one knows whether it is compatible or not as I read on some site that WatiN is fully tested on XP and not on other Windows editions. 回答1: I'd ordinarily post this as a comment on Sam's answer, but I'm trying to make a stack trace searchable, so here goes... WatiN.Core.Exceptions.IENotFoundException : Could not find an IE window matching constraint: Timeout while

failed due to the following error: 800704a6 while trying to read data from a text file in teamcity

我的梦境 提交于 2019-12-01 13:34:03
I am running some test cases using teamcity. It is saving the data on a textfile successfully but when I try to read that data from same location it is giving the following error SetUp method failed. System.Runtime.InteropServices.COMException : Creating an instance of the COM component with CLSID {0002DF01-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 800704a6. at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, LogonDialogHandler logonDialogHandler, Boolean createInNewProcess) at WatiN.Core.IE..ctor() and replace the saved data with System.String[] . Also

How to simulate http request using WatiN with specific HTTP referrer and query string?

坚强是说给别人听的谎言 提交于 2019-12-01 13:15:10
问题 When I use WatiN to go to a specific web page, how can I fake the HTTP referrer with a query string (i.e. request is from google search with query string q=search_term)? So I can verify that the response header has the 301 redirect for specific referrer URL. I may need to use FiddlerCore to act like a middle man to set the custom referrer but I am not sure how to do that just yet. I am using ASP.NET with C#. Thanks! //WatiN Browser.GoTo(url); 回答1: I needed to do something similar to below: //

How to turn off popup blocker through code in Watin?

为君一笑 提交于 2019-12-01 11:58:49
问题 I am facing trouble in turning the popup blocker off through watin code. Could anyone please help me in knowing how to turn off the popup blocker of IE through watin? Is there any way to turn off the popup blocker of tool bars (like google, yahoo or msn) if any of them are installed in IE? Thanks for your help in advance. 回答1: You can use .NET to change the registry keys for IE. See http://support.microsoft.com/kb/843016 for more information on the specific keys. All: HKEY_LOCAL_MACHINE

Autocomplete DropDown Menu Testing using WatiN

我与影子孤独终老i 提交于 2019-12-01 09:15:16
I am using WatiN to test an autocomplete drop down. When a user types in the field after 3 characters have been entered jquery autocomplete is triggered and an un-ordered list is shown. It is mandatory for the user to select from the list. I am unable to make a selection/trigger the autocomplete from the list using WatiN. Here is some of the html the developers have used: <ul class="ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all" role="listbox" aria-activedescendant="ui-active-menuitem" style="z-index: 1; display: block; width: 275px; top: 301px; left: 262px; "> <li class=

WatiN permissions problem when eval javascript code

夙愿已清 提交于 2019-12-01 06:00:39
My environment is: WindowXP, IE8, VS2008, WatiN-2.0.20 When i try to execute the follow code: IE _browser = new IE(); _browser.GoTo(_url); _browser.Eval("alert('hello!');"); I get the following error: Message: "Access denied. (Exception of HRESULT: 0x80070005 (E_ACCESSDENIED))" Source: "Microsoft.mshtml" Partial StackTrace in WatiN.Core.Native.InternetExplorer.IEUtils.RunScript(String scriptCode, String language, IHTMLWindow2 window) in WatiN.Core.Native.InternetExplorer.IEDocument.RunScript(String scriptCode, String language) in WatiN.Core.Document.RunScript(String scriptCode, String language

Access denied error ( Visual Studio and WatiN )

最后都变了- 提交于 2019-11-30 23:46:50
I'm using the WatiN testing tool with Visual Studio 2005. When I try to select a value from my list box I am getting an "access denied" error. I have seen this a lot with select lists recently when using the WatiN 2.0 beta. Instead of using the aSelectList.Select(strText) option, it seems to work better when you do this: ie.SelectList(Find.ById("MySelect")).Option(Find.ByText("Option 1")).Select(); This can also happen when changing an ASP.NET control that cause an auto-postback. The first change will register, but the next element you try to access will throw an "Access Denied" error because

Error when accessing the Frames in Watin new version 2.1

柔情痞子 提交于 2019-11-30 23:02:49
Below error is thrown when accessing the ie.Frames in new version of Watin 2.1 Error details: COM object that has been separated from its underlying RCW cannot be used. System.Runtime.InteropServices.InvalidComObjectException: COM object that has been separated from its underlying RCW cannot be used. at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, Boolean& pfNeedsRelease) at mshtml.HTMLFrameElementClass.IHTMLElement_get_tagName() at WatiN.Core.Native.InternetExplorer.IEElement.get_TagName() at WatiN.Core.ElementTag.FromNativeElement(INativeElement nativeElement)

Browser.ExecScript() stopped working after updating windows

狂风中的少年 提交于 2019-11-30 20:31:57
I've set up a simple testbed for WatiN (ver 2.1) which reads: var browser = new IE(); browser.GoTo("http://www.google.co.il"); // webpage doesn't matter really browser.RunScript("alert(123)"); This works only if KB3025390 is not installed. Installing it breaks the above test with an UnAuthorizedAccessException which has HRESULT set to E_ACCESSDENIED. What gives? Is there any workaround? Update: Using IWebBrowser2.Navigate2 along with "javascript:console.log(123)" type of scripts works however it makes me feel uneasy using such a backchannel the scripts run through this back-channel of