[Python] Issue with Pytest Playwright on vscode, regarding packages: ModuleNotFoundError: No...

Discussão em 'Python' iniciado por Stack, Agosto 30, 2025.

  1. Stack

    Stack Membro Participativo

    _____________________________________ ERROR collecting test_orangehrm_login.py ______________________________________
    ImportError while importing test module 'E:\Tools\vscode\playwright_demo1\tests\test_orangehrm_login.py'.
    Hint: make sure your test modules/packages have valid Python names.
    Traceback:
    ..\..\python\Lib\importlib\__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    tests\test_orangehrm_login.py:3: in <module>
    from pages.orangehrm_login_page import LoginPage
    E ModuleNotFoundError: No module named 'pages'


    I have tried reinstalling python libraries and created a new environment on vscode and ran same test file but showing same issue again and again.

    Continue reading...

Compartilhe esta Página