<?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:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;A0YBRHw_eSp7ImA9WhVTGEQ.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144</id><updated>2012-03-04T14:12:35.241-08:00</updated><category term="Waterfall" /><category term="JMeter" /><category term="challenge" /><category term="introduction" /><category term="disadvantages" /><category term="tools" /><category term="MySQL" /><category term="SQL" /><category term="java" /><category term="Selenium RC" /><category term="QA" /><category term="record/playback" /><category term="epic-fail" /><category term="API" /><category term="antipattern" /><category term="Selenium 2" /><category term="perforce" /><category term="log4j" /><category term="SCRUM" /><category term="processes" /><category term="Ruby" /><category term="ANT" /><category term="pattern" /><category term="services" /><category term="performance" /><category term="eclipse" /><category term="automation" /><category term="roi" /><category term="J2EE" /><title>Two cents - real quality assurance engineering problems</title><subtitle type="html">Experienced QA</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://razgulyaev.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>41</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/Cfouz" /><feedburner:info uri="blogspot/cfouz" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;A0YBRHw-eSp7ImA9WhVTGEQ.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-1337693338171306088</id><published>2012-03-04T14:12:00.001-08:00</published><updated>2012-03-04T14:12:35.251-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-04T14:12:35.251-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Selenium 2" /><title>When WebElement.click() doesn't work in Selenium2 WebDriver</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6kURmNTCNJ2B8LqSwDYMjWRzLPk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6kURmNTCNJ2B8LqSwDYMjWRzLPk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6kURmNTCNJ2B8LqSwDYMjWRzLPk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6kURmNTCNJ2B8LqSwDYMjWRzLPk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Sometimes I face the problems when regular WebElement click() method does not work. For example I met such the problem when tried to locate the link under H2 like the following snippet:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;h2&amp;gt;
 &amp;lt;a href="something" title="something"&amp;gt;Some text&amp;lt;/a&amp;gt;
&amp;lt;/h2&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
The regular method of locating like &lt;span style="background-color: #999999;"&gt;driver.findElement(By.xpath("somexpath")).click()&lt;/span&gt;&amp;nbsp;led to the exception saying some other element will get the click instead of one located by me. So I applied the following work-around:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt; public void safeClick(WebElement element){
  Actions builder = new Actions(getDriver());
  builder.moveToElement(element).click().build().perform();
 }
&lt;/pre&gt;
where getDriver() just means your current WebDriver implementation. This made me capable to work-around the problem from one hand and even made click action closer to the actual action sequence performed by the user clicking anything on the page.&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-1337693338171306088?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/AI1Dt0BQfmE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/1337693338171306088/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2012/03/when-webelementclick-doesnt-work-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/1337693338171306088?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/1337693338171306088?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/AI1Dt0BQfmE/when-webelementclick-doesnt-work-in.html" title="When WebElement.click() doesn't work in Selenium2 WebDriver" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2012/03/when-webelementclick-doesnt-work-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMGQHw7eCp7ImA9WhVTE0o.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-2315140808388303417</id><published>2012-02-27T10:02:00.003-08:00</published><updated>2012-02-27T13:17:01.200-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-27T13:17:01.200-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="tools" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><title>Lazy way on how to generate pretty huge set of distinct (unique) hex values</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fqqiDtiTkpEt2zFSdhQq2kAxdPk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fqqiDtiTkpEt2zFSdhQq2kAxdPk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fqqiDtiTkpEt2zFSdhQq2kAxdPk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fqqiDtiTkpEt2zFSdhQq2kAxdPk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
We sometimes need to generate huge set of quite short distinct identifiers. Another requirement is that the identifiers generated with the chosen method (despite of a huge generated set) are still from the much bigger set and actually represent a small subset of that (this for example could help when you generate the number which you would like is hard to guess. probably to generate the invites for your site).&lt;br /&gt;
&lt;br /&gt;
Here is the lazy way on how to do that using java. Using it I generated 500K distinct hex values (8-digit in a maximum) from 4.3 bil total space in a few seconds. That means the user will have to try to guess the right value for approximately 9K times.&lt;br /&gt;
&lt;br /&gt;
So.. this is the code&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.UUID;


public class Generator {
 
 public class DummyStringKeeper {
  
  String string;
  
  public DummyStringKeeper(String string){
   this.string = string;
  }
 }

 public static void main(String args[]) throws IOException{
  BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("c:/temp/items_expoted.txt"));
  ArrayList&amp;lt;DummyStringKeeper&amp;gt; list = new ArrayList&amp;lt;DummyStringKeeper&amp;gt;();
  for (int i=0; i&amp;lt;500000; i++){
   DummyStringKeeper randomItem = new Generator().new DummyStringKeeper(UUID.randomUUID().toString());
   list.add(randomItem);
   String randomItemString = randomItem.toString().substring(randomItem.toString().indexOf("@")+1) + "\n";
   bos.write(randomItemString.getBytes());
  }
  bos.flush();
  bos.close();
 }
 
}
&lt;/pre&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-2315140808388303417?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/_vIJbwomkVs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/2315140808388303417/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2012/02/lazy-way-on-how-to-generate-pretty-huge.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/2315140808388303417?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/2315140808388303417?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/_vIJbwomkVs/lazy-way-on-how-to-generate-pretty-huge.html" title="Lazy way on how to generate pretty huge set of distinct (unique) hex values" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2012/02/lazy-way-on-how-to-generate-pretty-huge.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08EQn4yeyp7ImA9WhRaE0g.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-2444596492427361128</id><published>2012-02-15T15:45:00.000-08:00</published><updated>2012-02-15T16:23:23.093-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-15T16:23:23.093-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Selenium 2" /><title>Another view on how to simulate multi-user interaction in your Selenium 2 scenarios</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KBV8ArvgN7_oz0TIg-m00-nUge0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KBV8ArvgN7_oz0TIg-m00-nUge0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KBV8ArvgN7_oz0TIg-m00-nUge0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KBV8ArvgN7_oz0TIg-m00-nUge0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div style="text-align: left;"&gt;
I heard from a lot of people that the best pattern for keeping your web driver in the project is singleton. That looks doubtful.&amp;nbsp;&lt;/div&gt;
Since I got the requirement of multi-user interacting in my scenarios I used singleton pattern for webdriver and I had to use the following workflow for interaction&lt;br /&gt;
1. Log in with user A&lt;br /&gt;
2. Send message to user B&lt;br /&gt;
3. Log out with user A&lt;br /&gt;
4. Log in with user B&lt;br /&gt;
5. Handle the request from user A&lt;br /&gt;
&lt;br /&gt;
That is not quite obvious and organic workflow. The much more convenient is to do something like this&lt;br /&gt;
&lt;br /&gt;
1. Log in with user A&lt;br /&gt;
2. Send message to user B&lt;br /&gt;
3. Log in with user B&lt;br /&gt;
4. Handle the request from user A--- Finish the test or: &lt;br /&gt;
5. Log out with user A&lt;br /&gt;
6. Log out with user B &lt;br /&gt;
&lt;br /&gt;
This cannot be implemented having singleton pattern as the one for your webdriver. This is my way of how to support several browsers simultaneously&lt;br /&gt;
&lt;br /&gt;
First of all we need the factory to easily create new browser instances (aka new drivers)&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt; private static class WDFactory{
  public static WebDriver createWebDriver(Properties properties){
   String browser = properties.getProperty("browser");
   WebDriver driverToCreate;
   if(browser.toLowerCase().equals("*firefox")){
    driverToCreate = new FirefoxDriver();
   }else if(browser.toLowerCase().equals("*googlechrome")){
    driverToCreate = new ChromeDriver();
   }else{
    throw new UnsupportedOperationException("Not supported browser yet");
   }
   driverToCreate.get(properties.getProperty("domain"));
   driverToCreate.manage().timeouts().implicitlyWait(500, TimeUnit.MILLISECONDS);
   return driverToCreate;
  }
 }
&lt;/pre&gt;
&lt;br /&gt;
Also we sure need the pool where we're going to store all the browser instances we're going to work with&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;public class WDPool {

 private HashMap&amp;lt;String, WebDriver&amp;gt; pool;
 
 public WDPool(){
  pool = new HashMap&amp;lt;String, WebDriver&amp;gt;();
 }
 
 public void closeDrivers(){
  for (String key: pool.keySet()){
   getDriver(key).close();
  }
 }
 
 public void addDriver(String id, WebDriver driver){
  ARTestCase.logger.debug("Adding driver with id [" + id + "]");
  driver.manage().deleteAllCookies();
  pool.put(id, driver);
 }
 
 public WebDriver getDriver(String id){
  ARTestCase.logger.debug("Returning driver with id [" + id + "]");
  return pool.get(id);
 }
}
&lt;/pre&gt;
&lt;br /&gt;
Okay. Now you should consider your design. I have the class laying between the browser control engine (like selenium) and the business logic of the scenarios. So if you have one introduce the following method there. Otherwise introduce it into the class where your actual scenario is described&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt; public void pushDriver(String id){
  driver = WDFactory.createWebDriver(properties);
  stack.addDriver(id, driver);
 }
&lt;/pre&gt;
&lt;br /&gt;
Here and after stack represents the instance of WDPool.&lt;br /&gt;
&lt;br /&gt;
It will be used on the stage the new user is logging in.&lt;br /&gt;
and the facility to obtain the driver instance for the current user&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt; private WebDriver getDriver(){
  return stack.getDriver(ARTestCase.getCurrentUser());
 }
&lt;/pre&gt;
&lt;br /&gt;
So now we're ready to instantiate the new browser each time the new user gets logged in. The browser instance is stored into the hashmap with the id holding the user's nick-name. There are only two things to do:&lt;br /&gt;
&lt;br /&gt;
1. Change your log-in functionality of the scenario so that it requests pushDriver. In my case it has the following look:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;    public void logIn(String username) throws ARAutomationException {
     getTestCase().getAdapter().pushDriver(username);
     getTestCase().setCurrentUser(username);
 // some actions to perform
    }&lt;/pre&gt;
&lt;br /&gt;
Where getTestCase().getAdapter() returns the interlayer of the test case we're currently executing holding all the stuff I'm writing here about.&lt;br /&gt;
&lt;br /&gt;
2. Wherever&amp;nbsp; you used the pattern like driver.someMethod() you now should use getDriver().someMethod() described in two snippets above. That will make your framework to switch the browsers each time you either log in with new user or call&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;getTestCase().setCurrentUser(existingUserNameHoldingOneOfTheBrowserInstances);&lt;/pre&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-2444596492427361128?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/i_jpLhgCAAI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/2444596492427361128/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2012/02/another-view-on-how-to-simulate-multi.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/2444596492427361128?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/2444596492427361128?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/i_jpLhgCAAI/another-view-on-how-to-simulate-multi.html" title="Another view on how to simulate multi-user interaction in your Selenium 2 scenarios" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2012/02/another-view-on-how-to-simulate-multi.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cNQHczfip7ImA9WhRaE0k.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-71742996076967174</id><published>2012-02-15T15:34:00.000-08:00</published><updated>2012-02-15T15:38:11.986-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-15T15:38:11.986-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Selenium 2" /><title>For those who experience problems with Selenium 2 hovering</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/H4TcmQXbqYhJzgqbVvHtwqNfkEY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/H4TcmQXbqYhJzgqbVvHtwqNfkEY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/H4TcmQXbqYhJzgqbVvHtwqNfkEY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/H4TcmQXbqYhJzgqbVvHtwqNfkEY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
The common practice of simulating mouse hovering in Selenium 2 is to move the mouse cursor to the element located and wrapped with WebElement. This should look like this.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Actions builder = new Actions(driver);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; builder.moveToElement(lookupXPathExists(xPath)).build().perform();&lt;/blockquote&gt;
Where driver is your current WebDriver implementation and&amp;nbsp; lookupXPathExists(xPath) is a kind of procedure returning you the WebElement object by xPath (see my older posts for more details)&lt;br /&gt;
&lt;br /&gt;
However a lot of people trying to apply such the approach for both FF and IE browsers experience the same issue: once your scenario tries to perform some next action after hovering (ex. click the button appeared after you have hovered the element) the hovering gets canceled. &lt;br /&gt;
&lt;br /&gt;
So the only way for us is to wait until &lt;a href="http://code.google.com/p/selenium/issues/detail?id=2067"&gt;this issue&lt;/a&gt; is resolved. Use Chrome driver so far.. :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-71742996076967174?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/xPpk793Ivs8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/71742996076967174/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2012/02/for-those-who-experience-problems-with.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/71742996076967174?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/71742996076967174?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/xPpk793Ivs8/for-those-who-experience-problems-with.html" title="For those who experience problems with Selenium 2 hovering" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2012/02/for-those-who-experience-problems-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEIFQH8yeip7ImA9WhRbGUw.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-4518003461852595089</id><published>2012-02-09T14:33:00.000-08:00</published><updated>2012-02-10T15:28:31.192-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-10T15:28:31.192-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JMeter" /><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Selenium 2" /><title>What is Selenium the worst for (or 'donts' for Selenium)</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7j9j63b6i98lUrLH7Oo5cbb5oSk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7j9j63b6i98lUrLH7Oo5cbb5oSk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7j9j63b6i98lUrLH7Oo5cbb5oSk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7j9j63b6i98lUrLH7Oo5cbb5oSk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
You probably know a lot of cases when selenium will help you a lot and will beat any competitor which means it is really the best solution on the market. However I'd like to share the set of the problems the selenium is better to put away from.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Prepare the base state. If you include the base state preparation procedures in your selenium-based framework, be ready you may get them failed which will cause the test fails as well. That will not mean your product functionality does not work in proper way. That will probably mean your base state generation procedure failed due to some instability which is certainly still the sort of seleniums feature combined with the specifics of http servers or network collisions :)&lt;/li&gt;
&lt;li&gt;Run load testing. You definitely can simulate some load using the selenium just because you can simulate user's work flow with the help of it. Selenium drives the GUI browsers which consumes plenty of resources so even if you use HtmlUnit driver that won't help you much. More over the load generating framework supposes strong discipline of multi-threading beacuse if you have no such one, you may measure your own leaks aka the problems in your framework performance, not of your tested application's. Do not invent the wheel - use JMeter.&lt;/li&gt;
&lt;li&gt;Accuracy testing. Once your web application delivers some analytics you probably will want to automatically check if the values in your tables are correct. That is bad practice for sure. Depending on your browser's locale the numbers may have different representation, so that is might cause the problems in string casting to number formats. The same is true for date and currency date types. Moreover you likely will have to maintain such the tests quite frequently due to HTML dynamic structure changes because in the most cases such the tables are drawn with the help of dedicated GUI framework which may vary the HTML representation slightly keeping GUI look unchanged for the user. And do not forget that being introducing accuracy assertions you will have to make sure your last assertion procedure matches the business logic of&amp;nbsp; the tested application&lt;/li&gt;
&lt;li&gt;Third-party graphics testing like one provided by adobe flash, MS silverlight etc. Use dedicated products to test such the interactions&lt;/li&gt;
&lt;/ul&gt;
So those are the tings I'd not recommend to use selenium for. All other web testing stuff matches selenium capabilities pretty good.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-4518003461852595089?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/vL_e8HSpw8U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/4518003461852595089/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2012/02/what-is-selenium-worst-for.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/4518003461852595089?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/4518003461852595089?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/vL_e8HSpw8U/what-is-selenium-worst-for.html" title="What is Selenium the worst for (or 'donts' for Selenium)" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2012/02/what-is-selenium-worst-for.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEHRn0yeip7ImA9WhRWGEQ.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-567825426942502146</id><published>2012-01-06T15:30:00.000-08:00</published><updated>2012-01-06T15:30:37.392-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-06T15:30:37.392-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="performance" /><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="JMeter" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><title>Understand JMeter RMI properties</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tBKmpLNj9l39iH_gqKwF3aS8o9c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tBKmpLNj9l39iH_gqKwF3aS8o9c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tBKmpLNj9l39iH_gqKwF3aS8o9c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tBKmpLNj9l39iH_gqKwF3aS8o9c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;As you probably know JMeter allows to set up distributed cluster to distribute loading among several peaces of hardware resources. To make it available JMeter uses RMI (remote method invocation) technology. That means jmeter parses the scenario and sends the dedicated commands to the loading nodes (injectors) replicating the scenario among them.&lt;br /&gt;
RMI communication is built over the network. When JMeter master sends the command to injector it sends the command to invoke injector method to the certain port (RMI port) and awaits the execution results back to the own ports it is listening (local port). The local port is usually not a constant and may vary within certain bounds. It might cause the problems when you use firewall rules blocking the port which is chosen by jmeter as the local port. That's why jmeter gives you the capability of setting up such the port number explicitly.&lt;br /&gt;
&lt;br /&gt;
So you will need to configure the following properties which can be found in &lt;jmeter_home&gt;/bin/jmeter.properties (do not forget to remove commenting character #). All this is correct for build 2.5.1 r1177103&lt;/jmeter_home&gt;&lt;br /&gt;
&lt;br /&gt;
server_port=1099&lt;br /&gt;
That means jmeter master will communicate with injectors using this port as default one&lt;br /&gt;
&lt;br /&gt;
server.rmi.localport=4000&lt;br /&gt;
This parameter is responsible for setting up the port the client (master node) will get the responses from servers (slaves aka injectors).&lt;br /&gt;
&lt;br /&gt;
You may also find the parameter&amp;nbsp;&lt;u&gt;&lt;b&gt;server.rmi.port&lt;/b&gt;&lt;/u&gt;&amp;nbsp;but it actually does nothing (according to jmeter source code) and is overwritten with server_port parameter in case it is uncommented and has non-zero value when jmeter starts as the server.&lt;br /&gt;
&lt;br /&gt;
The one important thing to know: always specify remote_hosts parameter (on the client side) with the servers in following notation: SERVER_NAME:SERVER_PORT where SERVER_PORT is the one set up with server_port parameter on the certain server (aka slave aka injector). The build I have used for this post (see above) had the defect (aka undocumented feature) in node looking up procedure in the registry.&lt;br /&gt;
&lt;br /&gt;
That seems to be it.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-567825426942502146?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/zPvQIYRDLyo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/567825426942502146/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2012/01/understand-jmeter-rmi-properties.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/567825426942502146?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/567825426942502146?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/zPvQIYRDLyo/understand-jmeter-rmi-properties.html" title="Understand JMeter RMI properties" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2012/01/understand-jmeter-rmi-properties.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYNSH89fip7ImA9WhRXFEs.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-6510729943644822415</id><published>2011-12-21T02:43:00.000-08:00</published><updated>2011-12-21T02:43:19.166-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-21T02:43:19.166-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="performance" /><category scheme="http://www.blogger.com/atom/ns#" term="ANT" /><category scheme="http://www.blogger.com/atom/ns#" term="processes" /><title>Check your build procedure performance</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OsGTzqozMTDCqD8Ki4MtbA-35h8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OsGTzqozMTDCqD8Ki4MtbA-35h8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OsGTzqozMTDCqD8Ki4MtbA-35h8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OsGTzqozMTDCqD8Ki4MtbA-35h8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Starting the work with legacy ant-based builders check the performance of the executed tasks and targets obligatory. The experience shows that there can be a lot of redundant operations there so removing them you can reach significant performance increasing. The best way to measure the ant build procedure performance is to use third-party listeners like &lt;a href="http://ant-contrib.sourceforge.net/tasks/tasks/performance_monitor.html"&gt;this&lt;/a&gt;&amp;nbsp;or to write your own.&lt;div&gt;Just introduce&amp;nbsp;&lt;b style="text-decoration: underline;"&gt;-listener fully.qualified.class.name&lt;/b&gt;&amp;nbsp;option into your build.bat ant calling or specify it in your IDE execution context.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-6510729943644822415?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/GTn_qV6Z304" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/6510729943644822415/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/12/check-your-build-procedure-performance.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/6510729943644822415?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/6510729943644822415?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/GTn_qV6Z304/check-your-build-procedure-performance.html" title="Check your build procedure performance" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/12/check-your-build-procedure-performance.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8NSH86fCp7ImA9WhRRGEk.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-1966392525627910145</id><published>2011-12-02T09:28:00.000-08:00</published><updated>2011-12-02T09:28:19.114-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-02T09:28:19.114-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="antipattern" /><category scheme="http://www.blogger.com/atom/ns#" term="pattern" /><title>Antipatterns</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/iVhDELMnIHiK-IEBDzsSfauI3pE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iVhDELMnIHiK-IEBDzsSfauI3pE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/iVhDELMnIHiK-IEBDzsSfauI3pE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iVhDELMnIHiK-IEBDzsSfauI3pE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Very interesting article &lt;a href="http://en.wikipedia.org/wiki/Antipattern"&gt;here&lt;/a&gt;. Personally I found a lot of so called anti patterns being used in my work. That's the chance to change my mind and change my efficiency. Probably yours as well :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-1966392525627910145?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/NgUXGYR_n68" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/1966392525627910145/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/12/antipatterns.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/1966392525627910145?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/1966392525627910145?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/NgUXGYR_n68/antipatterns.html" title="Antipatterns" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/12/antipatterns.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkINQnw6eip7ImA9WhRaE0g.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-2902417100180103744</id><published>2011-11-30T15:29:00.000-08:00</published><updated>2012-02-15T16:03:13.212-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-15T16:03:13.212-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><category scheme="http://www.blogger.com/atom/ns#" term="pattern" /><category scheme="http://www.blogger.com/atom/ns#" term="Selenium 2" /><title>Another robust way of how to locate ajax elements using Selenium 2 + webdriver</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Ofkb4wxl6XhTnDTWrt_k1ZU1N2s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ofkb4wxl6XhTnDTWrt_k1ZU1N2s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Ofkb4wxl6XhTnDTWrt_k1ZU1N2s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ofkb4wxl6XhTnDTWrt_k1ZU1N2s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Once you're going to test somehow complicated web-site you should investigate the way of what to consider as the succeess of your another action?&lt;br /&gt;
&lt;br /&gt;
As it looks to me we have two kinds of success indicators of our action on UI&lt;br /&gt;
1. You boserve the element that is expected to be displayed (ex.: you're clicking the button and expect to see the dialog)&lt;br /&gt;
2. You do not observe the element that is not expected to be displayed. (ex.: you're closing the dialog and expect it disappears)&lt;br /&gt;
&lt;br /&gt;
Also you should take into account that the elements on your page may appear and disappear without page re-loading.&amp;nbsp;That's why I'd like to suggest the following design addressing such the points:&lt;br /&gt;
&lt;br /&gt;
Introduce two methods:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;public WebElement lookupXPathExists(String xpath) throws MyAutomationException{
  WebElement handledElement = repeatableLookupExists(xpath);
  if (handledElement!=null) {
   return handledElement;
  } else {
   throw new MyAutomationException("Lookup for element ["
     + xpath + "]" + " failed after "
     + AWAITING_THRESHOLD_MS + " ms awaiting.");
   
  }
 }
 
 public boolean lookupXPathDoesNotExist(String xpath) throws MyAutomationException {
  if (repeatableLookupDoesNotExist(xpath)) {
   return true;
  }else{
   throw new MyAutomationException("The xpath ["+xpath+"] is still observed after "+AWAITING_THRESHOLD_MS + " ms awaiting.");
  }
 }
&lt;/pre&gt;
&lt;br /&gt;
Where&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: monospace; white-space: pre;"&gt;AWAITING_THRESHOLD_MS &lt;/span&gt;is static final variable holding the period you'd like to wait until the element will appear. The first method returns the element found using your locator. The second one just checks if the element you're searching does not present on the page. Both of them call their repeatable helpers which are shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;
private void validateFoundElements(List&amp;lt;webelement&amp;gt; elementList) throws SeleniumException{
  
  MyTestCase.logger.debug(testCase.wrapMessage("Validating found elements..."));
  
  if(elementList.isEmpty()){
   throw new SeleniumException("Cant find specified element..");
  }
  
  if(countVisibleItems(elementList) &amp;gt; 1){
   throw new SeleniumException("Specified xpath found several elements. Please concretize.");
  }
 }
 
 private int countVisibleItems(List&amp;lt;webelement&amp;gt; elementList){
  int visibleItemsNumber = 0;
  for(WebElement element: elementList){
   if(element.isDisplayed()){
    visibleItemsNumber++;
   }
  }
  return visibleItemsNumber;
 }
 
 private WebElement repeatableLookupExists(String xpath) {
  long start = System.currentTimeMillis();
  while (true) {
   try{
    List&amp;lt;webelement&amp;gt; listOfFoundElements = driver.findElements(By.xpath(xpath));
    validateFoundElements(listOfFoundElements);
    if(driver.findElement(By.xpath(xpath)).isDisplayed()){
     MyTestCase.logger.debug(testCase.wrapMessage("Found xPath [" + xpath + "]. Creating object.."));
     return driver.findElement(By.xpath(xpath));
    }
   }catch(SeleniumException se){
    try {
     Thread.sleep(AWAITING_UNIT_LENGTH_MS);
     MyTestCase.logger.debug(testCase.wrapMessage("Searching xPath [" + xpath + "]. Retry.."));
    } catch (InterruptedException e) {
     e.printStackTrace();
    }
   }
   if (System.currentTimeMillis()-start &amp;gt; AWAITING_THRESHOLD_MS){
    break;
   }
  }
  Statistics.totalLatency += System.currentTimeMillis() - start;
  return null;
 }

 private boolean repeatableLookupDoesNotExist(String xpath) {
  long start = System.currentTimeMillis();
  while (true) {
   boolean isPresent = driver.findElements(By.xpath(xpath)).isEmpty() ? false : true;
   if (!isPresent) {
    Statistics.totalLatency += System.currentTimeMillis() - start;
    MyTestCase.logger.debug(testCase.wrapMessage("Not found xPath [" + xpath + "]. Success.."));
    return true;
   }
   else{
    if(countVisibleItems(driver.findElements(By.xpath(xpath)))==0){
     MyTestCase.logger.debug(testCase.wrapMessage("Found xPath [" + xpath + "]. However it is not visible. Success.."));
     return true;
    }
    try {
     Thread.sleep(AWAITING_UNIT_LENGTH_MS);
     MyTestCase.logger.debug(testCase.wrapMessage("XPath [" + xpath + "] still can be found. Retry.."));
     if (System.currentTimeMillis()-start &amp;gt; AWAITING_THRESHOLD_MS){
      break;
     }
    } catch (InterruptedException e) {
     e.printStackTrace();
    }
   }
  }
  Statistics.totalLatency += System.currentTimeMillis() - start;
  return false;
 }

&lt;/pre&gt;
Where AWAITING_UNIT_LENGTH_MS is final variable saying how often you'd like to check if the element appeared/disappeared.&lt;br /&gt;
That is how the solution work. The only thing you should always remember about is that once you want to check if the element is not present on the page and you realize that it isn't you should make sure it is not visible on the page because of the proper working of the tested product but not because of the page hasn't been completely loaded. To make that sure try to determine the checking element that should be obligatory visible while that one you do not expect to see isn't. So use the following pattern to ensure the element is not visible as expected:&lt;br /&gt;
1. lookupXPathExists("xpath of the element saying the page is loaded")&lt;br /&gt;
2. lookupXPathDoesNotExist("xpath you're expecting not to see on the page").&lt;br /&gt;
&lt;br /&gt;
That is it.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-2902417100180103744?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/POkCf7wlUXo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/2902417100180103744/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/11/another-robust-way-of-how-to-locate.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/2902417100180103744?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/2902417100180103744?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/POkCf7wlUXo/another-robust-way-of-how-to-locate.html" title="Another robust way of how to locate ajax elements using Selenium 2 + webdriver" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/11/another-robust-way-of-how-to-locate.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQBR3g7fSp7ImA9WhdaFk4.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-2740865231588183145</id><published>2011-10-26T06:05:00.000-07:00</published><updated>2011-10-26T06:05:56.605-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-26T06:05:56.605-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tools" /><category scheme="http://www.blogger.com/atom/ns#" term="services" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><title>Log on failure for specific user after configuring service via sc.exe</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ESfXGR8l3DJmiWvphgfJ3Ag8LfM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ESfXGR8l3DJmiWvphgfJ3Ag8LfM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ESfXGR8l3DJmiWvphgfJ3Ag8LfM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ESfXGR8l3DJmiWvphgfJ3Ag8LfM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Solution&lt;br /&gt;
&lt;br /&gt;
On the host where the service should be running start gpedit.msc. Expand "[Local Computer Policy]\[Windows Settings]\[Security Settings]\[Local Policies]". Click [User Rights Assignment].&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-NMBtHxAqNvE/TqgFLRnMxUI/AAAAAAAAACQ/k9Z6DSHzPQY/s1600/policies.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="155" src="http://3.bp.blogspot.com/-NMBtHxAqNvE/TqgFLRnMxUI/AAAAAAAAACQ/k9Z6DSHzPQY/s320/policies.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
On the right-hand pane double-click the "Log on as a service" policy.&lt;br /&gt;
Add the user on behalf of which you're going to run the service. Apply the changes.&lt;br /&gt;
&lt;br /&gt;
That's it&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-2740865231588183145?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/0rZiJNcGuec" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/2740865231588183145/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/10/log-on-failure-for-specific-user-after.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/2740865231588183145?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/2740865231588183145?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/0rZiJNcGuec/log-on-failure-for-specific-user-after.html" title="Log on failure for specific user after configuring service via sc.exe" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-NMBtHxAqNvE/TqgFLRnMxUI/AAAAAAAAACQ/k9Z6DSHzPQY/s72-c/policies.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/10/log-on-failure-for-specific-user-after.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUAEQX88fip7ImA9WhdaEU0.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-6999647706186451128</id><published>2011-10-20T03:48:00.000-07:00</published><updated>2011-10-20T03:48:20.176-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-20T03:48:20.176-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ANT" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><category scheme="http://www.blogger.com/atom/ns#" term="log4j" /><title>Ant replaceregexp example against the requirement to customize log4j e-mails</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OfbGD5bA_h4px_QX0djaWtkSdmE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OfbGD5bA_h4px_QX0djaWtkSdmE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OfbGD5bA_h4px_QX0djaWtkSdmE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OfbGD5bA_h4px_QX0djaWtkSdmE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Requirement:&lt;br /&gt;
 - to customize log4j.xml so that all the e-mails are changed to some custom one&lt;br /&gt;
 - facility: ANT tool&lt;br /&gt;
&lt;br /&gt;
However there was lack of examples of replaceregexp ant task on the ant official page. So here is one extra example that addresses the following functional requirements&lt;br /&gt;
- replace all the entities like &lt;br /&gt;
&lt;pre class="brush: xml"&gt;&lt;some_tag&gt;old@yourdomain.com&lt;/some_tag&gt;&lt;/pre&gt; so that old is replaced with new&lt;br /&gt;
- replace all the entities like &lt;pre class="brush: xml"&gt;&lt;property name="somename" value="old@yourdomain.com"/&gt;&lt;/pre&gt;so that old is replaced with new&lt;br /&gt;
&lt;br /&gt;
The solution is below:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: xml"&gt;  &amp;lt;target name="customize"&amp;gt;
   &amp;lt;replaceregexp byline="true"&amp;gt;
    &amp;lt;fileset dir="${BUILD_ROOT}" id="build_root_dir"&amp;gt;
     &amp;lt;include name="**/log4j.xml" /&amp;gt;
    &amp;lt;/fileset&amp;gt;
    &amp;lt;regexp pattern="(.*?&amp;amp;gt;).+?(@yourdomain\.com.*)"/&amp;gt;
    &amp;lt;substitution expression="\1${reciever-alias-to-substitute}\2" /&amp;gt;
   &amp;lt;/replaceregexp&amp;gt;
   &amp;lt;replaceregexp byline="true"&amp;gt;
    &amp;lt;fileset dir="${BUILD_ROOT}" id="build_root_dir"&amp;gt;
     &amp;lt;include name="**/log4j.xml" /&amp;gt;
    &amp;lt;/fileset&amp;gt;
    &amp;lt;regexp pattern="(.*?value\=&amp;amp;quot;).+?(@yourdomain\.com&amp;amp;quot;.*)"/&amp;gt;
    &amp;lt;substitution expression="\1${reciever-alias-to-substitute}\2" /&amp;gt;
   &amp;lt;/replaceregexp&amp;gt;
  &amp;lt;/target&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
As you can see here it is used two replaceregexp tasks. It is done because unfortunately replaceregexp does not support several patterns inside, so once we need to process the files with two different patterns we should use two different replaceregexp tasks.&lt;br /&gt;
&lt;br /&gt;
The one more thing it is useful to know is that you should use backslash symbol to specify which group (for the set located by your regular expression) you are going to use. In the example above I use two groups. The whole part of the string before original e-mail and the one after that. Then I'm saying to Ant that I'd like to preserve those strings \1 and \2 but change only the string between them.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-6999647706186451128?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/aIBjv8h1umg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/6999647706186451128/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/10/ant-replaceregexp-example-against.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/6999647706186451128?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/6999647706186451128?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/aIBjv8h1umg/ant-replaceregexp-example-against.html" title="Ant replaceregexp example against the requirement to customize log4j e-mails" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/10/ant-replaceregexp-example-against.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0ECQnYycSp7ImA9WhdVFkk.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-1468952330624240140</id><published>2011-09-21T14:47:00.000-07:00</published><updated>2011-09-21T14:47:43.899-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-21T14:47:43.899-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="QA" /><category scheme="http://www.blogger.com/atom/ns#" term="Waterfall" /><category scheme="http://www.blogger.com/atom/ns#" term="processes" /><category scheme="http://www.blogger.com/atom/ns#" term="SCRUM" /><title>QA under scrum in long-term project</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZAqQ0ncyfTOq51-aJJND0g4lRgQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZAqQ0ncyfTOq51-aJJND0g4lRgQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZAqQ0ncyfTOq51-aJJND0g4lRgQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZAqQ0ncyfTOq51-aJJND0g4lRgQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;A lot of software development teams move to scrum not just because the reality requires so.. I mean not because they cannot work effectively under some other methodology. They move just because that's the world trend and because Google does so :)&lt;br /&gt;
I've been working under scrum for more than a year and have been watching the successes and the fails and also have been comparing the product quality progress between the classical waterfall we had before and the scrum we're working under now.&lt;br /&gt;
So.. the obvious thing is that scrum is pretty much suitable for short-term projects only. That means it is the best methodology if only you should not put a lot of efforts for addressing legacy problems like regression testing and so on. Otherwise you will have to fix bugs instead of delivering product value to the customer.&lt;br /&gt;
The second thing I'd like to highlight is the role of QA under scrum. Theoretically scrum team should have cross-functional nature and there should not be test engineers or development engineers but everyone knows that's pretty much hard to form such the team. Especially if you're putting your processes from waterfall to agile rails. &lt;br /&gt;
And I was thinking a lot..  About the best way to use QA specialists in scrum. About how to gain the most value from their skills and simultaneously not to move too far away from scrum? And what I what I've come to is here.&lt;br /&gt;
The best way to use the skills capabilities of QA guys in scrum is to create a kind of the layer between the iteration outcomes and the customer. Classical scrum supposes delivering the value to the customer at the end of each iteration. Then following the classical approach the team should use the customer feedback to adjust the product if the feedback takes place. I think I will be useful to introduce to types of iteration result demonstrations. First demo should be delivered to QA layer. Once it is done the QA department takes some time to certify the quality of the product. That looks like the classical testing however it may provide the feedback faster and more understandable for the team than the customer usually does.&lt;br /&gt;
After the team addresses the feedback of QA layer it may deliver the finalized results to the real customer or stakeholder. In such the way the delivered product will keep less bugs as it passes the QA processes and will not annoy the customer providing the results they do not expect to see. That will be supported by the classical relationships (which work under waterfall) between QA, customer and owner of the requirements. &lt;br /&gt;
This is what I'm thinking about. Will it be working or not..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-1468952330624240140?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/ahUqATbpUaU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/1468952330624240140/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/09/qa-under-scrum-in-long-term-project.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/1468952330624240140?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/1468952330624240140?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/ahUqATbpUaU/qa-under-scrum-in-long-term-project.html" title="QA under scrum in long-term project" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/09/qa-under-scrum-in-long-term-project.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cNRXo4eSp7ImA9WhdVFE4.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-8962965535362253603</id><published>2011-09-19T04:18:00.000-07:00</published><updated>2011-09-19T04:18:14.431-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-19T04:18:14.431-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="performance" /><category scheme="http://www.blogger.com/atom/ns#" term="tools" /><category scheme="http://www.blogger.com/atom/ns#" term="JMeter" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><title>JMeter server does not send back the sampler results on Ubuntu linux</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_AvnLyOYFHUPxdQn4BNo3MfS-Y4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_AvnLyOYFHUPxdQn4BNo3MfS-Y4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_AvnLyOYFHUPxdQn4BNo3MfS-Y4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_AvnLyOYFHUPxdQn4BNo3MfS-Y4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Trying to simulate distributed JMeter configuration over the virtual hosts network (virtualbox) I facedd the set of problems caused by the fact that JMeter does not correctly determine the ip address of the hosts it'r running at. For example I could not even connect to jmeter-server because it considered the local address as the localhost (127.0.0.1). Short investigation showed that the solution is placed inside the jmeter-server file. It says:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;# If the client fails with:&lt;br /&gt;
# ERROR - jmeter.engine.ClientJMeterEngine: java.rmi.ConnectException: Connection refused to host: 127.0.0.1&lt;br /&gt;
# then it may be due to the server host returning 127.0.0.1 as its address &lt;br /&gt;
&lt;br /&gt;
# One way to fix this is to define RMI_HOST_DEF below&lt;br /&gt;
#RMI_HOST_DEF=-Djava.rmi.server.hostname=xxx.xxx.xxx.xxx&lt;br /&gt;
&lt;br /&gt;
${DIRNAME}/jmeter ${RMI_HOST_DEF} -Dserver_port=${SERVER_PORT:-1099} -s -j jmeter-server.log "$@"&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
So uncommenting the RMI_HOST_DEF parameter and specifying the correct address solved the problem. However there were another one. When I ran the scenario I observed the errors in jmeter-server log file. It said the server couln't send back the sampler results as it tried to  send it to 127.0.0.1. I couldn't find any solution in jmeter forums so I just applied the same one from jmeter-server to jmeter client.&lt;br /&gt;
&lt;br /&gt;
So one should just edit the jmeter client execution linux bash script so that the last two lines will look like this:&lt;br /&gt;
&lt;blockquote&gt;RMI_HOST_DEF=-Djava.rmi.server.hostname=xxx.xxx.xxx.xxx&lt;br /&gt;
java $ARGS $JVM_ARGS $RMI_HOST_DEF -jar `dirname $0`/ApacheJMeter.jar "$@"&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
Where xxx.xxx.xxx.xxx should keep the ip address you're running your jmeter client at.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-8962965535362253603?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/ApNV6hrdLXI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/8962965535362253603/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/09/jmeter-server-does-not-send-back.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/8962965535362253603?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/8962965535362253603?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/ApNV6hrdLXI/jmeter-server-does-not-send-back.html" title="JMeter server does not send back the sampler results on Ubuntu linux" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/09/jmeter-server-does-not-send-back.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYEQ38_eSp7ImA9WhdXEUQ.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-72015513287233811</id><published>2011-08-24T06:44:00.000-07:00</published><updated>2011-08-24T06:55:02.141-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-24T06:55:02.141-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="perforce" /><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="pattern" /><title>P4 Java API. How to work with temporary clients.</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/glxbRxy1eY7_g6Mns5JI1ilKKUM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/glxbRxy1eY7_g6Mns5JI1ilKKUM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/glxbRxy1eY7_g6Mns5JI1ilKKUM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/glxbRxy1eY7_g6Mns5JI1ilKKUM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;There is not a lot of information about perforce Java API. However you may find the examples of how to apply the common use cases in your code. I tried to touch surrounding cases and faced the problem that had been resolved with the only decompilation help.&lt;br /&gt;
&lt;br /&gt;
So assume you do not want to use the existing client and you do want to use the temporary one. How to address such the requirement. Here is the code from me.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;package ar.p4apihelpers;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;
import java.util.UUID;

import com.perforce.p4java.client.IClient;
import com.perforce.p4java.core.IMapEntry.EntryType;
import com.perforce.p4java.core.file.FileSpecBuilder;
import com.perforce.p4java.core.file.IFileSpec;
import com.perforce.p4java.exception.P4JavaException;
import com.perforce.p4java.impl.generic.client.ClientView;
import com.perforce.p4java.impl.generic.client.ClientView.ClientViewMapping;
import com.perforce.p4java.impl.mapbased.client.Client;
import com.perforce.p4java.server.IServer;
import com.perforce.p4java.server.IServerInfo;
import com.perforce.p4java.server.ServerFactory;

public class P4APISyncUp{
	public static void main(String[] args) throws URISyntaxException, IOException, P4JavaException {
		// Generating the files to sync-up
		String[] pathsUnderDepot = new String[]{
				"//depot/path1/file1.java#head",
				"//depot/path1/file2.java#head",
				"//depot/path1/path2/file1.java#head"
		};
		// Instantiating the server
		IServer p4Server = ServerFactory.getServer("p4java://p4.fakeserver.com:1666", null);
		p4Server.connect();
		// Authorizing
		p4Server.setUserName("secretname");
		p4Server.login("secretpassword");
		// Just check you are connected successfully
		IServerInfo serverInfo = p4Server.getServerInfo();
		System.out.println(serverInfo.getServerLicense());
		// Creating new client
		IClient tempClient = new Client();
		// Setting up the name and the root folder
		tempClient.setName("tempClient" + UUID.randomUUID().toString().replace("-", ""));
		tempClient.setRoot("c:/temp");
		tempClient.setServer(p4Server);
		// Setting the client as the current one for the server
		p4Server.setCurrentClient(tempClient);
		// Creating Client View entry
		ClientViewMapping tempMappingEntry = new ClientViewMapping();
		// Setting up the mapping properties
		tempMappingEntry.setLeft("//depot/...");
		tempMappingEntry.setRight("//" + tempClient.getName() + "/...");
		tempMappingEntry.setType(EntryType.INCLUDE);
		// Creating Client view
		ClientView tempClientView = new ClientView();
		// Attaching client view entry to client view
		tempClientView.addEntry(tempMappingEntry);
		tempClient.setClientView(tempClientView);
		// Registering the new client on the server
		System.out.println(p4Server.createClient(tempClient));
		// Surrounding the underlying block with try as we want some action
		// (namely client removing) to be performed in any way 
		try{
			// Forming the FileSpec collection to be synced-up
			List&amp;lt;ifilespec&amp;gt; fileSpecsSet = FileSpecBuilder.makeFileSpecList(pathsUnderDepot);
			// Syncing up the client
			tempClient.sync(FileSpecBuilder.getValidFileSpecs(fileSpecsSet), true, false, false, false);
		}finally{
			// Removing the temporary client from the server
			System.out.println(p4Server.deleteClient(tempClient.getName(), false));
		}
	}
}

&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
Please point the attention to the lines #42 and #50 of this code. Forgetting to call #42 leads to the following exception on execution #64:&lt;br /&gt;
&lt;blockquote&gt;Exception in thread "main" java.lang.NullPointerException&lt;br /&gt;
at com.perforce.p4java.impl.mapbased.client.Client.sync(Client.java:496)&lt;br /&gt;
at com.perforce.p4java.impl.mapbased.client.Client.sync(Client.java:477)&lt;br /&gt;
at ar.p4apihelpers.P4APISyncUp.main&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
If you forget to call #50 you will get the exception like this:&lt;br /&gt;
&lt;blockquote&gt;Exception in thread "main" com.perforce.p4java.exception.RequestException: Error in client specification.&lt;br /&gt;
Error detected at line 10.&lt;br /&gt;
Null directory (//) not allowed in 'null//depot/...'.&lt;br /&gt;
&lt;br /&gt;
at com.perforce.p4java.impl.mapbased.server.Server.handleErrorStr(Server.java:3834)&lt;br /&gt;
at com.perforce.p4java.impl.mapbased.server.Server.createClient(Server.java:2099)&lt;br /&gt;
at ar.p4apihelpers.P4APISyncUp.main&lt;br /&gt;
&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-72015513287233811?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/HwQLHr6z8yc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/72015513287233811/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/08/p4-java-api-how-to-work-with-temporary.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/72015513287233811?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/72015513287233811?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/HwQLHr6z8yc/p4-java-api-how-to-work-with-temporary.html" title="P4 Java API. How to work with temporary clients." /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/08/p4-java-api-how-to-work-with-temporary.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkINQXg_fCp7ImA9WhdQFEk.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-722406929741892452</id><published>2011-08-15T15:49:00.000-07:00</published><updated>2011-08-15T15:49:50.644-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-15T15:49:50.644-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="challenge" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><category scheme="http://www.blogger.com/atom/ns#" term="epic-fail" /><category scheme="http://www.blogger.com/atom/ns#" term="SCRUM" /><title>Plans and others</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YHXyI-b8kpF3feLb6MKv9dwstrI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YHXyI-b8kpF3feLb6MKv9dwstrI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YHXyI-b8kpF3feLb6MKv9dwstrI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YHXyI-b8kpF3feLb6MKv9dwstrI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Statistical Process Control techniques look pretty much promising for SCRUM-AROUND epics planning.. I'm going to investigate it.&lt;br /&gt;
&lt;br /&gt;
Also new tag 'epic-fail' starts from today. I'll be looking through some web-sites of well-known companies and will find the in-site bugs showing the lack of auto-testing :) as well as the importance of that.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-722406929741892452?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/DwXT_8e6MUs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/722406929741892452/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/08/plans-and-others.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/722406929741892452?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/722406929741892452?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/DwXT_8e6MUs/plans-and-others.html" title="Plans and others" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/08/plans-and-others.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUMRX4-eyp7ImA9WhdQEkg.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-1088610567910536048</id><published>2011-08-13T09:34:00.000-07:00</published><updated>2011-08-13T09:34:44.053-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-13T09:34:44.053-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><category scheme="http://www.blogger.com/atom/ns#" term="disadvantages" /><category scheme="http://www.blogger.com/atom/ns#" term="Selenium 2" /><title>Selenium 2 tried released version</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5L-gyviSAXCmr4DAjIwZrOepMXw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5L-gyviSAXCmr4DAjIwZrOepMXw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5L-gyviSAXCmr4DAjIwZrOepMXw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5L-gyviSAXCmr4DAjIwZrOepMXw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Okay. AFAIR I said that selenium 2 was not ready for enterprise testing. That time I used either beta or even alpha version of the webdriver. So today I decided to check out what's been changed since that time and probably to unsay :)&lt;br /&gt;
However I still cant do that :) What does prevent me now? First of all there is still lack of multiple-browser support. Internet explorer driver couldn't see the input elements for some reason however other drivers did so I couldn't even log in. Opera driver cant close the browser window on the test shut-down... So the latest build version is pretty much raw yet. Still don't recommend to move your frameworks to WebDriver.&lt;br /&gt;
&lt;br /&gt;
 &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-1088610567910536048?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/Pp5eSA5yDyk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/1088610567910536048/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/08/selenium-2-tried-released-version.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/1088610567910536048?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/1088610567910536048?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/Pp5eSA5yDyk/selenium-2-tried-released-version.html" title="Selenium 2 tried released version" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/08/selenium-2-tried-released-version.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUEMQHo-eCp7ImA9WhdQEEQ.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-6039265167113686217</id><published>2011-08-11T14:16:00.000-07:00</published><updated>2011-08-11T14:21:21.450-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-11T14:21:21.450-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="challenge" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><title>About the technologies and the methodologies</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/20DPQLLPmA7LMBQQNMgZpM0inzA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/20DPQLLPmA7LMBQQNMgZpM0inzA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/20DPQLLPmA7LMBQQNMgZpM0inzA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/20DPQLLPmA7LMBQQNMgZpM0inzA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Technologies deprave. When there were no technologies (like ones we know now) every process tended to be optimized. They optimized everything and everywhere. The efficiency of time consumption was one of the domains everyone paid the most of attention to (even the amateur). The last decade passed under the slogan "everything that could be invented had been invented". &lt;br /&gt;
So, I wonder where are new conceptions? Where are new paradigms? Every piece of efficiency increasing that takes place nowadays takes place at the expense of the technical progress but not of the progress of the theories, methodologies or approaches. The more powerful computers became available so the need of optimization of calculation procedures disappeared. The Internet become available so the need of optimization of advertising campaigns disappeared as well as the optimization of the consumer properties. Oil became available so the need of optimization of investments disappeared..&lt;br /&gt;
That's pretty much a pity... However that's seems to be the specific of the present.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-6039265167113686217?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/GhZNvoN-mMU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/6039265167113686217/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/08/about-technologies-and-methodologies.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/6039265167113686217?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/6039265167113686217?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/GhZNvoN-mMU/about-technologies-and-methodologies.html" title="About the technologies and the methodologies" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/08/about-technologies-and-methodologies.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YDQHY_eCp7ImA9WhdTGUU.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-3458521493667302047</id><published>2011-07-18T03:21:00.000-07:00</published><updated>2011-07-18T03:32:51.840-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-18T03:32:51.840-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tools" /><title>How to introduce code highlighting into sharepoint wiki articles</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Qh60vEQXgtIA9LeB1h6VJt0Ie9c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Qh60vEQXgtIA9LeB1h6VJt0Ie9c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Qh60vEQXgtIA9LeB1h6VJt0Ie9c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Qh60vEQXgtIA9LeB1h6VJt0Ie9c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Thats pretty much simple actually. To support highlighting I use &lt;a href="http://alexgorbatchev.com/SyntaxHighlighter/"&gt;SyntaxHighlighter &lt;/a&gt; and SharepointDesigner. The goal is to attach the styles and and the jscript to the heading page and finally to execute the highligher code once the page is uploaded. All of the described relates to sharepoint 2007 (free to downlod from Microsoft site). That is also applicable to the version '10 - the only difference is the master page's file name to process. &lt;br /&gt;
&lt;br /&gt;
So here is the set of simple steps to apply the syntaxhighlighter to the master page of your sharepoint site so that all other pages will take that changes as well&lt;br /&gt;
&lt;br /&gt;
0. Download SyntaxHighlighter files to your workstation so that you can to upload them ato your site in future.&lt;br /&gt;
1. Start Sharepoint designer and connect to your site. You should now work with Folder List pane.&lt;br /&gt;
2. Create folder to keep your SytaxHighlighter files (ex.: __codeHighlighter)&lt;br /&gt;
3. Create subfolders for javaScript files and CSS files (actually I keep CSS right under __codeHighlighter but js files under the separate folder __codeHighlighter/js)&lt;br /&gt;
4. Upload shCore.css and shThemeDefault.css to __codeHighlighter folder&lt;br /&gt;
5. shCore.js and the set of brush files (shBrush*.js) to __codeHighlighter.js&lt;br /&gt;
6. Find the master page file. For SP'07 try to find it under _catalogs/masterpage. You should see default.master file there.&lt;br /&gt;
7. Copy and paste that file to the same folder. It will get the name like default_copy(1).master. &lt;br /&gt;
8. Open that file. Now we should introduce some changes into the source code of the master page (middle area of the web page editor)&lt;br /&gt;
9. Paste the following code right before &amp;lt;/HEAD&amp;gt; tag somewhere at the very top of the page (you should only specify the brush files you do use). &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;script type="text/javascript" src="pathToYourSite/__codeHighlighter/js/shCore.js"&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type="text/javascript" src="pathToYourSite/__codeHighlighter/js/shBrushJava.js"&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type="text/javascript" src="pathToYourSite/__codeHighlighter/js/shBrushCpp.js"&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type="text/javascript" src="pathToYourSite/__codeHighlighter/js/shBrushCss.js"&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type="text/javascript" src="pathToYourSite/__codeHighlighter/js/shBrushDiff.js"&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type="text/javascript" src="pathToYourSite/__codeHighlighter/js/shBrushGroovy.js"&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type="text/javascript" src="pathToYourSite/__codeHighlighter/js/shBrushJScript.js"&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type="text/javascript" src="pathToYourSite/__codeHighlighter/js/shBrushPlain.js"&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type="text/javascript" src="pathToYourSite/__codeHighlighter/js/shBrushRuby.js"&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type="text/javascript" src="pathToYourSite/__codeHighlighter/js/shBrushSql.js"&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type="text/javascript" src="pathToYourSite/__codeHighlighter/js/shBrushXml.js"&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type="text/javascript" src="pathToYourSite/__codeHighlighter/js/shBrushBatch.js"&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;link href="pathToYourSite/__codeHighlighter/shCore.css" rel="stylesheet" type="text/css"&amp;gt;&amp;lt;/link&amp;gt;
 &amp;lt;link href="pathToYourSite/__codeHighlighter/shThemeDefault.css" rel="stylesheet" type="text/css"&amp;gt;&amp;lt;/link&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
10. Paste the following code right before &amp;lt;/HTML&amp;gt; tag (at the very bottom of the page)&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;script language="javascript"&amp;gt;   
        SyntaxHighlighter.all();   
 &amp;lt;/script&amp;gt; 
&lt;/pre&gt;&lt;br /&gt;
11. Save the changes.&lt;br /&gt;
12. Right click on that you new master page file and choose Set as Default Master Page.&lt;br /&gt;
&lt;br /&gt;
You are now ready to highlight the code. Create any wiki page. In the reach editor switch to the source view. Add the code according to &lt;a href="http://alexgorbatchev.com/SyntaxHighlighter/manual/installation.html"&gt;SyntaxHighlighter examples&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-KsPN2qEe5Lk/TiQLwT14PwI/AAAAAAAAACM/VOgBG3VdKrQ/s1600/wiki%2Bexample.PNG" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="249" width="320" src="http://4.bp.blogspot.com/-KsPN2qEe5Lk/TiQLwT14PwI/AAAAAAAAACM/VOgBG3VdKrQ/s320/wiki%2Bexample.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You're done&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-3458521493667302047?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/X9TMCbQrSf8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/3458521493667302047/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/07/how-to-introduce-code-highlighting-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/3458521493667302047?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/3458521493667302047?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/X9TMCbQrSf8/how-to-introduce-code-highlighting-in.html" title="How to introduce code highlighting into sharepoint wiki articles" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-KsPN2qEe5Lk/TiQLwT14PwI/AAAAAAAAACM/VOgBG3VdKrQ/s72-c/wiki%2Bexample.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/07/how-to-introduce-code-highlighting-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8DQHY-eip7ImA9WhdTEU8.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-4527069672940121536</id><published>2011-07-08T03:27:00.000-07:00</published><updated>2011-07-08T03:27:51.852-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-08T03:27:51.852-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><category scheme="http://www.blogger.com/atom/ns#" term="pattern" /><category scheme="http://www.blogger.com/atom/ns#" term="Selenium RC" /><title>Custom way to look-up ajax elements in Selenium. Pattern.</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MO8uMLzSi0YFzr32kRfPpBENQy4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MO8uMLzSi0YFzr32kRfPpBENQy4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MO8uMLzSi0YFzr32kRfPpBENQy4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MO8uMLzSi0YFzr32kRfPpBENQy4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Hi!&lt;br /&gt;
&lt;br /&gt;
Looking through a lot of forums I noticed that some people face problems when use native selenium instructions to wait for element appearance on the page. That become pretty big problem when we're talking about dynamic HTML content. In my practice I met the close problems and the way I resolved them is the following pattern. This class controls the look-up procedures on the page. I designed to be capable to configure the duration and number of repeat lookups depending on the channel bandwidth and other factors. Also it has the method allowing us to wait while the required element disappears. That is pretty much common situation in web testing as well. So the class looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;package ar.example;

import java.util.HashMap;
import java.util.Properties;

import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;
import com.thoughtworks.selenium.SeleniumException;

public class SeleniumAdapter {
 
 private final int AWAITING_UNIT_LENGTH_MS = 300;
 private final long AWAITING_THRESHOLD_MS = 10000;
 private Selenium driver;
 

    public static String getRelativePath(String testedDomain, String alteredPath){
   return testedDomain + alteredPath;
 }
 
 public SeleniumAdapter(Properties properties) {
  driver = new DefaultSelenium(properties.getProperty("host"),  Integer.parseInt(properties.getProperty("port")), properties.getProperty("browser"), properties.getProperty("domain"));
  driver.start();
  driver.open(properties.getProperty("domain"));
  driver.setSpeed("500");
 }
 
 public void closeDriver(){
  driver.stop();
 }
  
 public boolean ifXPathExists(String xpathExpression){
  try {
   lookupXPathExists(xpathExpression);
  } catch (AutomationException e) {
   return false;
  }
  return true;
 }
  
 private WebElementEmulator repeatableLookupExists(String xpath) {
  long start = System.currentTimeMillis();
  while (true) {
   try{
    if(driver.isVisible("xpath=" + xpath)){
     TTestCase.logger.debug(testCase.wrapMessage("Found xPath [" + xpath + "]. Creating object.."));
     return new WebElementEmulator(xpath, driver);
    }
   }catch(SeleniumException se){
    try {
     Thread.sleep(AWAITING_UNIT_LENGTH_MS);
     TTestCase.logger.debug(testCase.wrapMessage("Searching xPath [" + xpath + "]. Retry.."));
    } catch (InterruptedException e) {
     e.printStackTrace();
    }
   }
   if (System.currentTimeMillis()-start &gt; AWAITING_THRESHOLD_MS){
    break;
   }
  }
  Statistics.totalLatency += System.currentTimeMillis() - start;
  return null;
 }

 private boolean repeatableLookupDoesNotExist(String xpath) {
  long start = System.currentTimeMillis();
  while (true) {
   boolean isPresent = driver.isElementPresent("xpath="+xpath);
   if (!isPresent) {
    Statistics.totalLatency += System.currentTimeMillis() - start;
    TTestCase.logger.debug(testCase.wrapMessage("Not found xPath [" + xpath + "]. Success.."));
    return true;
   }
   else{
    if(!driver.isVisible("xpath="+xpath)){
     TTestCase.logger.debug(testCase.wrapMessage("Found xPath [" + xpath + "]. However it is not visible. Success.."));
     return true;
    }
    try {
     Thread.sleep(AWAITING_UNIT_LENGTH_MS);
     TTestCase.logger.debug(testCase.wrapMessage("XPath [" + xpath + "] still can be found. Retry.."));
     if (System.currentTimeMillis()-start &gt; AWAITING_THRESHOLD_MS){
      break;
     }
    } catch (InterruptedException e) {
     e.printStackTrace();
    }
   }
  }
  Statistics.totalLatency += System.currentTimeMillis() - start;
  return false;
 }

 public WebElementEmulator lookupXPathExists(String xpath) throws AutomationException{
  WebElementEmulator handledElement = repeatableLookupExists(xpath);
  if (handledElement!=null) {
   if (handledElement.getQuantity()&gt;1){
    throw new AutomationException("Several elements can be located using specified xpath [" 
      + xpath + "] You should concretize.");
   }
   return handledElement;
  } else {
   throw new AutomationException("Lookup for element ["
     + xpath + "]" + " failed after "
     + AWAITING_THRESHOLD_MS + " ms awaiting.");
   
  }
 }
 
 public boolean lookupXPathDoesNotExist(String xpath) throws AutomationException {
  if (repeatableLookupDoesNotExist(xpath)) {
   return true;
  }else{
   throw new AutomationException("The xpath ["+xpath+"] is still observed after "+AWAITING_THRESHOLD_MS + " ms awaiting.");
  }
 }
}
&lt;/pre&gt;&lt;br /&gt;
That's pretty much it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-4527069672940121536?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/t9yNB8jjo3o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/4527069672940121536/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/07/custom-way-to-look-up-ajax-elements-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/4527069672940121536?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/4527069672940121536?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/t9yNB8jjo3o/custom-way-to-look-up-ajax-elements-in.html" title="Custom way to look-up ajax elements in Selenium. Pattern." /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/07/custom-way-to-look-up-ajax-elements-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04FQHc5cCp7ImA9WhdXE0g.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-656410133060359114</id><published>2011-07-05T05:35:00.000-07:00</published><updated>2011-08-26T04:58:31.928-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-26T04:58:31.928-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><category scheme="http://www.blogger.com/atom/ns#" term="pattern" /><category scheme="http://www.blogger.com/atom/ns#" term="Selenium RC" /><title>How to get instant updates of configuration file of your testing framework from svn repository</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MTSYNtjRwZ07Q3qpeVykY32bRaY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MTSYNtjRwZ07Q3qpeVykY32bRaY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MTSYNtjRwZ07Q3qpeVykY32bRaY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MTSYNtjRwZ07Q3qpeVykY32bRaY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Hi. &lt;br /&gt;
&lt;br /&gt;
Here is one more pattern intended for operating with the latest versions of configuration files. That was originated from the following. The project under testing behaves pretty much agile so to hold such agile things up to date we want to extract the relevant configs from some centralized storage that is easy to maintain.&lt;br /&gt;
To support such functionality I prepared small utility class to communicate with svn repository. The pattern looks like this:&lt;br /&gt;
&lt;br /&gt;
P.S. - you should use svnkit in order to keep the code working.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;package test.svn.client;

import java.io.File;

import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager;
import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory;
import org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryFactoryImpl;
import org.tmatesoft.svn.core.io.SVNRepository;
import org.tmatesoft.svn.core.wc.SVNClientManager;
import org.tmatesoft.svn.core.wc.SVNRevision;
import org.tmatesoft.svn.core.wc.SVNUpdateClient;
import org.tmatesoft.svn.core.wc.SVNWCUtil;

public class Communicator {
 
 static final String syncDest = "/Storage";
 
 SVNUpdateClient uc;
 SVNURL repositoryURL;
 
 public Communicator(String user, String password, String repository) throws SVNException{
  repositoryURL = SVNURL.parseURIEncoded(repository);
  DAVRepositoryFactory.setup();
  SVNRepository svnRepository = SVNRepositoryFactoryImpl.create(repositoryURL);
  ISVNAuthenticationManager manager = SVNWCUtil.createDefaultAuthenticationManager(user, password);
  svnRepository.setAuthenticationManager(manager);
  SVNClientManager cm = SVNClientManager.newInstance();
  cm.setAuthenticationManager(manager);
  uc = cm.getUpdateClient();
 }
 
 public void syncUp(String segment) throws SVNException{
  uc.doCheckout(repositoryURL.appendPath(segment, true), new File(syncDest), SVNRevision.UNDEFINED, SVNRevision.HEAD, SVNDepth.INFINITY, true);
  System.out.println("Done");
 }
 
 public String getResourceFolder(){
  return syncDest;
 }
 
 /**
  * Just to check how it really works :)
  * @param arg
  * @throws SVNException
  */
 public static void main(String[] arg) throws SVNException{
  Communicator driver = new Communicator("secret", "secret", "https://my.svnserver.fake/trunk");
  driver.syncUp("/resources/config");
 }
}
&lt;/pre&gt;&lt;br /&gt;
Then we should write the support for fetching the certain values from the resource files&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;package com.somefake.pkg;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.InvalidPropertiesFormatException;
import java.util.Properties;

import com.somefake.pkg.TAE;

public class ResourceProvider {
	
	private static final Communicator resourceActualyzer = new Communicator("testuser", "testpassword", "https://fakesvnserver.com/trunk");
	
	private static Locale currentLocale = Locale.RU;
	
	private static final HashMap&amp;lt;Locale, Properties&amp;gt; map = new HashMap&amp;lt;Locale, Properties&amp;gt;();
	
	
	static{
		TipsteryTestCase.logger.info("Initializing SVN client...");
		try {
			HashSet&amp;lt;String&amp;gt; localeRu = new HashSet&amp;lt;String&amp;gt;();
			HashSet&amp;lt;String&amp;gt; localeEn = new HashSet&amp;lt;String&amp;gt;();
			localeRu.add(resourceActualyzer.getResourceFolder() + "/Resources_ru.xml");
			localeRu.add(resourceActualyzer.getResourceFolder() + "/jsResources_ru.xml");
			localeEn.add(resourceActualyzer.getResourceFolder() + "/Resources.xml");
			localeEn.add(resourceActualyzer.getResourceFolder() + "/jsResources.xml");
			resourceActualyzer.syncUp("/resources");
			map.put(Locale.RU, loadProperties(localeRu));
			map.put(Locale.EN, loadProperties(localeEn));
		} catch (Exception e) {
			resourceActualyzer.setSuccessful(false, e);
			TipsteryTestCase.logger.error("Error while loading resources.", e);
		}
	}
	
	private static Properties loadProperties(HashSet&amp;lt;String&amp;gt; sourceFiles) throws InvalidPropertiesFormatException, FileNotFoundException, IOException{
		Properties stagingProperties = new Properties();
		for(String sourceFile: sourceFiles){
			stagingProperties.loadFromXML(new FileInputStream(sourceFile));
		}
		return stagingProperties;
	}
	
	public static String getProperty(String key) throws TAE{
		if(!resourceActualyzer.isSuccessful()){
			String message = "Looks like you had problems with " 
					+ "resource files syncronization\n"
					+ "Check if you set valid credentials and specified valid resource file names";
			TipsteryTestCase.error(message);
			resourceActualyzer.getException().printStackTrace();
			throw new TAE(message);
		}
		return map.get(currentLocale).getProperty(key);
	}
	
	public static void setLocale(Locale newLocale){
		currentLocale = newLocale;
	}
	
	/**
	 * Just to check if it works
	 * @param arg
	 * @throws TAE 
	 */
	public static void main(String[] arg) throws TAE{
		System.out.println(ResourceProvider.getProperty("some.property"));
		ResourceProvider.setLocale(Locale.EN);
		System.out.println(ResourceProvider.getProperty("some.property"));
	}
}
&lt;/pre&gt;&lt;br /&gt;
Locale here means just the enum, and do not curse me for the approach to the errors handling.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-656410133060359114?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/WXwRpFBIzDk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/656410133060359114/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/07/how-to-get-instant-updates-of.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/656410133060359114?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/656410133060359114?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/WXwRpFBIzDk/how-to-get-instant-updates-of.html" title="How to get instant updates of configuration file of your testing framework from svn repository" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/07/how-to-get-instant-updates-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8NQ30_eip7ImA9WhZbGUg.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-9087846478568181174</id><published>2011-06-24T16:41:00.000-07:00</published><updated>2011-06-24T16:41:32.342-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-24T16:41:32.342-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MySQL" /><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="challenge" /><category scheme="http://www.blogger.com/atom/ns#" term="Ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL" /><category scheme="http://www.blogger.com/atom/ns#" term="Selenium RC" /><title>Upcoming challenges</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PXTyo42civVLJ_dEJOJac5WuUW0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PXTyo42civVLJ_dEJOJac5WuUW0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PXTyo42civVLJ_dEJOJac5WuUW0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PXTyo42civVLJ_dEJOJac5WuUW0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;- Working out the solution to extract CSS style from html element in Selenium RC&lt;br /&gt;
- Studying Ruby&lt;br /&gt;
- Studying MySQL. (I'm currently pretty much familiar with T-SQL so I hope it will help me much)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-9087846478568181174?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/TO-sTu8oIt4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/9087846478568181174/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/06/upcoming-challenges.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/9087846478568181174?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/9087846478568181174?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/TO-sTu8oIt4/upcoming-challenges.html" title="Upcoming challenges" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/06/upcoming-challenges.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcGRXY8cCp7ImA9WhZbF0k.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-8643171184767499636</id><published>2011-06-22T06:07:00.000-07:00</published><updated>2011-06-22T06:07:04.878-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-22T06:07:04.878-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="pattern" /><category scheme="http://www.blogger.com/atom/ns#" term="log4j" /><title>How to hide some data in log4j log you consider to be secured</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/q_qpl4JVGmmihRb-Mak5V0v8UsU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/q_qpl4JVGmmihRb-Mak5V0v8UsU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/q_qpl4JVGmmihRb-Mak5V0v8UsU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/q_qpl4JVGmmihRb-Mak5V0v8UsU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Once we get the requirement saying the customer does not want some data gets transfered to the log file since it looks secure for them. We even should have the capability of choosing whether to show such data in logs. The quick way to address the requirement is to override one method in PatternLayout class. This will look like:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;import org.apache.log4j.PatternLayout;
import org.apache.log4j.spi.LoggingEvent;

public class SecureLayout extends PatternLayout{

                static String pattern;
                
                public static void setPattern(String pattern){
                                SecureLayout.pattern = pattern;
                }

                @Override
                public String format(LoggingEvent event) {
                                String string = super.format(event);
                                return pattern == null ?  string : string.replaceAll(pattern, "NotForYourEyes");
                }

}
&lt;/pre&gt;&lt;br /&gt;
Such the way will allow us to set which data we consider to be secured from any place of the code. So you should only place the class under the classpath and use the following construction in log4j.xml&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: xml"&gt;    &amp;lt;appender name="FILE" class="org.apache.log4j.RollingFileAppender"&amp;gt;
        &amp;lt;param name="File" value="logfile.log"/&amp;gt;
        &amp;lt;param name="Append" value="true"/&amp;gt;
        &amp;lt;param name="MaxFileSize" value="1000KB"/&amp;gt;
        &amp;lt;param name="MaxBackupIndex" value="1000"/&amp;gt;
        &amp;lt;layout class="some.package.SecureLayout"&amp;gt;
            &amp;lt;param name="ConversionPattern" value="%-5p [%d{ISO8601}] - %m%n"/&amp;gt;
        &amp;lt;/layout&amp;gt;
    &amp;lt;/appender&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
However such solution of described engineering problem has some drawback. It means we are not capable to hide the data in exception description as exceptions are handled in another way. However that problem can be solved by introducing the changes in Exception class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-8643171184767499636?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/s6Snz2UTjPA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/8643171184767499636/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/06/how-to-hide-some-data-in-log4j-log-you.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/8643171184767499636?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/8643171184767499636?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/s6Snz2UTjPA/how-to-hide-some-data-in-log4j-log-you.html" title="How to hide some data in log4j log you consider to be secured" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/06/how-to-hide-some-data-in-log4j-log-you.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEGQns-fCp7ImA9WhZbFkU.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-7632343536911682399</id><published>2011-06-17T15:25:00.000-07:00</published><updated>2011-06-21T11:23:43.554-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-21T11:23:43.554-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Selenium RC" /><title>Selenium RC under IE9. Script error on selenium server console opening.</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5D_O1bvXzpuDgXRrxvSUppleGWA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5D_O1bvXzpuDgXRrxvSUppleGWA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5D_O1bvXzpuDgXRrxvSUppleGWA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5D_O1bvXzpuDgXRrxvSUppleGWA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;You should remove all the security settings. Make your browser as much vulnerable as possible and you will get your selenium scripts working :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-7632343536911682399?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/NzJ5upOPEpc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/7632343536911682399/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/06/selenium-rc-under-ie9-script-error-on.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/7632343536911682399?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/7632343536911682399?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/NzJ5upOPEpc/selenium-rc-under-ie9-script-error-on.html" title="Selenium RC under IE9. Script error on selenium server console opening." /><author><name>Alexey Razgulyaev</name><uri>http://www.blogger.com/profile/02703170824711858235</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://2.bp.blogspot.com/_7ZiT84S3sCo/S5bYGlKPK2I/AAAAAAAAAAM/cQamQmUmHI4/S220/a_a32ab98d.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/06/selenium-rc-under-ie9-script-error-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04CQ3o5eyp7ImA9WhZbE0w.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-3300029147370040467</id><published>2011-06-17T06:37:00.000-07:00</published><updated>2011-06-17T07:12:42.423-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-17T07:12:42.423-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><category scheme="http://www.blogger.com/atom/ns#" term="pattern" /><title>How to check if sub-string belongs to the string in batch script</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/u9EfpUqVNsYgCnYO5nbsM3EwT4I/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/u9EfpUqVNsYgCnYO5nbsM3EwT4I/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/u9EfpUqVNsYgCnYO5nbsM3EwT4I/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/u9EfpUqVNsYgCnYO5nbsM3EwT4I/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Recently I was in need to prepare the batch file taking the sting and some pattern as the parameters. They required that file to check if that string contains the certain substring and basing on the result execute either one functionality or another. So the solution is below:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: dos"&gt;rem first parameter should hold the main string
rem second one should hold the substring to be found

SETLOCAL ENABLEDELAYEDEXPANSION 
set "ol=%1"
set handledString=!ol:%2=!
echo."%handledString%"
IF %1 == %handledString% GOTO wayone
IF %1 NEQ %handledString% GOTO waytwo

:wayone
echo."substring not found"
goto end

:waytwo
echo."substring found"
goto end

:end
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-3300029147370040467?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/dycbjSPXkY0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/3300029147370040467/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/06/how-to-check-if-sub-string-belongs-to.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/3300029147370040467?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/3300029147370040467?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/dycbjSPXkY0/how-to-check-if-sub-string-belongs-to.html" title="How to check if sub-string belongs to the string in batch script" /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/06/how-to-check-if-sub-string-belongs-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04HQX4yfSp7ImA9WhZbE0w.&quot;"><id>tag:blogger.com,1999:blog-5098962854350901144.post-902968130529674246</id><published>2011-06-07T03:22:00.000-07:00</published><updated>2011-06-17T07:12:10.095-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-17T07:12:10.095-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ANT" /><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><title>Ant custom task in application to the real purpose. Part Two.</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ol_GKz2lslFJ_s9yKfrNELRgFXE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ol_GKz2lslFJ_s9yKfrNELRgFXE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ol_GKz2lslFJ_s9yKfrNELRgFXE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ol_GKz2lslFJ_s9yKfrNELRgFXE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Hi!&lt;br /&gt;
&lt;br /&gt;
Here &lt;a href="http://razgulyaev.blogspot.com/2011/05/ant-custom-task-in-application-to-real.html"&gt;here&lt;/a&gt; I started the set of posts about how to apply the customized tasks in Ant to address some real requirement. &lt;br /&gt;
&lt;br /&gt;
So there is a lot of information about how to create custom task in ant. But we're talking about some production requirements. As you may discover in previous post we're trying to create the framework allowing to roll back the changes which have been made anywhere in the ant script, and it doesn't matter whether they were made within one target or the changes were distributed among the several ones. So, to achieve that I decided to extend the native ant tasks performing file operations and I started from &lt;b&gt;Replace&lt;/b&gt; task. However I still needed the infrastructure to support this functionality. So the whole workflow looks now like the following:&lt;br /&gt;
&lt;br /&gt;
- We take care of reseting the storage holding the information about which file is mapped to which backup.&lt;br /&gt;
- Then we perform safe operations with our files&lt;br /&gt;
- Finally we take care of cleaning up the backups being sure all has finished successfully&lt;br /&gt;
&lt;br /&gt;
The particular ANT script will look like this&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;project name="Safe replace" default="do-all" basedir="."&amp;gt;

 &amp;lt;taskdef name="safereplace" classname="com.enkata.ant.tasks.SafeReplaceTask"&amp;gt;
  &amp;lt;classpath&amp;gt;
   &amp;lt;pathelement path="C:/temp/safereplace.jar" /&amp;gt;
  &amp;lt;/classpath&amp;gt;
 &amp;lt;/taskdef&amp;gt;

 &amp;lt;taskdef name="initstorage" classname="com.enkata.ant.tasks.InitializeStorageTask"&amp;gt;  &amp;lt;classpath&amp;gt;
   &amp;lt;pathelement path="C:/temp/safereplace.jar" /&amp;gt;
  &amp;lt;/classpath&amp;gt;
 &amp;lt;/taskdef&amp;gt;

 &amp;lt;taskdef name="cleartemporary" classname="com.enkata.ant.tasks.ClearTempFilesTask"&amp;gt;  &amp;lt;classpath&amp;gt;
   &amp;lt;pathelement path="C:/temp/safereplace.jar" /&amp;gt;
  &amp;lt;/classpath&amp;gt;
 &amp;lt;/taskdef&amp;gt;

 &amp;lt;target name="do-all"&amp;gt;
  &amp;lt;initstorage/&amp;gt;
  &amp;lt;antcall target="valid"/&amp;gt;
  &amp;lt;antcall target="notvalid"/&amp;gt;
  &amp;lt;cleartemporary/&amp;gt;
 &amp;lt;/target&amp;gt;

 &amp;lt;target name="valid"&amp;gt;
  &amp;lt;safereplace dir="c:/test_safereplace" token="The" value="HRENAR"&amp;gt;
   &amp;lt;include name="**/*.txt" /&amp;gt;
  &amp;lt;/safereplace&amp;gt;
 &amp;lt;/target&amp;gt;

 &amp;lt;target name="notvalid"&amp;gt;
  &amp;lt;safereplace file="abc" token="0" value="0"&amp;gt;
  &amp;lt;/safereplace&amp;gt;
 &amp;lt;/target&amp;gt;

&amp;lt;/project&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
So here are several important points we should pay attention for. First of all it is seen that we use three custom tasks here. Each task has the path to the jar it is represented in. Also we have the general target where we take care of the items I have specified above and call the some valid target (not producing any errors) and some not valid one (that should always fail)&lt;br /&gt;
&lt;br /&gt;
As most of us already know to create the custom task we have to extend ANT native class Task or any class that is the extension of it. The simple custom task that I use is the following:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;public class InitializeStorageTask extends Task {

 @Override
 public void execute() throws BuildException {
  File storage = new File (SafeTasksUtils.BACKUP_STORAGE_FILE_NAME);
  if (storage.exists()){
   FileUtils.delete(storage);
  }
 }

}
&lt;/pre&gt;&lt;br /&gt;
I'm not including the default overridden methods not to waste the space. Anyway the IDE will remind you. So we should to implement our own execute() method to make it work.&lt;br /&gt;
&lt;br /&gt;
In the third part I will describe the core of the example means how the extended Replace task works and then in the fourth part the step-by-step implementation workflow will be described using Eclipse IDE.&lt;br /&gt;
&lt;br /&gt;
Thank you!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5098962854350901144-902968130529674246?l=razgulyaev.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Cfouz/~4/VjrzO2QA_eQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://razgulyaev.blogspot.com/feeds/902968130529674246/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://razgulyaev.blogspot.com/2011/06/ant-custom-task-in-application-to-real.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/902968130529674246?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5098962854350901144/posts/default/902968130529674246?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Cfouz/~3/VjrzO2QA_eQ/ant-custom-task-in-application-to-real.html" title="Ant custom task in application to the real purpose. Part Two." /><author><name>A.R.</name><uri>http://www.blogger.com/profile/08725803228873294996</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://4.bp.blogspot.com/_sD0MO7Bx4qM/TJkFA-kFEPI/AAAAAAAAABA/v9AOPhSeij0/S220/P1010854.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://razgulyaev.blogspot.com/2011/06/ant-custom-task-in-application-to-real.html</feedburner:origLink></entry></feed>

