如何设置 webdriver IO 的配置文件位置

How to set the config file location for webdriver IO

我已经设置了一个 Webdriver IO 测试框架并手动创建了我的配置文件。它位于配置文件夹中,但是当我 运行 wdio 时,我收到一条错误消息,指出缺少配置。

如何告诉 wdio 配置文件 (wdio.conf.js) 的位置,或者我是否必须将它放在根目录下?

您可以将配置文件的位置作为第一个参数传递给 wdio 命令。例如:

npx wdio ./config/wdio.conf.js