HttpWatch 8.5 Supports Firefox 15 and SPDY Version 3

calendarSeptember 3, 2012 in Firefox , HttpWatch , SPDY

HttpWatch has been updated to support Firefox 15 and add some new features:

SPDY Version 3 is an updated version of the SPDY protocol and includes some performance related changes such as improved header compression. These changes have been included in Firefox 15 but are not enabled by default. To try out SPDY version 3 you need to enable the network.http.spdy.enabled.v3 setting in about:config:

There’s also a new SPDY Version column that you can add in HttpWatch 8.5 to show which version of the protocol is being used. Here’s a screen shot from HttpWatch looking at the HTTPS version of wordpress.com. You can see that wordpress uses version 2 of the SPDY protocol but the Google resources use SPDY version 3:

 

 

HttpWatch 8.4: Supports Firefox 14 and Selenium

calendarJuly 17, 2012 in Firefox , HttpWatch , Internet Explorer

The latest update to HttpWatch adds support for Firefox 14 and includes a new AttachByTitle method on the Controller automation class:

Previously, it wasn’t possible to attach HttpWatch to instance of IE created by the Selenium browser automation framework because Selenium doesn’t provide access to the IE’s IWebBrowser2 interface. The new AttachByTitle method makes it possible to attach HttpWatch to any instance of IE or Firefox so long as the page has a unique title.

For example, here’s the sample code included with HttpWatch 8.4 that demonstrates how to use a unique page title with Selenium:

// Use Selenium to start IE
InternetExplorerDriver driver = new InternetExplorerDriver( pathContainingIEDriverServer);
 
// Set a unique initial page title so that HttpWatch can attach to it
string uniqueTitle = Guid.NewGuid().ToString();
IJavaScriptExecutor js = driver as IJavaScriptExecutor;
js.ExecuteScript("document.title = '" + uniqueTitle + "';");
 
// Attach HttpWatch to the instance of IE created through Selenium
Plugin plugin = control.AttachByTitle(uniqueTitle);
 
driver.Navigate().GoToUrl(url);

If you wanted to use Firefox, Selenium and HttpWatch together the only change required is the use of the FirefoxDriver class instead of the InternetExplorerDriver:

// Need to base Selenium profile on an existing Firefox profile that has HttpWatch enabled
FirefoxProfile defaultProfile = (new FirefoxProfileManager()).GetProfile("default");
IWebDriver driver = new FirefoxDriver(defaultProfile);
 
// Set a unique initial page title so that HttpWatch can attach to it
string uniqueTitle = Guid.NewGuid().ToString();
IJavaScriptExecutor js = driver as IJavaScriptExecutor;
js.ExecuteScript("document.title = '" + uniqueTitle + "';");
 
// Attach HttpWatch to the instance of Firefox created through Selenium
Plugin plugin = control.AttachByTitle(uniqueTitle);
 
driver.Navigate().GoToUrl(url);

You can find these sample programs in the HttpWatch program folder after you install version 8.4:

 

Using HttpWatch and WatiN 2.1

calendarJune 25, 2012 in Automation , C# , HttpWatch , Internet Explorer

In a previous post we described how to interact with a web page using WatiN 1.3 while recording HTTP/HTTPS traffic in HttpWatch. It was a popular post, used by many customers to build automated web page tests that used HttpWatch to provide performance metrics, check for HTTP level errors and to look for opportunities to improve performance.

Since then, WatiN 2.1 has been released providing significant improvements and the ability to interact with Firefox 3.6 as well as Internet Explorer. Unfortunately, a change in the WatiN assembly caused a type conflict with HttpWatch over the definition of IE’s IWebBrowser2 type. This could give rise to the compilation errors in a Visual Studio C# project:

error CS1758: Cannot embed interop type ‘SHDocVw.CommandStateChangeConstants’ found in both assembly ..\WatiN\bin\net20\Interop.SHDocVw.dll’ and ‘…\obj\Debug\Interop.SHDocVw.dll’. Consider setting the ‘Embed Interop Types’ property to false.

If you had marked the project to build against .Net 2.0 there isn’t even an option to set ‘Embed Interop Types’ to false.

The way to avoid this error is to delete the ‘Interop.SHDocVW’ reference that you may have added from the WatiN bin directory:

In HttpWatch 8.3.19 we’ve added a WatIN sample program and documentation to provide a starting point for using WatiN 2.1.

The sample program shows you how to fill out a simple web form:

and retrieve values from the resulting page:

There are two ways to get HttpWatch and WatiN to work on the same instance of IE. The first is to create the new instance with WatiN and then attach HttpWatch:

// Attach HttpWatch to an instance of IE created through WatiN
WatiN.Core.IE watinBrowser = new WatiN.Core.IE();
HttpWatch.Plugin plugin = control.IE.Attach((SHDocVw.IWebBrowser2)watinBrowser.InternetExplorer);

Or you can create the instance in HttpWatch and attach WatiN:

// Attach WatiN to an instance of IE created through HttpWatch
HttpWatch.Plugin plugin = control.IE.New();
WatiN.Core.IE watinBrowser = new WatiN.Core.IE(plugin.Container);

For more information about using WatiN with HttpWatch please take a look at the sample program that is installed with HttpWatch Basic and Professional Editions:

http://apihelp.httpwatch.com/#WatiN Form Fill Sample.html

 

 

 

 

 

Ready to get started? TRY FOR FREE Buy Now