官术网_书友最值得收藏!

Comparing Selenium commands in multiple languages

Translating recorded tests from IDE into Ruby is rather simple, and we can get started even if we do not have any previous programming experience; learning as we go works just fine. The most exciting part is that these commands are even easier to translate from Ruby to any other programming language. Here are a couple of examples of the usage of the sendKeys() method that we used in the preceding example:

The consistency of the WebDriver API makes it incredibly easy to port your knowledge of the test from one language to another. This is great news for you, the test engineer, because you become more valuable to your company. You can be dropped in on any web project, written in any programming language, and start writing tests right away! Information and examples of different WebDriver commands in any programming language can be found at http://docs.seleniumhq.org/docs/.

The preceding example is slightly oversimplified. The action commands are written in the same format from programming language to programming language. However, writing code in different kinds of languages, such as compiled VS interpreted, will have their own idioms and best practices. Some actions that work well in Ruby would be wasteful and counterintuitive in Java.

主站蜘蛛池模板: 南木林县| 色达县| 会宁县| 杭州市| 富锦市| 东城区| 曲阳县| 牙克石市| 天台县| 晋城| 张北县| 民权县| 齐齐哈尔市| 扶沟县| 盘山县| 海南省| 溧阳市| 迁安市| 达拉特旗| 沾化县| 宜良县| 介休市| 集安市| 宝坻区| 察哈| 清涧县| 秦安县| 桦南县| 新乐市| 榕江县| 上饶县| 博乐市| 原阳县| 炎陵县| 寻甸| 汤阴县| 安吉县| 汶上县| 嘉义市| 磴口县| 灌南县|