Uploading File in WatiN
How do I upload a file using WatiN? Is it possible for this file to reside on a web server (as oppose to it being on user's machine)? Code snippet is highly appreciated. Thanks. ...
How do I upload a file using WatiN? Is it possible for this file to reside on a web server (as oppose to it being on user's machine)? Code snippet is highly appreciated. Thanks. ...
It seems that the common theme among SO questions regarding WatiN have to do with actually getting the thing working and I'm no exception. I've downloaded the latest release of WatiN (2.0.20.1089) and am trying to create the NUnit / WatiN equivalent of Hello, World: using WatiN.Core; using NUnit.Framework; namespace Foo.Browser.Tests ...
From the WatiN website: // Open a new Internet Explorer window and // goto the google website. IE ie = new IE("http://www.google.com"); // Find the search text field and type Watin in it. ie.TextField(Find.ByName("q")).TypeText("WatiN"); // Click the Google search button. ie.Button(Find.ByValue("Google Search")).Click();...
Hello. I have a Watin script that logs into a site and generates a report in excel format. I'm having a really hard time saving the generated excel file. I thought my answer was using the GetActiveObject method in interop services. I don't get an error using that, but it doesn't seem to find it either. More info if it's any use: Th...
Hi I'm using 20.20.1089, and I'm getting an exception sometime while looping over like this foreach (TableRow row in table.TableRows) { for (int i = 0; i < row.OwnTableCells.Count ; ++i) { // EXCEPTION INDEX OUT OF RANGE TableCell cell = row.OwnTableCells [i]; } } Under the debugger, row.OwnTableC...
There are some buttons and menus in the application I am testing that require actual clicks to send all the information through and FireEvent style clicking does not seem to cut it. Both TestPartner and QTP can use actual clicks. TestPartner does this always (slow) and QTP does this by changing the 'ReplayType' to 2 from 1. Setting.We...
We're using WatiN to test our web portals. During the course of an E2E test, we'll occasionally see client-side script errors on the IE status bar. I'd like to chain a handler onto the script error event and record the error for later analysis and bug filing. Problem is, I don't know that there's a global script error event or how to ...
Hi, I have a web page that pops up a web page dialog. How can i handle this using WatiN ? ...
I have a web app that I'm trying to regression test with WatiN. This app uses IE's createPopup() method to provide menus - that's something I have no control over. Can I use WatiN to find and click elements within the popup? A further complication is that this app uses HTML frames and I suspect that even if, in theory, I can get to the...
Does WatiN support redirects? I'm trying to automate testing linked in integration library with WatiN. // url like "https://api.linkedin.com/uas/oauth/authorize?oauth_token=ba826cd4-644a-4709-b2de-bedb7c8fb5b4" using (var ie = new IE(authorizationUrl)) { if (ie.TextField("email-oauthAuthorizeForm").Exists && ie.TextF...
I'm trying to run Watin from within a TeamCity build, using nUnit. All tests run fine locally. I know you cannot run the full Watin tests (i.e. POST) from TeamCity if it is running as a Windows Service. You must start the build agent from a .bat file. But, I don't want to have to login to the server for it to start. I've tried getting...
How to use Right Mouse button in WatiN i tried the follwong code but didn't work.. Div div1 = pzDev.Div("AppExplorer"); Span sp1 = div1.Span(Find.ById(new Regex("cl_"))); NameValueCollection eventProperties = new NameValueCollection(); eventProperties.Add("button", "2"); sp1.FireEvent("onmouseover",eventProperties); Thread.Sleep(1000);...
It seems there is very few comparison between Selenium / WatiN and SimpleTest (which has web testing features too). I tried Selenium and found the GUI great to create tests as you can see what's going on and record without typing all commands manually. As for running the tests, Selenium is way more complex than SimpleTest. For SimpleTe...
I'm writing WatiN tests to test an Ajax web application and have come across a timing issue with Ajax requests. After an Ajax request is triggered by an action on the page, I'd like WatiN to wait until the request is complete before validating that the page was updated correctly. I have a feeling that the solution will involve eval-in...
I'm using Watin in C# console app to crawl websites, there are five console app running at the same time. The reason I partly use Watin as crawler is because a few websites use javascript(or ajax) to set page content. Following is the sample code to get a page comment count: Settings.Instance.MakeNewIeInstanceVisible = false; ...
I have a main menu window. On clicking any menu item it opens a child window using window.open? I am writing automated test script for this using Watin. How do i write Test script for the child windows. ...
I have a c# windows form project using watin. I would love to attach to the web-browser control on a form, is this possible? Is there any sample code on how to attach to the embedded web-browser control. //Looks like this only works for actual IExplorer instances. window = WatiN.Core.Browser.AttachTo<WatiN.Core.IE>(WatiN.Core.Find.ByTi...
I can't seem to get a hold of it! First attempt failed: string url = "http://jquery_ui_dialog.aspx"; IE jQueryDialog = IE.AttachTo<IE>(Find.ByUrl(url)); Second attempt failed: Process[] processes = Process.GetProcessesByName("iexplore"); foreach (Process p in processes) { if (p.MainWindowTitle == url + " - Microsoft Internet Exp...
We're having an intermittent problem that occurs when running certain integration tests on our continuious integration server.. For some reason, every now and then, we get an autocomplete popup that causes a timeout and ultimately a build failure. Is there an eloquent way to detect the popup and click through it? Thanks! ...
When can we expect WatiN supports Safari Browser too. Any idea to enhance WatiN support to Safari Browser also?? Please let us know on this ...