I print out the title, then put it into the function "is_visible()"
It always returns False, but it should be True since I use the title the computer returns to me.
Any solution?
from playwright.sync_api import sync_playwright
from playwright.sync_api import expect, Page
with sync_playwright() as p:
browser = p.chromium.launch(headless=False, slow_mo=1000)
context = browser.new_context()
page = context.new_page()
page.goto('https://www.duckduckgo.com')
page.locator('#search_form_input_homepage').fill('panda')
page.locator('#search_button_homepage').click()
expect(page).to_have_title('panda at DuckDuckGo')
print(page.title())
print(page.get_by_title('panda at DuckDuckGo').is_visible())