i18n testing using selenium

点点圈 提交于 2019-12-11 07:44:50

问题


Have any one used selenium for testing i18n !

Does Selenium provide any kind of I18N/L10N support? Is it possible to verify text based on message keys from a resource file? What about checking numbers and dates that might have a different format because of L10N?


回答1:


I am also interested in the correct approach for this issue. Where I work, we usually use the ids to verify certain page or field. But, sometimes you might need to verify some text, which could be using i18n.

Try the following:
If you have a selenium-testing module, have the module where the bundle is placed as a dependency. And then define a ReloadableResourceBundleMessageSource in the xml. And than setup the test following this code: https://stackoverflow.com/a/6251478/521754

Hope that helps!
Cheers!



来源:https://stackoverflow.com/questions/6869113/i18n-testing-using-selenium

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!