![](/img/trans.png)
[英]Using await keyword with promisify for cypress.io
我只是嘗試將 await 與 promisify 庫一起使用。 我把我的代碼放在下面。 從“cypress-promise”導入 promisify; 在這一行const txtElement = await promisify(element.find(".product-name")); 我的 ...
[英]Using await keyword with promisify for cypress.io
我只是嘗試將 await 與 promisify 庫一起使用。 我把我的代碼放在下面。 從“cypress-promise”導入 promisify; 在這一行const txtElement = await promisify(element.find(".product-name")); 我的 ...
[英]Traverse through a list, perform actions and return back to the next item in list
有沒有辦法可以遍歷列表,再次單擊,然后再次返回同一頁面以獲取列表中的下一個項目。 日志給了我這樣的結構,我不知道如何訪問它。 請幫忙,因為我是柏樹的新手。 編寫這樣的代碼會導致 DOM 元素被分離,盡管它會進入下一頁。 不確定我是否可以通過這種方式循環訪問每個元素。 ...
[英]I am new to cypress+TS. Not able to return a value inside the each loop in Cypress with Typescript
無法使用 Typescript 在賽普拉斯的每個循環內返回值。 patientBalance值未定義。 主要class代碼 Function 如下: 另外,我想在整個測試過程中的多個點使用這個patientBalance 。 如何將此值分配給變量? ...
[英]How to find one of many selectors that contain another nested selector
我有一個 web 頁面,並且有一個包含多個元素的列表: 第一種元素: 第二種元素: 如您所見,第二個不包含“imstuck” class 以及“Something”文本。 (這是一個例子,在實際情況下第二行代碼嵌套得更深) 我想找出哪個元素包含或不包含這行代碼。 基於 cypress 文檔和我嘗試 ...
[英]How to loop through datatable to validate select control option values in Cypress?
下面是我的 Cypress / Cucumber 測試中的一個步驟和數據表: 在我的測試中,我想遍歷 select 控件中的選項,並驗證選項值是否與上述值匹配。 下面是我的步驟定義代碼。And('Results per page drop down has the below options', ...
[英]Cypress - verify if each table row in one column contains the same item
我有一個表,但是是由 DIV 創建的某種 ag-grid,而不是真正的表元素:<div role="row" row-index="1" > <div col-id="name">Name 1</div> <div col-id="age">25< ...
[英]How to open open card and verify the content inside then open the second card and verify the content and so on
我需要打開第一張卡片並驗證里面的所有內容是否與主題標簽“時尚”匹配,然后對接下來的 3 張卡片執行相同操作,然后按“下一步”按鈕並對接下來的 4 張卡片執行相同操作。 我該怎么做? 我嘗試了常規方式,點擊element.eq(0)並驗證里面的所有內容,然后cy.go('back')等等,但代碼重復太 ...
[英]Looping over swiper-slides excluding cloned duplicates in cypress
我是 Cypress 的新手,正在嘗試循環播放 swiper 幻燈片,不包括克隆的副本。 我在柏樹中使用索引 of.each() 但這不起作用。 下面是我的代碼 下面是我的 html 代碼的示例快照: 任何人都可以建議只循環到原始幻燈片中的邏輯嗎? ...