Ember:Selenium的最佳做法,可在浏览器中进行集成测试 [英] Ember: Best practices with Selenium to make integration tests in browser
本文介绍了Ember:Selenium的最佳做法,可在浏览器中进行集成测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您是否有任何使用ember.js进行硒测试的经验/示例?
Have you any experiences/examples to make Selenium tests with ember.js?
我无法抓住"视图(我使用路由器),因为它们具有不确定的ID.
I cannot "grab" views (I use router), because they have not-deterministic ids.
有什么想法吗?
推荐答案
您可以为视图元素明确设置自己的ID.直接从诸如这样的车把上
You can set your own id's for view elements explicitly. Directly from handlebars like:
{{#view Ember.TextField elementId="my_id"}}
或者从您的视图对象中获取:
Or from your view object:
MyApp.MyView = Ember.View.Extend({
elemntId: "my_id"
});
这篇关于Ember:Selenium的最佳做法,可在浏览器中进行集成测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文