错误:无法从“D:\ Code\Cypress\cypress-ui-automation\cypress\support‘at D:\Automation Code\Cypress\cypress-ui-automation\node_modules\browser-resolve\node_modules\resolve\lib\async.js:46:17 at process”(D:\Automation Code\Cypress\cypress-ui-automation\node_modules\browser-resolve\node_modules\resolve\lib\async.js:173:43) at ondir )(D:\自动化代码\Cypress\)找到模块'cypress-xpath’cypress-ui-automation\node_modules\browser-resolve\node_modules\resolve\lib\async.js:188:17)
发布于 2022-07-30 07:28:11
看起来您已经错过了cypress-xpath的安装。
如果您正在使用npm安装:
npm install -D cypress-xpath或者如果你在安装纱线:
yarn add cypress-xpath --dev显然,在\cypress\support中已经有了require语句,因为这是错误堆栈中的第一个路径。
发布于 2022-07-30 07:20:51
假设cypress-xpath插件已经安装,那么在cypress/support/e2e.js下您必须添加以下内容:
require('cypress-xpath');https://stackoverflow.com/questions/73173636
复制相似问题