![](/img/trans.png)
[英]Is there a way to assert download file with partial filename in testcafe?
[英]Is there a way to pass multiple options in assert statement in testcafe?
我需要在我的斷言語句中傳遞多個選項。 下面是斷言語句
等待 t.expect(methodName.tableInput.innerText).eql('' or '\n'); //這是不正確的
我需要檢查它是否為空值。 但是在 jenkins 上它說 '\n' 需要通過,但本地 '\n' 失敗
請幫忙
您不能在assert 語句中傳遞多個選項。 我建議您使用以下方法
const text = await Selector(‘yourSelector’).innerText;
await t.expect(text === ‘ ‘ || text === ‘\n’).ok( );
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.