测试“Dojo”网络应用程序与硒 [英] Testing a "Dojo" web application with Selenium

查看:126
本文介绍了测试“Dojo”网络应用程序与硒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人用Selenium和Dojo重的网络应用程序进行了广泛的自动化?我正在寻找您可能遇到的任何问题或问题,直接与Selenium和Dojo的组合相关。

解决方案

p>我已经使用Selenium与一大堆不同的网络应用程序,其中包括几个Dojo。你应该没事我建议的一个做法是确保您要测试的所有组件(您将要驾驶的两个UI控件,以及您将要阅读的文本组件进行测试)都会设置ID标签。硒有一堆优雅的选择器来获取您需要的元素,但ID的选择仍然是最好的。其他方法可能更脆弱。



我已经有一些具有挑战性的经验,Selenium RC不能像我的代码Selenium IDE兼容,直到我停止使用硒RC。如果您不太熟悉Selenium,您应该意识到,它本身不支持一些(IMO)基本功能,如流量控制和包括;但是有一些允许这个框架的用户扩展。我还建议看一下Watir,我现在一般喜欢Selenium,因为它暴露了一流语言(Ruby)的全部功能/灵活性。


Has anyone done some extensive automation with Selenium and a Dojo-heavy web app? I'm looking for any issues or problem that you might have run into or issues related directly to the combination of Selenium and Dojo.

解决方案

I've used Selenium extensively with a bunch of different web apps, including a few on Dojo. You should be fine. One practice I would recommend is to make sure all the components you'll be testing (both UI controls you'll be driving, as well as text components you'll be reading for testing) have ID tags set. Selenium has a bunch of elegant selectors to get at the elements you need, but selection by ID is still the best. The other methods can be more brittle.

I've had some challenging experiences with Selenium RC not being as compatible with my code as Selenium IDE, to the point that I stopped using Selenium RC. And in case you are not super familiar with Selenium, you should be aware that it doesn't natively support some (IMO) pretty fundamental features like flow control and includes; but there are user extensions to the framework that allow this. I'd also recommend taking a look at Watir which I now generally prefer over Selenium because it exposes the full power/flexibility of a first class language (Ruby).

这篇关于测试“Dojo”网络应用程序与硒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆