问题
`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