(feature) [WebDriver] Some useful features for WebDriver

1. Macroses
Here is basic macroses:

go("${host}") - navigate to ${host}
iWait(function(){ ... }) - specify implicit wait as 7 seconds for lookups of elements inside function
_iWait(function(){ ... }, N) - specify implicit wait as N seconds for lookups of elements inside function
$("#myid") - lookup single element by CSS
$$("#myid divs") - lookup list of element by CSS
$x(..) - lookup single element by XPath
measure(function(){ ... }) - measure timing of execution specified function

As result, to open & login you need to write following:

go("http://${server}:${port}")
$('#user').sendKeys("${username}")
$('#pass').sendKeys("${password}")
$('#loginButton').click()

Measurement is also simple:

measure(function(){
    go("http://${server}:${port}/mypage.jsp?id=${some_id}");
})

2. Dev Mode

This mode allow to use alwasys open browser for scripting. 

3. Arguments 

Sometimes you need to run Chrome using specific flags. This patch allows to specify flags in Chrome Config