I seem to be stuck in the construction of page objects. I read a lot of docs about page objects and know that they contain two things:
- elements that are present on a page
- functions to interact with the page
When I check example files I see that the elements are defined in the beginning of each page object. The in the test, the pageobject is imported via require. But the problem I see there is that the objects aren't yet present when the require happens. Is there another way to solve this without having to do a require just when the page is loaded?
Thanks inadvance. Regards