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

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.

主站蜘蛛池模板: 雷波县| 调兵山市| 靖宇县| 桂东县| 新津县| 洪江市| 敖汉旗| 应城市| 吕梁市| 吉首市| 新闻| 湄潭县| 利辛县| 迭部县| 遂平县| 陇川县| 南平市| 长顺县| 中宁县| 永城市| 商南县| 迭部县| 西贡区| 景东| 任丘市| 大同市| 襄汾县| 普兰店市| 思南县| 资中县| 西宁市| 眉山市| 邓州市| 苍山县| 丰城市| 望都县| 周至县| 花垣县| 永康市| 涞水县| 鹤庆县|