test: Create Script Personnel
This commit is contained in:
parent
27e85cee3b
commit
f91121b51b
6 changed files with 522 additions and 0 deletions
|
|
@ -0,0 +1,32 @@
|
|||
import { test, expect, Page } from '@playwright/test';
|
||||
import { strictEqual } from 'assert';
|
||||
|
||||
let page: Page;
|
||||
|
||||
test.beforeAll(async ({ browser }) => {
|
||||
page = await browser.newPage();
|
||||
});
|
||||
|
||||
test.afterAll(async () => {
|
||||
if (page !== undefined) {
|
||||
await page.close();
|
||||
}
|
||||
});
|
||||
|
||||
test('Login', async () => {
|
||||
// Login
|
||||
await page.goto('http://192.168.1.90:20001/');
|
||||
await expect(page).toHaveTitle(/^Sign in to /);
|
||||
await page.fill("input[name='username']", 'admin');
|
||||
await page.fill("input[name='password']", '1234');
|
||||
await page.click('id=kc-login');
|
||||
await page.waitForTimeout(2000);
|
||||
// await page.click('id=acceptBtn');
|
||||
});
|
||||
|
||||
test('View Deatil Personnel', async () => {
|
||||
await page.click('id=menu-icon-personnel-management');
|
||||
await page.click("(//div[@class='full-width text-right']//button)[1]");
|
||||
await page.click("(//div[@class='q-focus-helper']/following-sibling::i)[1]");
|
||||
await page.waitForTimeout(4000);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue