watin

Is it possible to see what the response headers were after a page load using Watin

放肆的年华 提交于 2020-01-05 05:37:29
问题 Part of our testing is to check that a page is being returned in the correct format (specifically gzip) Does WATIN expose the HTTP response headers so they can be inspected? 回答1: No, WatiN doesn't expose the HTTP response headers neither Internet Explorer. It's not possible to get them using InternetExplorer interface or any of it's events. 来源: https://stackoverflow.com/questions/3758426/is-it-possible-to-see-what-the-response-headers-were-after-a-page-load-using-wat

Use WatiN for automation upload file on the website

允我心安 提交于 2020-01-05 05:32:25
问题 I need upload file on the website. But Have a problem, i can't choose file automatic in code. Always browser show me choose file window. What wrong in my code? IE ie = new IE("https://www.xxxx.com/WFrmlogin.aspx"); FileUploadDialogHandler uploadHandler = new FileUploadDialogHandler(@"D:\065-6405_URGENT.xls"); ie.WaitForComplete(); ie.TextField(Find.ById("txtUser")).TypeText("login"); ie.TextField(Find.ById("txtPassWord")).TypeText("***"); ie.Button(Find.ById("btnok")).Click(); ie

When testing with WatiN: “'DebuggerDisplayProxy()' threw an exception of type 'System.InvalidCastException'”

别说谁变了你拦得住时间么 提交于 2020-01-05 05:29:15
问题 FrameworkActionsLink = CurrentBuyerSite.BuyerWorkAreaFrame.Link(Find.ById("actions")); I have code which finds a link element by finding by ID. The HTML on the page is: <a id="actions" href="Javascript:ShowMenuItem('options','actions'); ... > I have excluded the full Javascript code in the href where you see "...". On test execution, sometimes this code works correctly, but sometimes I get the following error: 'DebuggerDisplayProxy()' threw an exception of type 'System.InvalidCastException'

SetUp method failed while running tests from teamcity

强颜欢笑 提交于 2020-01-04 06:14:16
问题 I am successfuly running tests locally via nunit. But when I try to run them through teamcity some tests are passed but some failed by 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

SetUp method failed while running tests from teamcity

无人久伴 提交于 2020-01-04 06:12:27
问题 I am successfuly running tests locally via nunit. But when I try to run them through teamcity some tests are passed but some failed by 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

Timeout problem running WatiN tests as part of TFS build

南笙酒味 提交于 2020-01-02 17:16:33
问题 I've gotten a simple WatiN web test running on my dev environment and am trying to get it working on the TFS build server. It is failing when just trying to load a page with the following exception: WatiN.Core.Exceptions.TimeoutException: Timeout while Internet Explorer busy. I've set the test timeout to 3 minutes which should be plenty. I've read that this could be caused by IE protected mode, but I'm not sure how to disable that for the TFSService account. I'm using Visual Studio/TFS 2008

Timeout problem running WatiN tests as part of TFS build

断了今生、忘了曾经 提交于 2020-01-02 17:16:33
问题 I've gotten a simple WatiN web test running on my dev environment and am trying to get it working on the TFS build server. It is failing when just trying to load a page with the following exception: WatiN.Core.Exceptions.TimeoutException: Timeout while Internet Explorer busy. I've set the test timeout to 3 minutes which should be plenty. I've read that this could be caused by IE protected mode, but I'm not sure how to disable that for the TFSService account. I'm using Visual Studio/TFS 2008

WatiN: The CurrentThread needs to have it's ApartmentState set to ApartmentState.STA to be able to automate Internet Explorer

家住魔仙堡 提交于 2020-01-01 03:53:10
问题 I am calling WatiN from a C# windows service. When I invoke WatiN it throws the following exception. The CurrentThread needs to have it's ApartmentState set to ApartmentState.STA to be able to automate Internet Explorer I have tried starting up a thread and setting the apartment state via mythread.SetApartmentState(ApartmentState.STA) but that resulted in another error Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack. I also tried

Silverlight testing: Watin vs Selenium comparison

风流意气都作罢 提交于 2019-12-31 13:28:31
问题 I was wondering how well these web test frameworks (Watin and Selenium) work for Silverlight UI testing. Have anyone tried it on a project? Are Watin or Selenium well suited for Silverlight?. 回答1: I can't talk to Watin or Selenium with Silverlight, but I have played with White, which is a layer on top of the MS Automation Framework, and I have liked what I have seen thus far: I should also add that we defer the majority of our UI behavior testing to unit tests using the MVVM pattern. It doesn

how to wait until the textbox enable in watin

我只是一个虾纸丫 提交于 2019-12-31 06:42:08
问题 i have one textbox on my page on the load event textbox is disable for 10 then its enable so how to wait for 10 sec in watin. i am try to this code IE ie = new IE("http://localhost:2034/WebForm3.aspx"); ie.ShowWindow(WatiN.Core.Native.Windows.NativeMethods.WindowShowStyle.Maximize); ie.TextField("TextBox1").TypeText("Fer"); but it gives the error that TextBox1 is disable so i want to wait for some time. so how to do this? please help me? 回答1: You can just sleep the thread for a fixed amount