Giter Site home page Giter Site logo

Comments (6)

mxschmitt avatar mxschmitt commented on May 25, 2024 1

This should be fixed in https://github.com/microsoft/playwright-python/releases/tag/v1.41.2.

from playwright-python.

mxschmitt avatar mxschmitt commented on May 25, 2024

Can you provide us a introductions on how to reproduce this? This would help us a ton in order to triage and prioritise this!

from playwright-python.

jfp1992 avatar jfp1992 commented on May 25, 2024

create a new project with the latest playwright:
pip install playwright
pip install pytest
pip install pytest-playwright

main.py:

from playwright.sync_api import Page, expect


def test_red_step(page: Page):
    page.goto("https://playwright.dev")
    expect(page.locator("body")).to_be_hidden()

pytest.ini:

[pytest]
addopts =
    --headed
    --tracing retain-on-failure

run the test with playwright 1.39.0: red assertion step
run the test with playwright 1.40.0: white assertion step
run the test with playwright 1.41.0: white assertion step

from playwright-python.

mxschmitt avatar mxschmitt commented on May 25, 2024

I can reproduce:

1.39.0: good
1.40.0: bad

Caused by microsoft/playwright#28112.

This also affects Node.js without the test-runner, Playwright for Java, and probably .NET.

import { chromium, expect } from '@playwright/test';
(async () => {
  const browser = await chromium.launch();
  const context = await browser.newContext();
  try {
    await context.tracing.start({ screenshots: true, snapshots: true });
    const page = await context.newPage();
    await page.goto('https://example.com');
    await expect(page).toHaveTitle('123');
  } finally {
    await context.tracing.stop({ path: 'trace.zip' });
  }
  await context.close();
  await browser.close();
})();

Expected: Last step is red.
Actual: Its not red.

It also does not show the expect matcher name correctly:
image

from playwright-python.

HermanBide avatar HermanBide commented on May 25, 2024

has this issue been fixed yet ? if not can i contribute ?

from playwright-python.

HermanBide avatar HermanBide commented on May 25, 2024

from playwright-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.