Using POM within this framework
hvpayne2 opened this issue · 1 comments
Hello,
I cloned this project and started using it for a proof of concept I am working on for automation. What I found is that when I started to create Page classes POM (Page Object Model) implementation, I started running into issues. It dawned on me that maybe this plugin is NOT POM-friendly. Is that the case? What I am finding is that when I try to use the IWebElement and scenario context within the Page Class files, I get errors/issues. Here is an example of an error I am facing:
Hi.
You need to have 2 types of classes:
- PageObjects
- Step definitions (bindings)
Classic POs have constructors with IWebDriver and all methods for pages. Step Definitions classes contain binding methods for specflow steps. What you do - get IWebDriver from definitions classes context and pass it to your page objects.
I can show you example next week. Also there’s another lib I created for such purposes called seleniq. You can use it or just see how base classes are implemented there