How do I get Ajax performance data with watir-webdriver-performance?
When I use below script I am getting the same result after triggered Ajax request.
require 'rubygems'
gem "selenium-webdriver"
require 'watir-webdriver'
require 'watir-webdriver-performance'
Selenium::WebDriver::Chrome.path = chromePath
b = Watir::Browser.new :chrome
b.goto 'Ajax Website'
p b.performance.summary
# click some ajax button to trigger server request
p b.performance.summary
# click some ajax button to trigger server request
p b.performance.summary
b.close
Output
{:time_to_first_byte=>396, :request=>395, :tcp_connection=>0, :app_cache=>0, :time_to_last_byte=>405, :redirect=>679, :response=>9, :dns=>0, :response_time=>6134, :dom_processing=>4041}
{:time_to_first_byte=>449, :request=>446, :tcp_connection=>0, :app_cache=>0, :time_to_last_byte=>458, :redirect=>2320, :response=>9, :dns=>0, :response_time=>3751, :dom_processing=>946}
{:time_to_first_byte=>449, :request=>446, :tcp_connection=>0, :app_cache=>0, :time_to_last_byte=>458, :redirect=>2320, :response=>9, :dns=>0, :response_time=>3751, :dom_processing=>946}