アプリケーションのクリックとナビゲーションの読み込み時間を測定して、パフォーマンス テストを行う必要があります。Watir-webdriver-performance gem を使用しました。Chrome で動作しますが、Firefox はサポートしていません。firefox でそれを行う方法についてのガイダンスを教えてください。
ありがとう
アプリケーションのクリックとナビゲーションの読み込み時間を測定して、パフォーマンス テストを行う必要があります。Watir-webdriver-performance gem を使用しました。Chrome で動作しますが、Firefox はサポートしていません。firefox でそれを行う方法についてのガイダンスを教えてください。
ありがとう
これが私のやり方です:
require 'watir-webdriver-performance'
$response = $browser.performance.summary[:response_time]
$first_byte = $browser.performance.summary[:time_to_first_byte]
$last_byte = $browser.performance.summary[:time_to_last_byte]
def performance_check
puts ("#{$browser.url}: Response time: #{$response}ms.")
puts ("#{$browser.url}: Time to first byte: #{$first_byte}ms.")
puts ("#{$browser.url}: Time to last byte: #{$last_byte}ms.")
end
def test_site_01
$browser.goto("http://www.google.com/")
performance_check
end
watir-webdriver-performancegemについての私の質問を参照してください。gemの開発者は、最初/最後までの時間と応答時間の違いで応答します。
watir-webdriver-performance gemの:response_time、:time_to_first_byte、および:time_to_last_byteの違いは何ですか?
パフォーマンスの宝石について知る前に、私も同じ問題を抱えていました。
load アクションが完了したときにのみ表示される要素を見つけました
そしてそれが利用可能になるのを待ちました:
browser.element.present?
非常に大まかな回避策であることは承知していますが、それが私が考えた唯一のことでした。そして、それはあなたに行動時間についての大まかな見積もりを与えます.