1

最近、私の会社では、非常に大きなアプリケーションでクロス ブラウザー テストを行いました。機能回帰テスト用に Selenium Webdriver スクリプトを用意しましたが、クロス ブラウザー テストの対象範囲がこれ以上ないため、すべてのブラウザー (IE 9、10、11、FF、Chrome、Safari) でアプリケーション全体をテストする必要がありました。画像やボタンなどの GUI テストも含まれているため、このテストを実行しました。

私の考えは、ページのすべての要素を取得し、すべての要素の場所を取得して xml ファイルに保存することでした。たとえば、google.com のスクリプトを作成し、そこにある要素のすべてのリストを取得したとします (x, y) IE 9 ブラウザーの場合、残りのすべてのブラウザーで同じスクリプトを実行し、要素の場所を保存してから、各要素の場所を異なるブラウザーと比較します。これにより、異なるブラウザーでの要素の場所に関する詳細情報を取得できます。 size、isdisplay、isenabled メソッドを使用して要素を検証します。location メソッドを使用すると、どの要素が存在しないか、正しい場所に配置されていないかを見つけることができます...

これは私の考えです。何か意見をいただけますか?

ありがとう!

4

2 に答える 2

3

Your thoughts are mostly correct, except the fact that you cannot compare exact locations of elements in browsers (they will usually differ) but you can compare how the elements are related to each other (e.g. element x should be on the right side of element y, etc.).

I know of two commercial solutions that offer functionality similar to what you described: Mogotest and CrossBrowserTesting. They both offer free trials, so have a look at them. Browsera claims to have such functionality too, but I've never used it so I cannot comment on it.

If you prefer to implement such system by your own then there are two sources you may find helpful:

于 2014-03-21T21:53:51.713 に答える
0

このアプローチには、非常に高いレベルの偽陽性の問題があります。特定のボタンが一部のブラウザーで 3 倍大きいと報告されているのに、そうでない場合が複数あります。これとは別に、違いもわかるので良いものです

于 2015-03-17T05:21:56.350 に答える