Added executeJsOnElement to avoid duplicate XPath query when we have it
Switched the the native webdriver API to get the input type
Refactored the safeguard on input type

The method now reuses the webdriver element found to perform the action
instead of searching it by itself. The method is also more generic to
avoid duplication between code checking for file or checkbox inputs.
Added an helper to click on an webdriver element
Pass the file path as a string rather than a char array
Post the value on the known element when setting the value on a file input
Changed the rightClick implementation to use the webdriver API
Merge pull request #148 from stof/optimize_xpath_search

Refactor the driver to optimize xpath search