I want to Automate Web App testing using Selenium and PyTest and I am new to both. So here is the structure of my project folder:
Parent Folder Locator.py
Section 1(Folder) -> test_sectionone.py
Locator.py contains all my Xpaths. Now when I try to import Locator.py by typing import Locator and then fetching the xpath using Locator.xpathElement1 in the test_sectionone.py, pytest fails with the following error:
Hint: make sure your test modules/packages have valid Python names. Traceback: test_mailboxProvisioning.py:5: in import Locator E ModuleNotFoundError: No module named 'Locator'
Is there something I am missing? Is there a naming convention because of which I am facing the issue?