forked from BahmniIndiaDistro/abdm-e2e-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
23 lines (23 loc) · 1018 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const { openBrowser, goto, toRightOf, textBox, into, write, dropDown, button, click, press, closeBrowser } = require('taiko');
(async () => {
try {
await openBrowser({headless:false});
await goto("https://demo.mybahmni.org/bahmni/home/index.html#/login");
await write("superman",into(textBox(toRightOf("Username"))));
await write("Admin123",into(textBox(toRightOf("Password"))));
await dropDown("Location").select("General Ward");
await click(button("Login"));
await click("Clinical");
await write("GAN203013");
await press("Enter");
await click("Consultation");
await click("Add New Obs Form",{waitForNavigation:true,navigationTimeout:180000});
await click("Diabetes – Progress")
await waitFor(async () => !(await $("overlay").exists()))
await write("A1C",into(textBox(toRightOf("A1C"))));
} catch (error) {
console.error(error);
} finally {
await closeBrowser();
}
})();