当前位置: 首页 > 工具软件 > CodeceptJS > 使用案例 >

codeceptJS BDD Examples

赖渊
2023-12-01

feature:
Scenario Outline: Delete record on a single line
Given The user selects the view “”
When The user removes the record ‘’
Then The notification ‘Record successfully deleted’ is displayed

Examples:
| view | record |
| Product | 231035933 |
|Product Family| 5 |

steps:
Given(‘The user selects the view {string}’, (view) => {
I.click(’#browse-list-select-view’);
I.click(view);
I.amOnPage(’/#/browseMDMViews/Browse_items_’ + stringUtils.removeSpaceInString(view));
I.dontSee(‘EXPORT RECORD’);
I.wait(3);
});

When(‘The user removes the record {string}’, (id) => {
I.executeScript(“document.querySelector(“button[aria-label=’” + id + “’]+div[id*=‘browse-list-main’]>div[class*=‘cell’]>div[class*=‘tc-actions’]>button[aria-label=‘Delete the record’]”).click()”);
});

 类似资料:

相关阅读

相关文章

相关问答