自動化測試工具,Selenium v2.45.0 發布

jopen 9年前發布 | 17K 次閱讀 Selenium

  Selenium 是 Thoughtworks公司的一個集成測試的強大工具。Selenium 是 ThoughtWorks 專門為 Web 應 用程序編寫的一個驗收測試工具。與其他測試工具相比,使用 Selenium 的最大好處是: Selenium 測試直接在瀏覽器中運行,就像真實用戶 所做的一樣。Selenium 測試可以在 Windows、Linux 和 MacintoshAnd 上的 Internet Explorer、 Mozilla 和 Firefox 中運行。其他測試工具都不能覆蓋如此多的平臺。
   Selenium 不同于一般的測試工具。一般的腳本測試工具錄制腳本,實際上都是通過攔截瀏覽器收發的http 請求來實現的。事實上并沒有辦法 錄制用戶對html 頁面的操作。Selenium 的腳本錄制工具是通過監聽用戶對html 頁面的操作來錄制腳本的。Selenium是真正能夠監聽 用戶對html 頁面的操作的錄制工具。Selenium 完全了解用戶操作的html 頁面。
selenium原理:
SeleniumServer 通過網絡與Selenium 客戶端通訊,接收Selenium 測試指令。
SeleniumServer 通過向瀏覽器發出JavaScript 調用實現對Html 頁面的全面追蹤,并通過網絡把執行結果返回給Selenium 客戶端。
Selenium 客戶端一般使用單元測試技術實現,通過判斷返回的結果與預期是否一致來決定程序是否運行正確。
Selenium 是通過javascript 來實現對Html 頁面的操作的。它提供了豐富的指定Html 頁面元素和操作頁面元素的方法。
Selenium 打開瀏覽器時,把自己的JavaScript 文件嵌入網頁中。然后Selenium 的網頁通過frame 嵌入目標網頁。這樣,就可以使用Selenium 的JavaScript 對象來控制目標網頁。
Selenium 的JavaScript 對象中,最重要的就是Selenium 對象。它的作用是代表Java 中的Selenium 接口執行一系列的命令,讓瀏覽器執行。


Selenium v2.45.0 發布,此版本現已提供下載http://selenium-release.storage.googleapis.com/2.45/selenium-server-standalone-2.45.0.jar。此版本支持 Firefox 36,更新內容如下:

v2.45.0

Important changes in this release:

* Native events in Firefox relied on an API that Mozilla no longer   provides. As such, fall back to synthesized events on recent Firefox   versions.

Other changes:

 When Selenium is unable to interact with an element, such as the   case when an element is missing or disabled, this change will output   exactly how Selenium is attempting to locate the element, such as   the XPath or id of the element. This greatly speeds up   troubleshooting issues, as the exception message clearly states what   element is broken/missing for common problems like an   ElementNotFoundException. improve ByCssSelector#toString  Remove automatic installation of the SafariDriver in Java. Complete Selenium Java Server support for Blink based Opera  Upgrading PhantomJS driver Pull HttpClient implementation details out of HttpCommandExecutor.  Fix issue 8254: Extensions were incorrectly transferred between   Windows client and Linux grid node, because ZipEntry had incorrect   name with '\' as separators. Adding capabilities and browser type for Opera Blink, and   configuring tests to run in Opera Blink  Adding support for Blink-based Opera to Java binding Adding Yosemite platform  Allowing to set an arbitrary platform capability even if it can't be   converted to Platform enum. Non-standard platform values can cause   matching issues on Grid, but they can be usable for third-party Grid   implementations Taking XML namespaces into account when searching by XPath. Checked   to work in Firefox. Chrome supports namespaces out of the box. Need   to update IE and Safari drivers to use the updated atom and test   them carefully.</pre>

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!