Error “step is not defind” using Mocha Test and what is mean by “Then simply run mocha with --require mocha-steps” in tutorial

丶灬走出姿态 提交于 2020-01-11 13:07:13

问题


`describe('my smoke test', function() {

step('login', function() {

vdriver.wait(until.elementLocated(By.name('UserName'))).sendKeys("aqdjska@gmail.org");
driver.wait(until.elementLocated(By.id("mat-input-3"))).sendKeys("cool123");
driver.sleep(2000);
driver.wait(until.elementLocated(By.css(".mat-progress-spinner-light > div"))).click();

});

step('Open Apps', function() { driver.wait(until.elementLocated(By.xpath("//span[contains(text(), 'Apps')]"))).click(); driver.wait(until.elementLocated(By.css(".app-item:nth-child(7) .icon-prepend"))).click(); });

step('Create A Theme', function() { driver.wait(until.elementLocated(By.xpath("//span[contains(text(), 'Themes')]"))).click();

driver.wait(until.elementLocated(By.xpath("/html/body/os-commerce/os-commerce-root/div[2]/div/app-builder/pe-builder-themes-list/div[2]/pe-builder-themes-list-user/div/pe-builder-theme-plus/mat-card/mat-card-content"))).click();

driver.wait(until.elementLocated(By.xpath("/html/body/os-commerce/os-commerce-root/div[2]/div/app-builder/pe-builder-theme/pe-editor/div[1]/pe-builder-navbar-top/mat-toolbar/mat-toolbar-row/pe-builder-navbar-top-button[4]/button/span"))).click();

});

xstep('temporarily ignored', function() { driver.wait(until.elementLocated(By.xpath("//span[contains(text(), 'Close')]"))).click(); });

}); `

above is the code

来源:https://stackoverflow.com/questions/59162263/error-step-is-not-defind-using-mocha-test-and-what-is-mean-by-then-simply-run

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!