Is JavaScript compatible with strict Page Object Pattern?

[亡魂溺海] 提交于 2019-12-05 06:30:47

I am not much about this patterns.but i will give some details maybe it helps to you. http://www.guru99.com/page-object-model-pom-page-factory-in-selenium-ultimate-guide.html

http://www.assertselenium.com/automation-design-practices/page-object-pattern/

It seems a great way to achieve this is to use TypeScript (which is a statically typed version of JavaScript):

https://en.wikipedia.org/wiki/TypeScript

From Gerrit0's comment above and investigating it further, it seems a great way to achieve this is to use TypeScript (which is a statically typed version of JavaScript):

https://en.wikipedia.org/wiki/TypeScript

If you use Jetbrains products like IntelliJ IDEA it will do a code completion and ther proper navigation for you. In javascript world page object is a known pattern too. AngularJs offers it too in it's own e2e test framework (http://www.protractortest.org/#/page-objects). Personally I use IIFE for page objects and IntelliJ does the rest. If it doesn't fit to your needs you can still choose typescript and transpile it to javascript.

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