test: fix console-api tests when tracing was enabled (#10782)
This commit is contained in:
parent
05719dc24d
commit
a4e68dbac1
|
|
@ -36,7 +36,7 @@ it.afterEach(async ({ recorderPageGetter }) => {
|
|||
|
||||
it('should support playwright.$, playwright.$$', async ({ page }) => {
|
||||
const body = await page.evaluateHandle('playwright.$("body")');
|
||||
expect(body.toString()).toBe('JSHandle@node');
|
||||
expect(await body.evaluate<string, HTMLBodyElement>((node: HTMLBodyElement) => node.nodeName)).toBe('BODY');
|
||||
const length = await page.evaluate('playwright.$$("body").length');
|
||||
expect(length).toBe(1);
|
||||
});
|
||||
|
|
@ -49,7 +49,7 @@ it('should support playwright.selector', async ({ page }) => {
|
|||
it('should support playwright.locator.value', async ({ page }) => {
|
||||
await page.setContent('<div>Hello<div>');
|
||||
const handle = await page.evaluateHandle(`playwright.locator('div').withText('Hello').element`);
|
||||
expect(handle.toString()).toBe('JSHandle@node');
|
||||
expect(await handle.evaluate<string, HTMLDivElement>((node: HTMLDivElement) => node.nodeName)).toBe('DIV');
|
||||
});
|
||||
|
||||
it('should support playwright.locator.values', async ({ page }) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue