Skip to main content

Hello. I'll be using UTAM for our Automation Framework.     For the setup, I did install the following:      1. Install UTAM  npm i utam      2/ INSTALL WDIO  npm init wdio    3. INSTALL UTAM WDIO SERVICE  npm i wdio-utam-service --save-dev    4. INSTALL DOTENV  npm install dotenv    4. INSTALL SALESFORCE PAGE OBJECTS  npm i salesforce-pageobjects    5. ADD UTAM AS DEV-DEPENDENCY  npm add --dev utam    6. ADD BUILD to package.json      "test:ui:compile": "utam -c utam.config.js",      "test:ui:generate:login": "node scripts/generate-login-url.js",      8. Add UTAM in wdio.config.js  require('dotenv').config();  const { UtamWdioService } = require('wdio-utam-service');    services: [          [              UtamWdioService,              {                  implicitTimeout: 0,                  injectionConfigs: ['salesforce-pageobjects/ui-global-components.config.json'],              },          ],      ]    -----------  However, whenever I run the test, it's still giving me either a reference error of "utam is not defined" or the import modules (e.g. import {DesktopLayoutContainer} from '/salesforce-pageobjects/dist/navex/pageObjects/desktopLayoutContainer' cannot be found'    I tried uninstalling and installing the node_modules and tried everything in https://www.geeksforgeeks.org/node-js/how-to-resolve-a-cannot-find-module-error-using-node-js/ and     What am I missing?   

2 件の回答
  1. 10月5日 10:09

    @Aira Gutierrez

     

     

    I’d separate the two errors first rather than troubleshooting them as one issue.

    For utam is not defined, I’d verify the UTAM compile step is actually generating the page objects before running WDIO. Then check the generated output and package path for salesforce-pageobjects. If the generated JS isn’t there, changing the import path won’t fix the underlying problem.

0/9000