Was a quick fix. Thanks for that @Aleksei.
I am seeing one more issue also. Can you help me on the same. im using the same one as above
alekhya.m.mamilla@AMAC02FC9DHMD6N typescript_playwright_appium-master_6Feb % npm run wdio_ios
wdio_ios
wdio config/wdio.ios.conf.ts
2024-02-06T14:27:11.601Z ERROR @wdio/config:ConfigParser: Failed loading configuration file: /Users/alekhya.m.mamilla/Documents/MTN/typescript_playwright_appium-master_6Feb/config/wdio.ios.conf.ts: Cannot use import statement outside a module
wdio [command]
The wdio
command allows you run and manage your WebdriverIO test suite.
If no command is provided it calls the run
command by default, so:
$ wdio wdio.conf.js
is the same as:
$ wdio run wdio.conf.js
For more information, visit: https://webdriver.io/docs/clioptions
Commands:
wdio config Initialize WebdriverIO and setup
configuration in your current project.
wdio install Add a reporter
, service
, or framework
to your WebdriverIO project. The command
installs the package from NPM, adds it to
your package.json and modifies the
wdio.conf.js accordingly.
wdio repl [capabilities] Run WebDriver session in command line
wdio run Run your WDIO configuration file to
initialize your tests. (default)
Options:
–help Show help [boolean]
–version Show version number [boolean]
–watch Run WebdriverIO in watch mode [boolean]
-h, --hostname automation driver host address [string]
-p, --port automation driver port [number]
–path path to WebDriver endpoints (default “/”) [string]
-u, --user username if using a cloud service as automation backend
[string]
-k, --key corresponding access key to the user [string]
-l, --logLevel level of logging verbosity
[choices: “trace”, “debug”, “info”, “warn”, “error”, “silent”]
–bail stop test runner after specific amount of tests have
failed [number]
–baseUrl shorten url command calls by setting a base url[string]
-w, --waitforTimeout timeout for all waitForXXX commands [number]
-f, --framework defines the framework (Mocha, Jasmine or Cucumber) to
run the specs [string]
-r, --reporters reporters to print out the results on stdout [array]
–suite overwrites the specs attribute and runs the defined
suite [array]
–spec run only a certain spec file - overrides specs piped
from stdin [array]
–exclude exclude certain spec file from the test run - overrides
exclude piped from stdin [array]
–mochaOpts Mocha options
–jasmineOpts Jasmine options
–cucumberOpts Cucumber options
–autoCompileOpts Auto compilation options
Examples:
wdio run wdio.conf.js --suite foobar Run suite on testsuite “foobar”
wdio run wdio.conf.js --spec Run suite on specific specs
./tests/e2e/a.js --spec ./tests/e2e/b.js
wdio run wdio.conf.js --spec Run scenario by line number
./tests/e2e/a.feature:5
wdio run wdio.conf.js --spec Run scenarios by line number
./tests/e2e/a.feature:5:10
wdio run wdio.conf.js --spec Run scenarios by line number in
./tests/e2e/a.feature:5:10 --spec single feature and another complete
./test/e2e/b.feature feature
wdio install reporter spec Install @wdio/spec-reporter
wdio repl chrome -u <SAUCE_USERNAME> -k Run repl in Sauce Labs cloud
<SAUCE_ACCESS_KEY>
Documentation: https://webdriver.io
@wdio/cli (v7.16.12)
/Users/alekhya.m.mamilla/Documents/MTN/typescript_playwright_appium-master_6Feb/config/wdio.ios.conf.ts:1
import { join } from ‘path’;
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:77:18)
at wrapSafe (node:internal/modules/cjs/loader:1288:20)
at Module._compile (node:internal/modules/cjs/loader:1340:27)
at Module._extensions…js (node:internal/modules/cjs/loader:1435:10)
at Object.newLoader [as .js] (/Users/alekhya.m.mamilla/node_modules/pirates/lib/index.js:141:7)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at FileSystemPathService.loadFile (/Users/alekhya.m.mamilla/node_modules/@wdio/config/build/lib/FileSystemPathService.js:21:16)
alekhya.m.mamilla@AMAC02FC9DHMD6N typescript_playwright_appium-master_6Feb %