Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Page title is not returned for newly opened pages in headed mode #31177

Closed
ForcepointKG opened this issue Jun 5, 2024 · 4 comments
Closed

Comments

@ForcepointKG
Copy link

Version

1.43.0

Steps to reproduce

  1. Open the app
  2. Click some link (new browser tab should be opened after it)
  3. Switch to the new browser tab
  4. Validate the title of the newly opened tab
    Note: I am able to validate other locators/elements but not title

Expected behavior

User should be able to validate newly opened tab title

Actual behavior

Playwright is not able to find title element of newly open tab However I am able to validate other locators/elements apart of page title

Additional context

No response

Environment

Playwright Version: 1.43.0
Operating System: Windows 10 Enterprise
python version: Python 3.11.3
Browser: Chromium
@mxschmitt
Copy link
Member

Could you provide us a code snippet which reproduces the behaviour which we can run locally?

Ideally with actual and expected outcome.

@ForcepointKG
Copy link
Author

Consider use case as "User is on O365 homepage and select any app(sharepoint/onedrive) from app launcher which will open new tab. So now user is on new tab that is (sharepoint/onedrive)."
Sample code snippet

with context.expect_page() as new_page_info:
page.get_by_text("select any O365 app").click() # Opens a new tab
expect(new_tab.value.get_by_title("title")).to_be_visible()

at this stage if we use other element apart of title than it is working
expect(new_tab.value.locator("locator")).to_be_visible()

@mxschmitt
Copy link
Member

Would it be possible to share something which us which we can run locally? Maybe it reproduces on some other site for you?

Without that we are unfortunately not able to act on it. Thank you for your understanding!

@mxschmitt
Copy link
Member

I'll close it in the meantime, since we don't have a reproduction. Feel free to re-file with a concrete reproduction so we can act on it. Thanks for your understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants