Hello,
Is it possible to have nested page objects in codeceptjs?
For example, in my feature file I use pageObject1 which in turn uses a pageObject2.
If yes, is there a particular way of doing it?
This is a skeleton of what I have at the moment:
In my feature test file:
Scenario(’…’, async (I, pageObject1) => {
pageObject1.somefunction1();
})
And in pageObject1.js file I have:
const {pageObject2} = inject();
and in my function:
somefunction1(){
pageObject2.somefunction2();
}
I have the following error when I run the test:
Error: Could not include object pageObject1 from module (path)
Duplicate parameter name not allowed in this context
Any suggestions on this matter?
Thank you in advance.