我想為在 URI 和 xhr 響應中返回的鍵創建一個變量。我嘗試了URI的路線,因為這似乎是最簡單的,但不知道如何告訴它只保存URI的一部分,而不是整個值。.url().then(($url) => { const moveKey = $url.text(/someString.+?(?=\/)/); cy.log(moveKey); }) 我也嘗試過使用 和 ,但等待總是超時。cy.routecy.waitcy.server() .route('/overview').as('getMove') .wait('@getMove').then((xhr) => { const moveKey = xhr.move.key; })網址 = https://app.com/move/xxxxxx/overview
使用柏樹 IO 保存 URI 或對測試上下文的響應中返回的值
素胚勾勒不出你
2022-09-29 17:16:16