add
This commit is contained in:
SagarDurgade 2024-08-03 01:33:35 +05:30
parent 504c05374f
commit 406b7dcca9
8 changed files with 0 additions and 101 deletions

View file

@ -1,7 +0,0 @@
import { test as baseTest } from "@playwright/test"
type pages = {
registerPage: RegisterPage ,
}
baseTest.extend()

View file

@ -1,30 +0,0 @@
import{ expect, test }from '@playwright/test'
test.describe('Drag and Drop', () => {
test('[3003]Verify the darg and drop', async ({page}) => {
await page.goto('https://commitquality.com/practice')
const sd = page.locator("[data-testid='practice-drag-drop']")
await sd.scrollIntoViewIfNeeded()
await sd.click()
await page.locator("#small-box").dragTo(page.locator(".large-box "))
await expect(page.locator("//div[text()='Success!']")).toBeVisible()
let r = (Math.random() + 1).toString(36).substring(7)
console.log("random", r);
let randomString = "e2e/0" + r + ".png"
await page.screenshot({path: randomString})
});
test('[2210] Verify the drage and drop by using mouse hour', async ({page}) => {
await page.goto('https://commitquality.com/practice')
const sd = page.locator("[data-testid='practice-drag-drop']")
await sd.scrollIntoViewIfNeeded()
await sd.click()
await page.locator("#small-box").hover()
await page.mouse.down()
await page.locator(".large-box ").hover()
await page.mouse.up()
await expect(page.locator("//div[text()='Success!']")).toBeVisible()
// await page.waitForTimeout(5000);
});
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

View file

@ -1,18 +0,0 @@
import { test, expect } from '@playwright/test';
test('has title', async ({ page }) => {
await page.goto('https://playwright.dev/');
// Expect a title "to contain" a substring.
await expect(page).toHaveTitle(/Playwright/);
});
test('get started link', async ({ page }) => {
await page.goto('https://playwright.dev/');
// Click the get started link.
await page.getByRole('link', { name: 'Get started' }).click();
// Expects page to have a heading with the name of Installation.
await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
});

View file

@ -1,6 +0,0 @@
import { test } from "./myFixture"
test("Fixture demo", async ({ age, page, email }) => {
console.log(age, email)
})

View file

@ -1,12 +0,0 @@
import { test as myTest } from '@playwright/test'
type sagar = {
age: number,
email: string
}
const myFixtureTest = myTest.extend<sagar>({
age: 27,
email: 'sagardurgade@gmail.com'
})
export const test = myFixtureTest;

View file

@ -1,17 +0,0 @@
import { Browser, chromium, test } from '@playwright/test'
test('Launch chrome', async() => {
const browser = await chromium.launch({ headless: false })
const context = await browser.newContext()
const page = await context.newPage()
await page.goto('https://www.google.com/')
await page.screenshot({ path: './e2e/example-.png' })
})
test('titel', async () => {
const browser = await chromium.launch({})
const page = await browser.newPage()
await page.goto('https://www.google.com/')
})

View file

@ -1,11 +0,0 @@
import { test, } from '@playwright/test'
test.describe('Playwright action ', () => {
test('Right click Test Case', async ({page}) => {
await page.goto('https://www.tutorialspoint.com/')
// await page.locator("//a[text()='Login']").click( { button: "right" })
// await page.getByRole('button', { name: 'Login' }).click( { button: "right" })
// await page.locator().click( option: 'right')
await page.waitForTimeout(5000)
})
})