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] Keyboard API class doesn't work with address bar #33717

Closed
hemanshurana opened this issue Nov 21, 2024 · 1 comment
Closed

[BUG] Keyboard API class doesn't work with address bar #33717

hemanshurana opened this issue Nov 21, 2024 · 1 comment

Comments

@hemanshurana
Copy link

hemanshurana commented Nov 21, 2024

Trying to use following code to type in URL bar but seems like it's not working.

I have one usecase. Our company implemented one feature like open browser and type "company name" and space in address bar it will automatic setup company all site and whatever we type then after regarding information it will listed out on page.

So I am trying to open blank web page and type company name and space but seems like it's not working with address bar.

test('has title', async ({ page }) => { await page.goto('https://playwright.dev/'); await page.keyboard.press('Control+d'); await page.keyboard.type('https://www.microsoft.com/en-us/'); await page.keyboard.press('Enter'); });

  1. Page open with playwright URL
  2. All the steps passed but keyboard functionality not working.

I don't know if anything we need to extra configuration in config file or import something that can enable to use keyboard

@hemanshurana hemanshurana changed the title [BUG] Keyboard API class doesn't work [BUG] Keyboard API class doesn't work with address bar Nov 21, 2024
@dgozman
Copy link
Contributor

dgozman commented Nov 22, 2024

@hemanshurana Playwright only automates web page, not the browser UI. Therefore, page.keyboard does not type in the url bar - this is out of scope of Playwright.

@dgozman dgozman closed this as completed Nov 22, 2024
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