<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en" xml:base="http://blog.browsermob.com/wp-atom.php">
	<title type="text">The BrowserMob Blog</title>
	<subtitle type="text">All about browsers, performance testing, and load testing</subtitle>

	<updated>2011-12-27T17:00:14Z</updated>

	<link rel="alternate" type="text/html" href="http://blog.browsermob.com" />
	<id>http://blog.browsermob.com/feed/atom/</id>
	

	<generator uri="http://wordpress.org/" version="3.1.3">WordPress</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/BrowserMob" /><feedburner:info uri="browsermob" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
		<author>
			<name>Joel Weierman</name>
					</author>
		<title type="html"><![CDATA[Recent Customer engagements &#8211; handling file uploads and streaming content]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrowserMob/~3/d4xKBuCNF9w/" />
		<id>http://blog.browsermob.com/?p=1910</id>
		<updated>2011-12-13T05:20:39Z</updated>
		<published>2011-12-13T05:20:39Z</published>
		<category scheme="http://blog.browsermob.com" term="Load Testing Tips" /><category scheme="http://blog.browsermob.com" term="file upload" /><category scheme="http://blog.browsermob.com" term="file uploads" /><category scheme="http://blog.browsermob.com" term="stream load test" /><category scheme="http://blog.browsermob.com" term="streaming content" /><category scheme="http://blog.browsermob.com" term="streaming load test" /><category scheme="http://blog.browsermob.com" term="windows media streaming" />		<summary type="html"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
Our Professional Services team has been extremely busy over the past several months helping Customers prepare for what proved to be a very busy online shopping season. I&#8217;d like to share with you a couple of unique challenges that we came across and how we were able to use the BrowserMob platform and some special <a href='http://blog.browsermob.com/2011/12/recent-customer-engagements-handling-file-uploads-and-streaming-content/'>[...]</a>]]></summary>
		<content type="html" xml:base="http://blog.browsermob.com/2011/12/recent-customer-engagements-handling-file-uploads-and-streaming-content/"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
<p>Our Professional Services team has been extremely busy over the past several months helping Customers prepare for what proved to be a very busy online shopping season. I&#8217;d like to share with you a couple of unique challenges that we came across and how we were able to use the BrowserMob platform and some special customizations in order to successfully test what normally would be impossible using just Selenium or a traditional http-based testing approach. </p>
<p><strong>File Uploads</strong></p>
<p>We worked with a large online greeting card company to completely automate the creation of a card, complete with multiple file uploads. Typically, we see file uploads implemented using a standard web form which are easy to automate with Selenium and the BrowserMob <a href="http://static.browsermob.com/api/com/browsermob/api/BrowserMob.html#filePath%28java.lang.String%29">filePath</a> directive. However, in this case, the upload used a Flash component to control the upload which then presented a native OS dialog to the user to select the file as in the screenshot below.</p>
<p><a href="http://blog.browsermob.com/wp-content/uploads/2011/12/upload-dialog-2.png"><img src="http://blog.browsermob.com/wp-content/uploads/2011/12/upload-dialog-2.png" alt="" title="upload-dialog-2" width="556" height="386" class="aligncenter size-full wp-image-1920" /></a></p>
<p>Unfortunately, these types of dialogs are not accessible by Selenium and thus require native mouse and keyboard integration as mentioned in this <a href="http://blog.browsermob.com/2009/12/flash-and-flex-automation-options-using-selenium/">this</a> earlier blog post. As the interaction was relatively simple (just select the file to be uploaded), we were able to automate this using BrowserMob&#8217;s special native keyboard and mouse utilities. </p>
<p>As a result, we were able to completely automate the creation of a card from start to finish and the Customer was subsequently able to integrate this script into their regular testing process. Please keep in mind that this type of interaction is quite brittle as it relies on specific x,y coordinates to be clicked on and can cause the script to break over time as objects are re-positioned on the site. In this case, as the interaction was relatively simple, it worked out well. For more complex interactions using Flex, we strongly recommend checking out Gorilla Logic&#8217;s solutions as mentioned in <a href="http://blog.browsermob.com/2011/08/flex-automation-using-selenium-and-flexmonkey/">this article.</a></p>
<p><strong>Streaming Media</strong></p>
<p>Another Customer came to us with a requirement to simulate a streaming media event for hundreds of users they were hosting using a Windows Media infrastructure. We were able to customize the boot-up process of our standard load testing agents and install the Mplayer plugin for Firefox which allowed us to stream the content across hundreds of browser and multiple locations. The Customer was then able to diagnose performance issues and bottlenecks in advance of the actual live event, saving them a lot of time and effort in the process. </p>
<p>During this engagement, we also used a special statistical sampling technique to verify that the content was playing as expected. In the script, we purposely threw an error, approximately 5% of the time which then took a screenshot and video of the transaction which we were able to review in real-time along with the Customer&#8217;s team. The relevant script snippet to accomplish this is included below:</p>
<pre>
function randomid(minVal,maxVal)
{
  var randVal = minVal+(Math.random()*(1+maxVal-minVal));
  return Math.floor(randVal);
}

if (!browserMob.isValidation()) {
    	var id = randomid(1,1000000000);
    	//randomly take a screenshot 5% of the time
    	var shot = randomid(1,20);
    	if (shot == 5) {
		throw("Catch body broken: IOException " + "user id " + userid + "-" + id + " " + new Date().toString());
        }
</pre>
<p>What type of special testing requirements do you have that are complex and challenging? Contact us and let us know, as we can help you come up with a solution!</p>
]]></content>
		<link rel="replies" type="text/html" href="http://blog.browsermob.com/2011/12/recent-customer-engagements-handling-file-uploads-and-streaming-content/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://blog.browsermob.com/2011/12/recent-customer-engagements-handling-file-uploads-and-streaming-content/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://blog.browsermob.com/2011/12/recent-customer-engagements-handling-file-uploads-and-streaming-content/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Connie</name>
					</author>
		<title type="html"><![CDATA[Tip &amp; Trick: Schedule your load test for up to 60 minutes]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrowserMob/~3/aq2EO36AWpA/" />
		<id>http://blog.browsermob.com/?p=1899</id>
		<updated>2011-11-29T23:31:43Z</updated>
		<published>2011-11-29T23:30:43Z</published>
		<category scheme="http://blog.browsermob.com" term="Load Testing Tips" />		<summary type="html"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
Consider scheduling your load tests for up to 60 minutes. You can always stop the test earlier.  By scheduling it for 60 minutes, you retain the option to run the test longer or even pause/resume the test, effectively getting a second test for free. The cost of a shorter test, i.e. 5, 10, or 15 <a href='http://blog.browsermob.com/2011/11/tip-trick-schedule-your-load-test-for-up-to-60-minutes/'>[...]</a>]]></summary>
		<content type="html" xml:base="http://blog.browsermob.com/2011/11/tip-trick-schedule-your-load-test-for-up-to-60-minutes/"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
<p>Consider scheduling your load tests for up to 60 minutes. You can always stop the test earlier.  By scheduling it for 60 minutes, you retain the option to run the test longer or even pause/resume the test, effectively getting a second test for free. The cost of a shorter test, i.e. 5, 10, or 15 minutes, is the same as a 60 minute test, so there&#8217;s really nothing to loose.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://blog.browsermob.com/2011/11/tip-trick-schedule-your-load-test-for-up-to-60-minutes/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://blog.browsermob.com/2011/11/tip-trick-schedule-your-load-test-for-up-to-60-minutes/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://blog.browsermob.com/2011/11/tip-trick-schedule-your-load-test-for-up-to-60-minutes/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>adam</name>
					</author>
		<title type="html"><![CDATA[Repost: Straight From the Horse’s Mouth: Load Testing Best Practices from Our Customers]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrowserMob/~3/7jBcOnxcuU0/" />
		<id>http://blog.browsermob.com/?p=1885</id>
		<updated>2011-11-14T15:25:58Z</updated>
		<published>2011-11-14T14:00:10Z</published>
		<category scheme="http://blog.browsermob.com" term="Load Testing" /><category scheme="http://blog.browsermob.com" term="BrowserMob" /><category scheme="http://blog.browsermob.com" term="load testing best practices" /><category scheme="http://blog.browsermob.com" term="Performance" /><category scheme="http://blog.browsermob.com" term="Webmetrics" />		<summary type="html"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
As you’ve likely seen, we pulled together a comprehensive list of load testing best practices for you to visit, and revisit, at your convenience to help you maintain high performance websites and applications that keep your customers happy. As helpful as we hope these guidelines are, we know sometimes our readers want to hear how <a href='http://blog.browsermob.com/2011/11/browsermob-customers-best-practices-from-our-customers/'>[...]</a>]]></summary>
		<content type="html" xml:base="http://blog.browsermob.com/2011/11/browsermob-customers-best-practices-from-our-customers/"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
<p>As you’ve likely seen, we pulled together a <a href="http://blog.webmetrics.com/tag/load-testing-best-practices/">comprehensive list of load testing best practices</a> for you to visit, and revisit, at your convenience to help you maintain high performance websites and applications that keep your customers happy.</p>
<p>As helpful as we hope these guidelines are, we know sometimes our readers want to hear how <a href="http://www.webmetrics.com/load-testing-services/overview">load testing</a> works from the end users themselves. We’ve compiled a few best practices that have come right out of the mouths of customers using our <a href="http://www.webmetrics.com/load-testing-services/overview">load testing services</a>:</p>
<p><strong>Test different types of traffic at different times of the day.</strong></p>
<p>“We started by using a model of expected user behavior—consumers, manufacturers, and retailers—and testing features individually for each type of traffic. We see higher traffic at certain times of the day, so that was a factor too. We tested lots and lots of scenarios and finally, to be really sure, ran a ‘perfect storm’ scenario with traffic spikes from all our users.” – <em>Dave Cumberland, VP of engineering, </em><a href="http://ecommerce.shopatron.com/"><em>Shopatron</em></a><em></em></p>
<p><strong>Test when you expect hikes in traffic.</strong></p>
<p>“We had a good handle on the size and scope of the stress tests to run… It took a couple of days to build the scripts and subsequently each test iteration was completed within a single day. We were able to demonstrate that the platform could easily handle the expected load over the holiday season after just one iteration. We plan to execute additional iterations after significant code changes or in anticipation of events that will impact system load.” – <em>Steve Romney, CTO, </em><a href="http://www.shutl.co.uk/"><em>Shutl</em></a></p>
<p><strong>Replicate the true user experience.</strong><br />
““First, we tested what it’s like when people log in [to our online auction site]. Then we replicated heavy bidding, with bids coming every 15 seconds. Finally, they tested the refresh process, where bidders get real-time updates. This allowed us to pinpoint what to expect during peak loads.” <em>– Brian Ellis, Director of IT, </em><a href="http://www.taylorandmartin.com/"><em>Taylor and Martin</em></a><em></em></p>
<p>For more information on how we’ve helped our customers and what they have to say about our load testing services, take a look at our case studies <a href="http://www.webmetrics.com/resources/case-studies">here</a>.</p>
<p>Do you have any best practices to share from your own load testing experiences?</p>
]]></content>
		<link rel="replies" type="text/html" href="http://blog.browsermob.com/2011/11/browsermob-customers-best-practices-from-our-customers/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://blog.browsermob.com/2011/11/browsermob-customers-best-practices-from-our-customers/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://blog.browsermob.com/2011/11/browsermob-customers-best-practices-from-our-customers/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>MarkW</name>
					</author>
		<title type="html"><![CDATA[Firefox 7 support]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrowserMob/~3/1BN8Lkt3dII/" />
		<id>http://blog.browsermob.com/?p=1869</id>
		<updated>2011-11-02T23:19:55Z</updated>
		<published>2011-11-02T23:19:55Z</published>
		<category scheme="http://blog.browsermob.com" term="Customer Feature" /><category scheme="http://blog.browsermob.com" term="How To" /><category scheme="http://blog.browsermob.com" term="Load Testing Tips" /><category scheme="http://blog.browsermob.com" term="Monitoring" />		<summary type="html"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
We are happy to announce that we recently added support for Firefox 7 to our monitoring and load testing products! You can now explicitly specify the Firefox version your script will run against.  Currently we support both Firefox 3.6 and Firefox 7. For example, the following script will open the Firefox 7 browser and navigate <a href='http://blog.browsermob.com/2011/11/firefox-7-support/'>[...]</a>]]></summary>
		<content type="html" xml:base="http://blog.browsermob.com/2011/11/firefox-7-support/"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
<p>We are happy to announce that we recently added support for <strong>Firefox 7 to our monitoring and load testing products</strong>!  You can now explicitly specify the Firefox version your script will run against.   Currently we support both Firefox 3.6 and Firefox 7.</p>
<p>For example, the following script will open the Firefox 7 browser and navigate to a url:</p>
<pre>var selenium = browserMob.openBrowser("FF7");
browserMob.beginTransaction();
browserMob.beginStep("Home Page");
selenium.open("http://seleniumhq.org/");
browserMob.endStep();
browserMob.endTransaction();</pre>
<p>The same is possible when using the Selenium 2.0 API (WebDriver):</p>
<pre>var webDriver = browserMob.openBrowserWebDriver("FF7");
browserMob.beginTransaction();
browserMob.beginStep("Home Page");
webDriver.get("http://seleniumhq.org/");
browserMob.endStep();
browserMob.endTransaction();</pre>
<h4>Firefox 3.6</h4>
<p><strong>Existing monitors and load tests will continue to use Firefox 3 by default</strong>.  New monitors will default to using Firefox 7, so you if you want to create a new monitor and have it run against Firefox 3.6, specify &#8220;FF3&#8243; as the browser type:</p>
<pre>var selenium = browserMob.openBrowser("FF3");</pre>
<p><span style="font-weight: bold">Future Versions</span></p>
<p>In the future, we will add support for more Firefox versions.  If you want to keep up with the latest version of Firefox installed on our systems, you will need to  specify &#8220;FF&#8221;:</p>
<pre>var selenium = browserMob.openBrowser("FF");</pre>
<p>When we upgrade to a later version of Firefox, the script will automatically use the new version.</p>
<h4>Local Validator</h4>
<p><strong>Local validator will use the Firefox version you have installed by default</strong>.  You can override the locations it looks in for the different browsers in a property file.  The file is located in your home directory on Unix and under your user folder on Windows.</p>
<p><span style="font-family: monospace">$HOME/.browserMob/config.properties</span></p>
<p>For example, if you have Firefox 7 installed in the default path and Firefox 3 under a different directory,  you can use the following <strong>config.properties</strong> to point local validator to the Firefox executables:</p>
<pre>FF3 = C:/Program Files/Mozilla Firefox 3/firefox.exe
FF7 = C:/Program Files/Mozilla Firefox/firefox.exe</pre>
]]></content>
		<link rel="replies" type="text/html" href="http://blog.browsermob.com/2011/11/firefox-7-support/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://blog.browsermob.com/2011/11/firefox-7-support/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://blog.browsermob.com/2011/11/firefox-7-support/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Anu Sandhanam</name>
					</author>
		<title type="html"><![CDATA[Scripting for BrowserMob using WebDriver]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrowserMob/~3/tqAAOCPxFEA/" />
		<id>http://blog.browsermob.com/?p=1846</id>
		<updated>2011-11-01T04:44:58Z</updated>
		<published>2011-11-01T04:44:58Z</published>
		<category scheme="http://blog.browsermob.com" term="FAQ" /><category scheme="http://blog.browsermob.com" term="How To" /><category scheme="http://blog.browsermob.com" term="Load Testing" /><category scheme="http://blog.browsermob.com" term="Load Testing Best Practices" /><category scheme="http://blog.browsermob.com" term="Load Testing Tips" />		<summary type="html"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
Hello Readers!! It gives me immense pleasure in meeting you with yet another article on WebDriver. WebDriver has been creating a lot of buzz among the Selenium community lately and BrowserMob, an active member of the Selenium community, wasted no time in announcing its support for the WebDriver API. I hope you had the chance <a href='http://blog.browsermob.com/2011/10/scripting-for-browsermob-using-webdriver/'>[...]</a>]]></summary>
		<content type="html" xml:base="http://blog.browsermob.com/2011/10/scripting-for-browsermob-using-webdriver/"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
<p>Hello Readers!! It gives me immense pleasure in meeting you with yet another article on WebDriver. WebDriver has been creating a lot of buzz among the Selenium community lately and BrowserMob, an active member of the Selenium community, wasted no time in announcing its support for the WebDriver API.</p>
<p>I hope you had the chance to read the great <a href="http://blog.browsermob.com/2011/07/introducing-selenium-2-webdriver-support/" target="_blank">introduction article on the Webdriver API</a> by fellow blogger Ben.</p>
<p>In this article I would like to touch on the basics of scripting with the WebDriver and the BrowserMob API.<br />
I’m sure many of you, who are new to this API are asking yourselves these questions just like I did.</p>
<ul>
<li>What is WebDriver?</li>
<li>Why is it needed?</li>
</ul>
<p>WebDriver is a framework for automated testing of web applications. WebDriver is a part of Selenium 2.0, which is a major departure from the 1.0 model. Selenium 1.0 is a client-server architecture which uses the RC libraries to program tests that communicate with the server, and the server relays those commands to a browser.</p>
<p>The primary downside of the 1.0 model is that it is written in JavaScript. Browsers impose a strict security model on any JavaScript that they execute in order to protect a user from malicious scripts. Additionally, the API for RC has grown over time that users find it hard to keep up with this ever growing dictionary of methods. The WebDriver helps overcome both these hurdles with an object oriented API that controls the browser itself rather than running as a JavaScript application within the browser.</p>
<p>WebDriver has five major Interfaces &#8211; <a href="http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/WebDriver.ImeHandler.html" target="_blank">ImeHandler</a>, <a href="http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/WebDriver.Navigation.html" target="_blank">Navigation</a>, <a href="http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/WebDriver.Options.html" target="_blank">Options</a>, <a href="http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/WebDriver.TargetLocator.html" target="_blank">TargetLocator</a> , <a href="http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/WebDriver.Timeouts.html" target="_blank">Timeouts</a>, the methods of which fall into following three categories.</p>
<ul>
<li>Control of the browser itself
<p>Eg: get(), navigate(), close()etc</li>
<li>Selection of WebElements
<p>Eg: findElement(), findElements() etc</li>
<li>Debugging aids
<p>Eg: getCurrentUrl(), getPageSource(), getTitle() etc</li>
</ul>
<p>Now that we have a clear understanding of what WebDriver is and what its benefits are, let’s take a deep dive into the various useful WebDriver methods exposed via BrowserMob through some example scripts. Let’s look at this simple script below, to begin with.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> driver <span style="color: #339933;">=</span> browserMob.<span style="color: #660066;">openBrowserWebDriver</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> tx <span style="color: #339933;">=</span> browserMob.<span style="color: #660066;">beginTransaction</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> step <span style="color: #339933;">=</span> browserMob.<span style="color: #660066;">beginStep</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Home Page&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
driver.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://seleniumhq.org/docs/06_test_design_considerations.html&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// polls DOM every 500 ms for ten seconds until the text 'Test Design Considerations' is found</span>
driver.<span style="color: #660066;">manage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">timeouts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">implicitlyWait</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">10</span><span style="color: #339933;">,</span>  TimeUnit.<span style="color: #660066;">SECONDS</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Content validation - find element by xpath</span>
driver.<span style="color: #660066;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">xpath</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;//div[@id='test-design-considerations']/h1[contains(text(), 'Test Design Considerations')]&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
browserMob.<span style="color: #660066;">endStep</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
browserMob.<span style="color: #660066;">endTransaction</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Deciphering the script…</p>
<ul>
<li><em>var driver = browserMob.openBrowserWebDriver();</em><br />
The openBrowserWebDriver()method of WebDriver starts a WebDriver browser session.</li>
<p></p>
<li><em>driver.get(&#8220;http://seleniumhq.org/docs/06_test_design_considerations.html&#8221;);</em><br />
    The ‘get’ method which is equivalent to selenium.open() is used to navigate to any web page.</li>
<p></p>
<li><em>driver.manage().timeouts().implicitlyWait(10,  TimeUnit.SECONDS);<br />
driver.findElement(By.xpath(&#8220;//div[@id='test-design-considerations']/h1[contains(text(), 'Test Design Considerations')]&#8220;));</em></p>
<p></p>
<p>WebDriver has a blocking API. i.e. WebDriver will wait until the page has fully loaded (that is, the &#8220;onload&#8221; event has fired) before returning control to your test or script. However, under some conditions it is possible for a ‘get’ call to return before the page has finished loading. The classic example is JavaScript starting to run after the page has loaded (triggered by onload). Browsers (e.g. Firefox) will notify WebDriver when the basic HTML content has been loaded, which is when WebDriver returns. It&#8217;s difficult to know when JavaScript has finished executing, since JS code may schedule functions to be called in the future, depend on server response, etc. WebDriver cannot wait for all conditions to be met before the test proceeds because it does not know them. The solution to ensure whether the element involved in the next interaction is present and ready is to use the ‘Wait’ class to wait for a specific element to appear. This class simply calls findElement over and over, until the element is found (or a timeout has expired). Since this is the behavior desired by default for many users, a mechanism for implicitly-waiting for elements to appear has been implemented. This is accessible through the <a href="http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/WebDriver.Timeouts.html" target="_blank">Timeouts() interface of the WebDriver class</a> (WebDriver.manage().timeouts() ). In the example script above, the driver.manage.timeouts().implicitlyWait call polls the DOM every 500 ms for 10 seconds until the text ‘Test Design Considerations’ is found.</li>
</ul>
<p><strong>Tips: </strong></p>
<ul>
<li>Optionally you can reset the Implicit Timeout to zero using the code below, as once set, it remains effective until the life of the WebDriver instance. The default setting is zero, i.e zero wait time.

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">driver.<span style="color: #660066;">manage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">timeouts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">implicitlyWait</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>  TimeUnit.<span style="color: #660066;">SECONDS</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>It is possible to set a timeout for the entire step as such using the setStepTimeout method of the browserMob API. 

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Setting a step timeout of 10 seconds</span>
browserMob.<span style="color: #660066;">setStepTimeout</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">10000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
browserMob.<span style="color: #660066;">beginStep</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
…….
<span style="color: #660066;">browserMob</span>.<span style="color: #660066;">endStep</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>Alternatively, browserMob’s  waitFor() method could be used in place of the implicitlyWait() for content validation. Modifying our script with waitFor()…

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> step <span style="color: #339933;">=</span> browserMob.<span style="color: #660066;">beginStep</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Home Page&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
driver.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://seleniumhq.org/docs/06_test_design_considerations.html&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
browserMob.<span style="color: #660066;">waitFor</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000066; font-weight: bold;">return</span> check <span style="color: #339933;">=</span> driver.<span style="color: #660066;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">xpath</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;//div[@id='test-design-considerations']/h1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getText</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">startsWith</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;test design considerations&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">10000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>check<span style="color: #009900;">&#41;</span>
	<span style="color: #000066; font-weight: bold;">throw</span> <span style="color: #3366CC;">&quot;Content validation failed&quot;</span><span style="color: #339933;">;</span>
browserMob.<span style="color: #660066;">endStep</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
</ul>
<p>Great!! We just wrote our first WebDriver script. We now know how to interact with page elements via the findElement method of WebDriver’s WebElement Interface using XPath. But does WebDriver provide other alternatives for interaction? Absolutely.  Below are few alternative ways. As implied through the script, using the ‘findElement’ is a great way to validate page content before proceeding to the next step in the script.</p>
<p><strong>By.cssSelector:</strong><br />
<em>driver.findElement(By.cssSelector(&#8220;div#test-design-considerations &gt; h1&#8243;));</em></p>
<p><strong>By.linkText:</strong><br />
<em>driver.findElement(By.linkText(&#8220;Data Driven Testing&#8221;));</em></p>
<p><strong>By.partialLinkText:</strong><br />
<em>driver.findElement(By.partialLinkText(&#8220;Data Driven&#8221;));</em></p>
<p><strong>By.id:</strong><br />
<em>driver.findElement(By.id(&#8220;side&#8221;));</em></p>
<p><strong>By.className:</strong><br />
<em>driver.findElement(By.className(&#8220;expandable&#8221;));</em></p>
<p><strong>By.name:</strong><br />
<em>driver.findElement(By.name(&#8220;q&#8221;));</em></p>
<p><strong>By.tagName:</strong><br />
<em>driver.findElement(By.tagName(&#8220;input&#8221;));</em></p>
<p><strong>driver.findElements:</strong><br />
In situations where you have to iterate through multiple elements with the same id/class/tag name etc or have to pick one randomly, the ‘findElements’ method comes in handy. The example script below uses this method to pick a random suggestion from an AutoSuggest list.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">browserMob.<span style="color: #660066;">beginStep</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;AutoSuggest&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
driver.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://www.simon.com/default.aspx&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> elem <span style="color: #339933;">=</span> driver.<span style="color: #660066;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">cssSelector</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;input[id*='KeywordTextBox']&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// clear the search box first</span>
elem.<span style="color: #660066;">clear</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// type Carlsbad in the search box</span>
elem.<span style="color: #660066;">sendKeys</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;carlsbad&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// wait for autosuggest to populate</span>
driver.<span style="color: #660066;">manage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">timeouts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">implicitlyWait</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">10</span><span style="color: #339933;">,</span> TimeUnit.<span style="color: #660066;">SECONDS</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> autoSuggest <span style="color: #339933;">=</span> driver.<span style="color: #660066;">findElements</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">xpath</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;//div[@class='ac_results']/ul/li&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// 'autoSuggest' from above is a Java List. Either use size() to get its length </span>
<span style="color: #006600; font-style: italic;">// or convert this to an array - autoSuggest.toArray().length</span>
&nbsp;
browserMob.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>autoSuggest.<span style="color: #660066;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// click on a random element – picking the last element in this case</span>
<span style="color: #003366; font-weight: bold;">var</span> selected <span style="color: #339933;">=</span> driver.<span style="color: #660066;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">xpath</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;//div[@class='ac_results']/ul/li[&quot;</span><span style="color: #339933;">+</span>autoSuggest.<span style="color: #660066;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;]&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// throw an error if content validation returns false</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>driver.<span style="color: #660066;">getTitle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">contains</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Search Results&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #000066; font-weight: bold;">throw</span> <span style="color: #3366CC;">'Content error: &quot;Search Results&quot; not found'</span><span style="color: #339933;">;</span>
&nbsp;
browserMob.<span style="color: #660066;">endStep</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>As you can see, I’ve also managed to introduce a few other useful methods through this script. The comments above each one of them describe their purpose. </p>
<p><strong>Tips: </strong></p>
<ul>
<li>sendKeys can also be used to simulate pressing of the keyboard keys by using the &#8220;Keys&#8221; class. It is possible to call sendKeys on any element. The code below triggers the “ENTER’ key press to force a form submission. The list of Keys supported can be found <a href="http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/Keys.html" target="_blank">here</a>.

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">driver.<span style="color: #660066;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">id</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'finalExpenses'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">sendKeys</span><span style="color: #009900;">&#40;</span>Keys.<span style="color: #000066; font-weight: bold;">RETURN</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>With advanced locators, it is possible to traverse down the DOM with a single line of code as in below:

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">driver.<span style="color: #660066;">findElements</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">tagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;ul&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">findElements</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">tagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;li&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>
As the index starts with zero, the line of code above would click on the third “li” of the second “ul” on the page. </li>
</ul>
<p>A few more common page element interactions in detail…</p>
<p><strong>How to handle frames?</strong></p>
<p>Swinging between frames is easy with the <strong>switchTo() method of the TargetLocator interface of the WebDriver class.</strong></p>
<ul>
<li>Switch to the frame from main window</li>
<ul>
<li>By index

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">driver.<span style="color: #660066;">switchTo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">frame</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>By frame name

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">driver.<span style="color: #660066;">switchTo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">frame</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;frameName&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
</ul>
<li>Switch back to the parent window

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">driver.<span style="color: #660066;">switchTo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">defaultContent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
</ul>
<p>The following example illustrates a simple swinging between two frames on a web page. Let’s assume the page has two frames, frame1 and frame2, out of which frame1 has a link and frame2 has a form.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">driver.<span style="color: #660066;">switchTo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">frame</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;frame1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
driver.<span style="color: #660066;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">linkText</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;SPAZ&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
driver.<span style="color: #660066;">switchTo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">defaultContent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
driver.<span style="color: #660066;">switchTo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">frame</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;frame2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
driver.<span style="color: #660066;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">id</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;field_0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">sendKeys</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;anu&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
driver.<span style="color: #660066;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">className</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;form_button&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">submit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
driver.<span style="color: #660066;">switchTo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">defaultContent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Try running this snippet commenting out the “driver.switchTo().defaultContent();” before switching to frame2 and you would end up with an error that frame2 cannot be located. This explains the need for switching back to the parent page from inside a frame first, before navigating to another frame on the same page.</p>
<p><strong>How to handle JavaScript Alert and Confirmation boxes?</strong></p>
<p>Confirmation boxes are handled the same way as the Alerts.</p>
<ul>
<li>Switch focus to the alert/confirmation box

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> <span style="color: #000066;">alert</span> <span style="color: #339933;">=</span> driver.<span style="color: #660066;">switchTo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>Dismiss – equivalent to hitting “Cancel” button on the Confirmation box or ignoring an Alert by closing it.

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066;">alert</span>.<span style="color: #660066;">dismiss</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>Alternatively accept – equivalent to hitting “OK” on the Alert or the Confirmation box

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066;">alert</span>.<span style="color: #660066;">accept</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>Handle Confirmation boxes the JavaScript way

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">driver.<span style="color: #660066;">executeScript</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;window.confirm = function(msg){return true;};&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
</ul>
<p><strong>How to handle Pop-up Windows?</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">browserMob.<span style="color: #660066;">beginStep</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Handle Popup Windows&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
driver.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://www.javascript-coder.com/files/window-popup/javascript-window-open-example1.html&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Get the handle to the current window</span>
<span style="color: #003366; font-weight: bold;">var</span> currentHandle <span style="color: #339933;">=</span> driver.<span style="color: #660066;">getWindowHandle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
driver.<span style="color: #660066;">manage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">timeouts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">implicitlyWait</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">10</span><span style="color: #339933;">,</span>  TimeUnit.<span style="color: #660066;">SECONDS</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Open Pop-up</span>
driver.<span style="color: #660066;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">partialLinkText</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Open the JavaScript Window&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Switch focus to Pop-up using its name</span>
driver.<span style="color: #660066;">switchTo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">window</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'mywindow'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Alternate way - if the Pop-up window doesn't have a name, which is very common - </span>
<span style="color: #006600; font-style: italic;">// get the handle to the last opened window</span>
<span style="color: #003366; font-weight: bold;">var</span> handles <span style="color: #339933;">=</span> driver.<span style="color: #660066;">getWindowHandles</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toArray</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> id <span style="color: #339933;">=</span> handles.<span style="color: #660066;">length</span> <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span>
driver.<span style="color: #660066;">switchTo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">window</span><span style="color: #009900;">&#40;</span>handles<span style="color: #009900;">&#91;</span>id<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">//close popup</span>
driver.<span style="color: #660066;">executeScript</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;self.close ();&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">//switch focus to parent window</span>
driver.<span style="color: #660066;">switchTo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">window</span><span style="color: #009900;">&#40;</span>currentHandle<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
browserMob.<span style="color: #660066;">endStep</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>How to interact with SELECT drop-downs?</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> lastItem <span style="color: #339933;">=</span> driver.<span style="color: #660066;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">xpath</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;//select[@class='dropDown']/option[last()]&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
lastItem.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>How to simulate advanced interaction such as Drag and Drop?</strong></p>
<p>The <a href="http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/interactions/Actions.html" target="_blank">Actions</a> subclass of the Selenium Interactions class makes emulation of these complex user gestures easier.</p>
<ul>
<li>Drag an element to drop on to another element

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">driver.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://devfiles.myopera.com/articles/735/example.html&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> from <span style="color: #339933;">=</span> driver.<span style="color: #660066;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">xpath</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;//ul[@id='Fav']/li[3]&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> to <span style="color: #339933;">=</span> driver.<span style="color: #660066;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">xpath</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;//ul[@id='Tol']/li&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Actions<span style="color: #009900;">&#40;</span>driver<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">dragAndDrop</span><span style="color: #009900;">&#40;</span>from<span style="color: #339933;">,</span>to<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">build</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">perform</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>Drag an element to an offset

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">driver.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://jqueryui.com/demos/draggable/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> draggable <span style="color: #339933;">=</span> browser.<span style="color: #660066;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #660066;">id</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;draggable&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
Actions<span style="color: #009900;">&#40;</span>driver<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">dragAndDropBy</span><span style="color: #009900;">&#40;</span>draggable<span style="color: #339933;">,</span> <span style="color: #CC0000;">200</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">build</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">perform</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
</ul>
<p>I hope this article served as a comprehensive tutorial, covering most of the basics of WebDriver, if not all. See you soon with more useful WebDriver tips and tricks. Happy testing until then!!!</p>
]]></content>
		<link rel="replies" type="text/html" href="http://blog.browsermob.com/2011/10/scripting-for-browsermob-using-webdriver/#comments" thr:count="4" />
		<link rel="replies" type="application/atom+xml" href="http://blog.browsermob.com/2011/10/scripting-for-browsermob-using-webdriver/feed/atom/" thr:count="4" />
		<thr:total>4</thr:total>
	<feedburner:origLink>http://blog.browsermob.com/2011/10/scripting-for-browsermob-using-webdriver/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Stephanie Klaiber</name>
					</author>
		<title type="html"><![CDATA[Repost: Website Monitoring Is Just as Important as Analyzing Traffic Data]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrowserMob/~3/CPZHh3LT8os/" />
		<id>http://blog.browsermob.com/?p=1843</id>
		<updated>2011-10-21T12:01:38Z</updated>
		<published>2011-10-21T12:01:38Z</published>
		<category scheme="http://blog.browsermob.com" term="Monitoring" /><category scheme="http://blog.browsermob.com" term="BrowserMob" /><category scheme="http://blog.browsermob.com" term="Neustar" /><category scheme="http://blog.browsermob.com" term="Performance" /><category scheme="http://blog.browsermob.com" term="Webmetrics" /><category scheme="http://blog.browsermob.com" term="website performance" />		<summary type="html"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
A LinkedIn user recently posed the question: “What are the best practices for monitoring, collecting and analyzing traffic data for a large content site?” Ian White, lead engineer at Neustar, jumped into to tell readers why active monitoring is just as important as analytics. Website monitoring ensures your site is functioning properly anytime from anywhere. <a href='http://blog.browsermob.com/2011/10/repost-website-monitoring-is-just-as-important-as-analyzing-traffic-data/'>[...]</a>]]></summary>
		<content type="html" xml:base="http://blog.browsermob.com/2011/10/repost-website-monitoring-is-just-as-important-as-analyzing-traffic-data/"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
<p>A <a href="http://www.linkedin.com/">LinkedIn</a> user recently posed the question: “<a href="http://www.linkedin.com/answers/technology/blogging/TCH_BLG/893477-12853937?searchIdx=2&amp;sik=1315828876912&amp;goback=.asr_1_1315828876912">What are the best practices for monitoring, collecting and analyzing traffic data for a large content site?</a>” Ian White, lead engineer at <a href="http://www.neustar.biz/">Neustar</a>, jumped into to tell readers why active monitoring is just as important as analytics. <a href="http://www.webmetrics.com/monitoring-services">Website monitoring</a> ensures your site is functioning properly anytime from anywhere.</p>
<p>Below we’ve outlined a few of his key points that will help you  monitor your  site so you can sleep well at night knowing your website  is always  up and running.</p>
<p><strong>Monitor everything.</strong> You need to be alerted whenever a critical  system process goes offline. This includes web servers, cache, servers,  databases, etc. Understand that you may not know everything you should  monitor until it breaks for the first time, but that only serves as  lessons learned for additional metrics to monitor and make for a more  failsafe website over time.</p>
<p><strong>How you monitor matters.</strong> Whether the purpose of your website  is to log in a user or add an item to a shopping cart, your customers  depend on each click of the mouse to be fully functional. These  interactions require <a href="http://www.webmetrics.com/monitoring-services/overview">monitoring that automates real browser interactions</a>—like  sending headers, setting cookies or executing JavaScript—and alerts you  if something unexpected occurs. This provides a realistic view of the  customer experience.</p>
<p><strong>Monitor from multiple locations.</strong> To ensure your website is fully functional from <a href="http://www.webmetrics.com/monitoring-services/enterprise-monitoring/platform-features/globalwatch-network/">every coordinate on the globe</a>,  you need to monitor your site from different geographic locations.  There is no “magic number” for how many locations you should monitor  from, but we recommend at least three. For example, if your company is  based in the U.S., we suggest you monitor from two locations in the  States and at least one in Europe or Asia.</p>
<p><strong>Implement </strong><a href="http://www.google.com/url?sa=t&amp;rct=j&amp;q=webmetrics%20%2B%20real%20user%20monitoring&amp;source=web&amp;cd=1&amp;ved=0CDwQFjAA&amp;url=http%3A%2F%2Fwww.webmetrics.com%2Fcontent%2Fdownload%2F3952%2F59339%2Ffile%2FVisual_Application_Monitoring_Datasheet.pdf&amp;ei=pXSgTv66FNC6hAeq0LTOBA&amp;usg=AFQjCNG5_Tg8-C3NH6oEcNVTInaTYKENOQ&amp;cad=rja"><strong>Real User Monitoring (RUM)</strong></a><strong>.</strong> In addition to monitoring your website uptime, you should also test the load times for your website visitors. Similar to <a href="http://www.google.com/analytics/">Google Analytics</a>,  RUM involves placing a JavaScript beacon on your site. Every time a  user visits your site, the beacon records the load time and you are  alerted whenever this time goes above a specified threshold.</p>
<p><strong>Establish tiered alerting.</strong> If a tree falls down in a forest,  does it make a sound? The same thought process behind this popular  riddle goes into a tiered alerting system. If the individual responsible  for fixing a downtime issue doesn’t check his or her email at 3:00am  regularly, with a simple email alert system he or she will not hear  if/when your site goes offline. Services like <a href="http://www.pagerduty.com/">PagerDuty</a> ensure that alerts run up the chain of command with continual forms of  alerts until someone responds via email, text message or phone call.</p>
<p>For more information on Ian’s response or to join in on the discussion, click <a href="http://www.linkedin.com/answers/technology/blogging/TCH_BLG/893477-12853937?searchIdx=2&amp;sik=1315828876912&amp;goback=.asr_1_1315828876912">here</a>.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://blog.browsermob.com/2011/10/repost-website-monitoring-is-just-as-important-as-analyzing-traffic-data/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://blog.browsermob.com/2011/10/repost-website-monitoring-is-just-as-important-as-analyzing-traffic-data/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://blog.browsermob.com/2011/10/repost-website-monitoring-is-just-as-important-as-analyzing-traffic-data/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Connie</name>
					</author>
		<title type="html"><![CDATA[Repost: Testing a Flex client with BrowserMob]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrowserMob/~3/pB71cw7HaDo/" />
		<id>http://blog.browsermob.com/?p=1834</id>
		<updated>2011-10-12T21:34:34Z</updated>
		<published>2011-10-12T21:34:34Z</published>
		<category scheme="http://blog.browsermob.com" term="Uncategorized" />		<summary type="html"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
Thanks to Dave Thompson for sharing his experience with using BrowserMob to test the performance of a Flex app. To read the full article, check out it here.]]></summary>
		<content type="html" xml:base="http://blog.browsermob.com/2011/10/repost-testing-a-flex-client-with-browsermob/"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
<p>Thanks to <a href="http://www.blogger.com/profile/05289219104297308435">Dave Thompson</a> for sharing his experience with using BrowserMob to test the performance of a Flex app. To read the full article, check out it <a href="http://www.limscoder.com/2011/10/testing-with-browser-mob.html">here</a>.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://blog.browsermob.com/2011/10/repost-testing-a-flex-client-with-browsermob/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://blog.browsermob.com/2011/10/repost-testing-a-flex-client-with-browsermob/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://blog.browsermob.com/2011/10/repost-testing-a-flex-client-with-browsermob/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Stephanie Klaiber</name>
					</author>
		<title type="html"><![CDATA[How to Keep Up With the Holiday Rush: 8 Tips for Retailers Looking to Conquer Spikes in Website Traffic]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrowserMob/~3/aT2UI7bkqhY/" />
		<id>http://blog.browsermob.com/?p=1821</id>
		<updated>2011-10-11T12:01:15Z</updated>
		<published>2011-10-09T20:12:42Z</published>
		<category scheme="http://blog.browsermob.com" term="How To" /><category scheme="http://blog.browsermob.com" term="Load Testing" /><category scheme="http://blog.browsermob.com" term="Monitoring" /><category scheme="http://blog.browsermob.com" term="BrowserMob" /><category scheme="http://blog.browsermob.com" term="load testing best practices" /><category scheme="http://blog.browsermob.com" term="Performance" />		<summary type="html"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
It’s almost that time of year again. Holiday shoppers looking to stay at arm’s length from the seasonal mall madness will undoubtedly turn to the Internet to make their gift purchases. In fact, ShopperTrak predicts national retail sales will rise 3% during November and December this year as compared to the same time period last <a href='http://blog.browsermob.com/2011/10/8-holiday-website-traffic-tips/'>[...]</a>]]></summary>
		<content type="html" xml:base="http://blog.browsermob.com/2011/10/8-holiday-website-traffic-tips/"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
<p>It’s almost that time of year again. Holiday shoppers looking to stay at arm’s length from the seasonal mall madness will undoubtedly turn to the Internet to make their gift purchases. In fact, ShopperTrak predicts national retail sales <a href="http://www.shoppertrak.com/experts-predict-more-retail-sales-fewer-store-shoppers-holiday-season-0">will rise 3% </a>during November and December this year as compared to the same time period last year.</p>
<p>In order to keep up with this expected spike in website traffic, there are a few steps ecommerce companies should take to ready their site. In order to help, we’ve rounded up the top eight <a href="https://browsermob.com/website-load-testing">load testing</a> and <a href="https://browsermob.com/website-monitoring">website monitoring</a> tips to help ecommerce sites stay on their “A-game” this holiday season.</p>
<p><strong><em>1. Start load testing now.</em></strong> Procrastination can be a worrisome habit. Put off today what you can do tomorrow, and you may find your ecommerce site has crashed. According to IBM report, <a href="http://www.google.com/url?sa=t&amp;source=web&amp;cd=3&amp;ved=0CC8QFjAC&amp;url=ftp%3A%2F%2Fftp.software.ibm.com%2Fcommon%2Fssi%2Fpm%2Fbr%2Fn%2Fsmb00305usen%2FSMB00305USEN.PDF&amp;rct=j&amp;q=IBM%20%2B%20Act%2C%20Don%27t%20React%3A%20A%20Proactive%20Business%20Continuity%20Solution%20Protects%20your%20Revenues%20and%20Reputation&amp;ei=zniLTuK7NoPbsgaO04X7AQ&amp;usg=AFQjCNHNq59hhHOq5yPlcL0op3EK8cvk0g&amp;cad=rja">Act, Don&#8217;t React: A Proactive Business Continuity Solution Protects your Revenues and Reputation</a>, the average revenue loss per hour of downtime is $1.01 million—a price tag your business cannot afford.</p>
<p><strong><em>2. Set objectives.</em></strong> Look at industry trends and establish what is “acceptable performance” for your organization. Example Key Performance Indicators (KPI’s) before load testing can include:</p>
<ul>
<li>90% of pages should load in 4 seconds or less</li>
<li>All business transactions should take less than 1 minute to complete</li>
<li>Category search should take no more than 6 seconds to complete</li>
</ul>
<p><strong><em>3. Use real browsers.</em></strong> Thanks to cloud computing, it is now cost effective to load test and monitor a website using <a href="../2011/07/repost-in-the-driver%E2%80%99s-seat-load-testing-best-practices-configuration/">real browsers</a>. Real browsers let you create more life-like site traffic, unlike virtual browsers that simply mimic a browser&#8217;s http request / response sequence. You&#8217;ll come away with a clearer view of your end user&#8217;s experience.</p>
<p><strong><em>4. Test beyond the firewall.</em></strong> The most frequently visited parts of your site are the most important to test: applications supporting your home page, browsing, product selection, checkout and exit. Without external testing, you&#8217;re only getting half the picture.</p>
<p><strong><em>5. Revisit frequency:</em></strong> Consider increasing your monitoring frequency to make sure nothing goes unnoticed. You need to be notified immediately if there is any change in your website’s behavior.</p>
<p><strong><em>6. Collaborate.</em></strong> Advertising and special promotions will affect traffic to your website. Coordinate with your marketing department to ensure your website can handle traffic upticks caused by marketing campaigns.</p>
<p><strong><em>7. Document.</em></strong> Establish a holiday preparation process and document all of your load testing and monitoring activities. That way you’ll have all the records you need to <a href="../2011/08/in-the-drivers-seat-load-testing-best-practices-analysis/">perform a post-mortem</a> and improve for next year.</p>
<p><em><strong>8. Choose the Solution that Works for Best You</strong></em><em><strong>.</strong></em> When working with load testing providers, you typically have two  choices: (a) on-demand services that let you run tests 24/7 or (b)  full-service testing, which normally includes a dedicated engineer. If  you have the resources and expertise on staff, and require greater  flexibility for when you test, on-demand is a good choice (Tip: See if  you can get started with a free trial.)  If you could use additional  expertise with testing and analysis, including professional  recommendations and reporting, then full-service load testing is the way  to go.</p>
<p>Visit http://www.browsermob.com for more information about  our  on-demand load testing solutions or  http://www.webmetrics.com for  more information on our performance monitoring and full-service load   testing solutions.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://blog.browsermob.com/2011/10/8-holiday-website-traffic-tips/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://blog.browsermob.com/2011/10/8-holiday-website-traffic-tips/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://blog.browsermob.com/2011/10/8-holiday-website-traffic-tips/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Kim Maciariello</name>
					</author>
		<title type="html"><![CDATA[Come one, come all! Announcing BrowserMob First Friday Feedback Office Hours]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrowserMob/~3/rQO-crKbAv0/" />
		<id>http://blog.browsermob.com/?p=1809</id>
		<updated>2011-09-29T18:03:39Z</updated>
		<published>2011-09-29T17:40:35Z</published>
		<category scheme="http://blog.browsermob.com" term="Announcements" /><category scheme="http://blog.browsermob.com" term="Events" /><category scheme="http://blog.browsermob.com" term="application monitoring" /><category scheme="http://blog.browsermob.com" term="BrowserMob" /><category scheme="http://blog.browsermob.com" term="Load Testing" /><category scheme="http://blog.browsermob.com" term="Monitoring" /><category scheme="http://blog.browsermob.com" term="Performance" /><category scheme="http://blog.browsermob.com" term="professional services" /><category scheme="http://blog.browsermob.com" term="website monitoring" />		<summary type="html"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
Looking for a way to keep up on website performance best practices, load testing tips and all things related to the success of your websites and applications? Then join us for our new BrowserMob office hours. We’re pleased to announce that starting October 7, SMEs from our Engineering, Professional Services, Customer Service and Sales teams <a href='http://blog.browsermob.com/2011/09/first-friday-feedback/'>[...]</a>]]></summary>
		<content type="html" xml:base="http://blog.browsermob.com/2011/09/first-friday-feedback/"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
<p>Looking for a way to keep up on website performance best practices, load testing tips and all things related to the success of your websites and applications? Then join us for our new <a href="http://www.browsermob.com">BrowserMob</a> office hours.</p>
<p>We’re pleased to announce that starting October 7, SMEs from our Engineering, Professional Services, Customer Service and Sales teams are at your service for one hour on the first Friday of every month. Feel free to pick their brains and ask anything that’s on your mind. They’re happy to share success stories and lessons learned from their work with other customers.</p>
<p>Find full details on the new monthly tradition below:</p>
<p><strong>What:</strong> First Friday Feedback, the official BrowserMob office hours</p>
<p><strong>When:</strong> 9:00 – 10:00 a.m. PST, The first Friday of every month, beginning October 7</p>
<p><strong> </strong></p>
<p><strong>Where:</strong> Via WebEx (details to come once you register below)</p>
<p><strong> </strong></p>
<p><strong>Who:</strong> A diverse team of experts from various BrowserMob teams</p>
<p><strong> </strong></p>
<p><strong>How:</strong> Register <a href="http://browsermob.createsend1.com/t/r/l/tithuik/ntyidlhuk/u/">here</a>.</p>
<p>If you’d like to shoot our SMEs a question or feedback ahead of time so that we can be sure to cover it on Friday, please send us an <a href="mailto:kim.m@neustar.biz?subject=First%20Friday%20Feedback">email</a>. We look forward to seeing you there!</p>
]]></content>
		<link rel="replies" type="text/html" href="http://blog.browsermob.com/2011/09/first-friday-feedback/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://blog.browsermob.com/2011/09/first-friday-feedback/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://blog.browsermob.com/2011/09/first-friday-feedback/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Ian White</name>
					</author>
		<title type="html"><![CDATA[Monitoring outage from 1:01 to 3:01 PDT]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrowserMob/~3/hsBHERZ6gtM/" />
		<id>http://blog.browsermob.com/?p=1806</id>
		<updated>2011-09-18T18:35:15Z</updated>
		<published>2011-09-18T18:34:49Z</published>
		<category scheme="http://blog.browsermob.com" term="Uncategorized" />		<summary type="html"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
From 1:01 am to 3:01 am PDT on Sept 18, 2011 the data center that houses our secondary queue server became inaccessible from all monitoring locations. During the outage we were not running any monitoring jobs. At this time everything is running normally and our network ops team is working to determine the root cause. <a href='http://blog.browsermob.com/2011/09/monitoring-outage-from-101-to-301-pdt/'>[...]</a>]]></summary>
		<content type="html" xml:base="http://blog.browsermob.com/2011/09/monitoring-outage-from-101-to-301-pdt/"><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top:40%;
left:60px;
z-index:1;
background-color:#F0F4F9}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;
width:55px;
height:60px;
padding-bottom:2px;
}


#bottomcontainerBox {
float:left;
height:30px;
width:100%;
background-color:#F0F4F9}

#bottomcontainerBox .buttons {
float:left;
height:30px;
width:85px;
margin:4px 4px 4px 4px;
}

</style>
<p>From 1:01 am to 3:01 am PDT on Sept 18, 2011 the data center that houses our secondary queue server became inaccessible from all monitoring locations. During the outage we were not running any monitoring jobs. At this time everything is running normally and our network ops team is working to determine the root cause.</p>
<p>Normally an outage of one of our queueing clusters would not be an issue, as we have both automatic and manual failover policies in place. But this time we were in the middle of migrating the physical server of our primary queue server and were unable to switch over. There are a few spots we have already identified where we can improve our infrastructure to prevent any further outages like this.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://blog.browsermob.com/2011/09/monitoring-outage-from-101-to-301-pdt/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://blog.browsermob.com/2011/09/monitoring-outage-from-101-to-301-pdt/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://blog.browsermob.com/2011/09/monitoring-outage-from-101-to-301-pdt/</feedburner:origLink></entry>
	</feed><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced)

Served from: blog.browsermob.com @ 2011-12-27 09:01:38 -->

