1

I have created a folder called PageObjects and kept all Object relared .js files inside it.

I have created another folder in my project called Sanity and kept my Sanity test case (spec) inside it.

When I am trying to access the page object file from the directory, I am getting the below error.

enter image description here

My project structure looks like below

enter image description here

If we keep every js (PageObject, Spec, config) file within core project directory, everything works fine. But, if we use specific directory structure, there is hiccup.

Please advise how we can handle this.

I feel directory structure is more powerful with respect to maintainability.

Can you please advise how I can access Object & Tests which are in separate directories?

Kon
  • 4,023
  • 4
  • 24
  • 38
Prabodh Ghosh
  • 161
  • 2
  • 17
  • @alecxe - Thank you. I followed the suggestion in that question and able to achieve what I wanted. – Prabodh Ghosh Dec 17 '18 at 03:10
  • Awesome, sorry I closed it but it felt really like the same problem we had as well. Glad it was useful! – alecxe Dec 17 '18 at 03:11
  • @alecxe - May I request you to please have a look at - https://stackoverflow.com/questions/53803025/chained-scripts-in-package-json-is-not-executing-properly – Prabodh Ghosh Dec 17 '18 at 05:29

0 Answers0