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

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.

主站蜘蛛池模板: 临海市| 新余市| 张家界市| 玛纳斯县| 门头沟区| 卢龙县| 南昌县| 高邮市| 三门峡市| 新昌县| 宝应县| 松桃| 方城县| 贡觉县| 承德县| 织金县| 丘北县| 佛坪县| 平果县| 成武县| 明光市| 云林县| 治县。| 杭锦后旗| 嘉黎县| 扬中市| 万宁市| 合水县| 上林县| 汤阴县| 新田县| 胶南市| 潼南县| 泰顺县| 池州市| 嵊州市| 监利县| 丹阳市| 民勤县| 渭南市| 龙州县|