-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ce44c2
commit 7ede3bd
Showing
2 changed files
with
47 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* eslint-disable no-undef */ | ||
const { Builder, Browser, By } = require("selenium-webdriver"); | ||
|
||
describe("Create New Template and Find it in Table", function () { | ||
let driver; | ||
|
||
const templateNme = "Template for testing1"; | ||
|
||
before(async function () { | ||
driver = await new Builder().forBrowser(Browser.CHROME).build(); | ||
}); | ||
|
||
it("should create a New Template", async function () { | ||
await driver.get("https://enm-dev.adma.ai/designer"); | ||
|
||
await driver.findElement(By.className("createNewBtn")).click(); | ||
|
||
await driver.findElement(By.id("name")).sendKeys(templateNme); | ||
|
||
await driver | ||
.findElement(By.id("author")) | ||
.sendKeys("Selenium Testing: Author"); | ||
|
||
await driver | ||
.findElement(By.id("template_acknowledgment")) | ||
.sendKeys("Selenium Testing: Acknowledgment"); | ||
|
||
await driver.findElement(By.id("create_new")).click(); | ||
|
||
await driver.sleep(5000); | ||
|
||
await driver.findElement(By.className("logoWrap")).click(); | ||
}); | ||
|
||
it("should find a New Template in Table", async function () { | ||
await driver | ||
.findElement(By.className("search")) | ||
.sendKeys(templateNme, Key.RETURN); | ||
|
||
await driver.sleep(5000); | ||
}); | ||
|
||
after(async function () { | ||
await driver.quit(); | ||
}); | ||
}); |