selenium简介

什么是Selenium? (What is Selenium?)

Selenium is a free Open source functional Testing tool used for testing web applications on multiple browsers and multiple operating systems (Platforms). It is used for Functional and Regression Testing. Testing done by the selenium tool is usually referred to as Selenium Testing.

Selenium是免费的开源功能测试工具,用于在多个浏览器和多个操作系统(平台)上测试Web应用程序。 它用于功能和回归测试。 用Selenium工具完成的测试通常称为Selenium测试。

Selenium成分 (Selenium Components)

Selenium is not just a single tool but is a combination of different suites of software. Selenium has four components.

Selenium不仅是单个工具,而且是不同软件套件的组合。 Selenium有四个成分。

  1. Selenium IDE (Integrated Development Environment)Selenium IDE(集成开发环境)
  2. Selenium RC (Remote Control) – deprecated nowSelenium RC(远程控制)–已弃用
  3. Selenium WebDriverSelenium WebDriver
  4. Selenium GridSelenium网格

Selenium Components

Selenium成分

SeleniumIDE (Selenium IDE)

Selenium Integrated Development Environment (IDE) is the simplest framework in the Selenium suite. It is a browser plugin to record and playback the operations performed on the browser. Selenium IDE plugins are available for Chrome and Firefox browsers. It doesn’t support the programming features. Selenese is the language which is used to write test scripts in Selenium IDE.

Selenium集成开发环境(IDE)是Selenium套件中最简单的框架。 它是一个浏览器插件,用于记录和回放在浏览器上执行的操作。 Selenium IDE插件可用于Chrome和Firefox浏览器。 它不支持编程功能。 Selenese是用于在Selenium IDE中编写测试脚本的语言。

Selenium IDE的好处 (Benefits of Selenium IDE)

  1. Very use to use and install非常有用的使用和安装
  2. Has built-in test results reporting module内置测试结果报告模块
  3. No programming experience is required无需编程经验
  4. It is used to create and execute Test cases using Firefox or Chrome browsers它用于使用Firefox或Chrome浏览器创建和执行测试用例
  5. The user can easily record the Test scripts用户可以轻松记录测试脚本
  6. The user can edit the Test scripts用户可以编辑测试脚本
  7. The user can create Test Suites.用户可以创建测试套件。

Selenium IDE的缺点 (Drawbacks of Selenium IDE)

  1. It doesn’t support iteration statements它不支持迭代语句
  2. No support for conditional statements不支持条件语句
  3. It doesn’t support error handling它不支持错误处理
  4. It does not support Database testing它不支持数据库测试
  5. Available only in Firefox and Chrome仅在Firefox和Chrome中可用
  6. It doesn’t generate a detailed Test Reports summary.它不会生成详细的测试报告摘要。

SeleniumRC (Selenium RC)

Selenium RC is a testing tool used for web applications testing. It supports programming using RC. Using RC, we can test out applications in multiple browsers and also in multiple operating systems.

Selenium RC是用于Web应用程序测试的测试工具。 它支持使用RC进行编程。 使用RC,我们可以在多个浏览器和多个操作系统中测试应用程序。

Selenium RC has complex architecture hence slow in automation test execution. In Selenium RC, we need to launch a separate application called Selenium RC Server before we can start testing. Selenium RC server acts as a middleman between selenium commands and your browser. Selenium RC has been officially deprecated, you should use WebDriver or IDE to test your web applications.

Selenium RC具有复杂的体系结构,因此自动化测试执行速度较慢。 在Selenium RC中,我们需要先启动一个名为Selenium RC Server的单独应用程序,然后才能开始测试。 Selenium RC服务器充当Selenium命令和浏览器之间的中间人 。 Selenium RC已被正式弃用,您应该使用WebDriver或IDE来测试您的Web应用程序。

Selenium RC

SeleniumRC

Selenium WebDriver (Selenium WebDriver)

Selenium WebDriver is a web application testing tool introduced by eliminating the drawbacks of IDE and RC. It is simple in architecture and also easy to understand and use.

Selenium WebDriver是一个Web应用程序测试工具,通过消除IDE和RC的缺点而引入。 它的体系结构简单,也易于理解和使用。

Selenium WebDriver架构 (Selenium WebDriver Architecture)

Selenium WebDriver

Selenium WebDriver

  1. It is a well-designed object-oriented API developed to automate web and mobile software applications testing process它是经过精心设计的面向对象的API,旨在自动执行Web和移动软件应用程序测试过程
  2. It is faster than Selenium RC比Selenium RC快
  3. Selenium WebDriver directly talks to the browserSelenium WebDriver直接与浏览器对话
  4. It’s API is more concise than Selenium RC它的API比Selenium RC更简洁
  5. It cannot readily support new browser, but RC can它不能轻易支持新的浏览器,但是RC可以
  6. It doesn’t have a built-in command for automatic generation of test results它没有用于自动生成测试结果的内置命令
  7. It doesn’t support window base apps它不支持基于窗口的应用程序
  8. It needs outside support for report generation activity like dependence on TestNG or Jenkins.它需要外部支持报告生成活动,例如对TestNG或Jenkins的依赖。

Selenium网格 (Selenium Grid)

Selenium Grid is used to run Automation tests on multiple browsers across multiple operating systems, machines simultaneously. It supports Parallel Testing. It is used only for Test Execution.

Selenium Grid用于在多个操作系统,计算机上的多个浏览器上同时运行自动化测试。 它支持并行测试。 它仅用于测试执行。

特征 (Features)

  • Allows simultaneous running of tests in various web browsers, environments and machines允许在各种Web浏览器,环境和机器中同时运行测试
  • Saves time enormously大大节省时间
  • It speeds up the test suite completion time as it is capable of running various tests in parallel由于能够并行运行各种测试,因此可以加快测试套件的完成时间
  • Perform cross browser testing.执行跨浏览器测试。

何时使用Selenium Grid (When to use Selenium Grid)

You should use Selenium Grid when you want to do either one or both of the following:

如果要执行以下一项或两项操作,则应使用Selenium Grid:

When you run your tests against various browsers, operating systems, and machines all at the same time. This will ensure that the application you are testing is fully compatible with a wide range of browser operating system combinations.
Save execution time of your test suites. If you set up Selenium Grid to run, say, 5 tests at a time, then you would be able to finish the whole suite around 5 times faster.

当您同时针对各种浏览器,操作系统和计算机运行测试时。 这将确保您正在测试的应用程序与各种浏览器操作系统组合完全兼容。
节省测试套件的执行时间。 如果您将Selenium Grid设置为一次运行5个测试,那么您将能够以大约5倍的速度完成整个套件。

Selenium支持的平台 (Platforms supported by Selenium)

Selenium works with different Operating systems, browsers, programming languages and Testing Frameworks.

Selenium可与不同的操作系统,浏览器,编程语言和测试框架一起使用。

操作系统 (Operating Systems)

  • Microsoft Windows微软Windows
  • Macintosh苹果机
  • Linux的Linux

浏览器 (Browsers)

  • Mozilla Firefox火狐浏览器
  • Google Chrome谷歌浏览器
  • Internet ExplorerIE浏览器
  • Safari苹果浏览器
  • Opera etc.歌剧等

编程语言 (Programming Languages)

  • JavaJava
  • C#.NetC#.Net
  • PerlPerl
  • PythonPython
  • RubyRuby
  • PHPPHP

测试框架 (Testing Frameworks)

  • C#.Net – NUnitC#.Net – NUnit
  • Java – JUnit or TestNGJava – JUnit或TestNG
  • Python – unittest, pyunitPython –单元测试,pyunit
  • PHP – Behat + minkPHP – Behat +水貂

Selenium的优点 (Advantages of Selenium)

  1. It is an Open Source Software, you can check out its source code from its GitHub Repository.这是一个开源软件,您可以从其GitHub Repository中检出其源代码。
  2. It supports multiple Programming languages它支持多种编程语言
  3. It supports multiple Operating systems它支持多种操作系统
  4. It supports multiple browsers它支持多种浏览器
  5. It supports parallel testing.它支持并行测试。

Selenium的缺点 (Disadvantages of Selenium)

  1. It supports only web based applications and does not support windows based applications它仅支持基于Web的应用程序,不支持基于Windows的应用程序
  2. It is difficult to test Image related applications测试与图像相关的应用程序很困难
  3. It does not support built-in Report facility它不支持内置的报告功能
  4. It is difficult to use很难使用
  5. Newly added features may not work properly新添加的功能可能无法正常工作
  6. It does not support to test Captcha and Barcode readers它不支持测试验证码和条形码阅读器
  7. No ready vendor technical support available from anybody没有任何人提供现成的供应商技术支持
  8. Tester should have high programming language knowledge to write Selenium Automation Test Scripts.测试人员应该具有较高的编程语言知识,才能编写Selenium Automation测试脚本。

Selenium优于QTP的优势 (Advantages of Selenium over QTP)

Selenium and QTP, both of them are automation testing tools:

Selenium和QTP都是自动化测试工具:

  1. Selenium is an open source tool while QTP is a commercial toolSelenium是一种开源工具,而QTP是一种商业工具
  2. Selenium is used to test only web-based applications. However, QTP can be used to test a wide variety of applications like web-based and windows based applicationsSelenium仅用于测试基于Web的应用程序。 但是,QTP可用于测试各种应用程序,例如基于Web的应用程序和基于Windows的应用程序
  3. Selenium supports scripting in multiple languages like Java, Python, .Net, Perl, Ruby, and PHP while in QTP only VB scripting is supported.Selenium支持多种语言的脚本编写,例如Java,Python,.Net,Perl,Ruby和PHP,而在QTP中仅支持VB脚本编写。

References: Selenium IDE, Selenium WebDriver,

参考: Selenium IDE , Selenium WebDriver ,

翻译自: https://www.journaldev.com/25395/what-is-selenium-introduction-to-selenium

selenium简介

selenium简介_什么是Selenium? Selenium简介相关推荐

  1. java selenium回车键_使用Python和Selenium输入Enter / Return键?

    使用Python和Selenium输入Enter / Return键? 260 我正在寻找一种在Selenium中键入和Enter或Return键的快速方法.不幸的是,我要测试的表单(不是我自己的代码 ...

  2. selenium自动化测试_您如何使用Selenium来计算自动化测试的投资回报率?

    selenium自动化测试 跨浏览器测试是一种测试,需要大量的精力和时间. 通过不同的浏览器,操作系统,设备,屏幕分辨率测试Web应用程序,以评估针对各种受众的Web内容呈现的过程是一项活动. 特别是 ...

  3. idea+selenium代码_你试过使用selenium爬虫抓取数据吗

    ▼ 关注测试局| 会上瘾 写在前面 本来这篇文章该几个月前写的,后来忙着忙着就给忘记了. ps:事多有时候反倒会耽误事. 几个月前,记得群里一朋友说想用selenium去爬数据,关于爬数据,一般是模拟 ...

  4. chrome frame节点 取_爬虫3-下(利用Selenium + Chrome Driver模拟用户操作浏览器)

    一.前言 前面利用request的方法爬取页面数据的操作,今天用另外一种方法:利用Selenium + Chrome Driver模拟用户操作浏览器,来爬取数据. 在此之前需要做一些准备工作:安装se ...

  5. python selenium脚本_怎样开始写第一个基于python的selenium脚本

    1.下载并安装python(http://www.python.org/geti/). 2.安装selenium(http://pypi.python.org/pypi/selenium)下载并解压缩 ...

  6. python selenium爬虫_详解基于python +Selenium的爬虫

    详解基于python +Selenium的爬虫 一.背景 1. Selenium Selenium 是一个用于web应用程序自动化测试的工具,直接运行在浏览器当中,支持chrome.firefox等主 ...

  7. selenium自动化测试_为什么在生产中进行Selenium自动化测试对于您的下一个版本至关重要?...

    selenium自动化测试 您是否认为仅仅是因为您的Web应用程序在过渡环境中以飞快的速度通过,它对于生产环境也将是相同的? 您可能需要重新考虑! 特别是,如果我们指的是跨浏览器测试 ,则需要确保跨各 ...

  8. selenium并行_如何在不同的浏览器中设置Selenium网格以并行执行

    selenium并行 到目前为止,Selenium是最常用的Web自动化测试工具. 如此受欢迎的原因之一是Selenium的自动跨浏览器测试功能. Selenium自动化测试可以帮助您在所有主要浏览器 ...

  9. selenium自动化测试_使用Selenium自动化测试处理多个浏览器选项卡

    selenium自动化测试 使用Selenium进行自动化测试一直是将萌芽的自动化测试人员培养为专业人员的生命线. Selenium是开源的,在全球范围内被广泛采用. 结果,您会得到社区的大力支持. ...

最新文章

  1. 热泵精馏_精馏干货16 || 分子蒸馏
  2. html5编辑器自带js,javaScript编辑器-HBulider
  3. 基于HTML5 的人脸识别活体认证
  4. Angular 开发里的 polyfills.js、runtime.js、styles.js 和 vendor.js 是用来做什么的
  5. yoyo跑_面对“跑腿服务坑”:悠悠跑腿、蜂鸟配送、快跑者,跑腿公司该何去何从?...
  6. linux将屏幕输出到文件,Linux命令执行的屏幕输出内容重定向到日志文件
  7. 猜数字游戏python程序用函数guesssecret_Python-三、函数
  8. 卷王李富贵算法每日一题--分治算法(三)--逃亡
  9. notify vs nofifyall
  10. 重叠面积_20天津中考试卷及答案(24题重叠面积画板制作教程)
  11. Ubuntu搜索不到WiFi的解决办法
  12. word2vec数学原理详解
  13. php CSRF攻击与防御
  14. VS2015+OpenCV3.4.0+dmtx最新版联合集成开发 解析dm码
  15. 在超市使用室内地图的5个好处
  16. gridview的sort_C#教程之Gridview自动排序功能的实现
  17. 在C#中使用WIA获取扫描仪数据(利用Filter处理图片)
  18. html页面宽度和高度,页面布局宽度和高度 网页设计合适的页面尺寸是多少
  19. 小项目之数据库设计经验分享
  20. mysql中的declare_sql中declare是什么意思

热门文章

  1. Linux下测试PHP和MySQL是否正确安装
  2. VB.net中的sender和e
  3. 关于asp.net上传图片自动生成缩略图
  4. 在LINUX上部署SOFA
  5. Beta阶段第1周/共2周 Scrum立会报告+燃尽图 06
  6. JEESITE快速开发平台(二)环境搭建
  7. 去除input的自动填充色
  8. 【COGS 1873】 [国家集训队2011]happiness(吴确) 最小割
  9. jmeter-Java关于MD5加密方法 以及16位32位互转
  10. 解析button和input type=”button”的区别