I am using Selenium Webdriver (2.0) under the Perl language bindings, with Firefox 20. It is incredibly slow. For example, one common operation is to fill in a couple of <input type="text">
fields with an ID and password. I could type it in 2 to 3 times faster than Selenium does a 'send_keys' method. Locating elements, such as a table cell with specific text in a large table, is like watching paint dry.
I thought that maybe there is some sort of default speed setting that wasn't at its highest value, but the get_speed and set_speed methods have been removed. So, is Selenium already running flat out, or is there some setting I can tweak? I've seen many questions about how to slow down Selenium, but at this time I'm looking for how to speed it up. I'll worry about slowing it down later, if necessary.
Since even an "atomic" operation such as entering text into an input field is so slow, I don't think it's an issue with using XPath locators rather than CSS, or Perl instead of some other language. It's been suggested that I try Chrome instead of FF -- can it help that much? I do a lot of locating text within table cells, so CSS locators are unfortunately of limited value.
Thanks much for any help on this! I'm going to look real bad if this test automation isn't faster than manually running the tests!
HTML UnitDriver is the most light weight and fastest implementation headless browser for of WebDriver. It is based on HtmlUnit. It is known as Headless Browser Driver.
Reduce the time it takes for your automated scripts to complete compared to a GUI browser. GUI browsers will have to load CSS, images, render HTML and this will increase the time your script takes to run. Are useful when the test execution server has no GUI.
Generally, Selenium WebDriver scripts are very slow because they run through the browser.
A bit late to the party but there is the phantom driver http://phantomjs.org/ which doesn't use a screen driver and can be hooked into selenium.
./phantomjs --webdriver=5556 --webdriver-selenium-grid-hub=http://localhost:4444
Or link it to a remote hub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With