node.js - Testcafe:在 boundTestRun 中使用测试控制器不起作用
问题描述
我正在尝试在我的 Testcafe 项目中使用影子根。处理它有点复杂。我创建了一个与 Selector().find() 行为相同的自定义函数,但我遇到了这个错误:
The "boundTestRun" option value is expected to be a test controller.
当我按照此处记录的方式进行操作时:
import { Selector, t } from 'testcafe'
getInShadowRoot = Selector(
// More code here
)
const boundedGetInShadowRoot = this.getInShadowRoot.with({ boundTestRun: t })
我创建了一个要点来说明我的问题:https ://gist.github.com/HugoDel/a600f3e120674e3f255884f3dc84fee3
谢谢你的帮助!
编辑:
我终于摆脱了它,因为我不需要添加.with({ boundTestRun: t })
来使它工作。
解决方案
推荐阅读
- swift - Swift 获取自定义日期(时间)
- multithreading - 线程取消挂起如何工作?
- hadoop - 元组在 PIG 中没有显示正确的数据
- selenium - ExtentReport 测试结束时间与开始时间相同
- c# - 没有重复的随机名称选择器?
- maven - pom.xml 是否应该包含在 war 包中?
- php - Symfony 3.4 - 返回数组 JsonResponse
- protractor - How can i find a ng-pristine type element with protractor?
- javascript - 添加到变量属性的字符串的类型是什么?
- vba - Excel VBA 复制和转置范围循环