-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Description
Hi Team,
I was trying to login to application, below is the code:
const playwright1 = require('playwright');
const PAGE_URL ="https://xxxxxx";
const browser_run = "Chrome";
const HomePage = require('../POM/homepage.js');
const assert = require('assert');
describe(`Test app`, () => {
//this.timeout(10000);
let browser;
let page;
let context;
before(async () => {
});
after(async () => {
});
beforeEach(async () => {
browser = await playwright1.firefox.launch({headless:false});
context = await browser.newContext();
page = await context.newPage();
await page.goto(PAGE_URL); //, { waitUntil: 'load', timeout: 0 //waitUntil: "networkidle0",
//});
await page.fill('id=userID',userid);
await page.fill('id=password',password);
//await page.press('id=loginbtn','Enter');
await page.keyboard.press('Enter'); //**not working only on firefox**
});//.timeout(5000);
afterEach(async () => {
await page.close();
await context.close();
});
it('Validate Account viewer browser error pop up', async () => {
await page.waitForSelector("//input[@placeholder='Enter Account ID']", {
visible: true, timeout: 90000
})
await page.waitForSelector("(//button[text()='Go'])[2]", {
visible: true, timeout: 90000
})
await page.fill('//input[@placeholder="Enter Account ID"]',"34324");
await page.click('(//button[text()="Go"])[2]');
});//.timeout(60000)
});Metadata
Metadata
Assignees
Labels
No labels