-
Notifications
You must be signed in to change notification settings - Fork 530
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
Search term on playwright.dev not working when running the test #24
Comments
found a workaround where i click on the no result and then back into the search box, now it brings results but the arrowdown option is not working |
Hi @Zorry-Serafimova |
This is still hapening to me, not working with any browser. Anyone knows why? |
Hi @arickmm90, |
I had similar issues, but not consistently. It's most likely a quirk of the playwright site search than an issue with your test. May be worth trying a to interact with a simpler page as a comparison. e.g. do a search on google Working sample codeI've provided a simple test implementation that seems fine for me. May be useful to you. test.describe('Playwright search function', () => {
test('Search for JavaScript', async ({page}) => {
await page.goto('https://playwright.dev/');
//Enter a search term.
await page.getByRole('button', { name: 'Search' }).click();
await page.getByPlaceholder('Search docs').fill("JavaScript");
// Choose a search result.
await page.getByRole('link', { name: 'Introduction Evaluating JavaScript' }).click();
//Simple assertion we are on the correct new page.
await expect(page).toHaveTitle('Evaluating JavaScript | Playwright');
});
}); |
If it is inconsistent or not getting results, it would be an issue from the playwright's website. I am working on the search exercise and I do not see this issue. |
🐞 Describe the question:
![test-failed-1](https://private-user-images.githubusercontent.com/51411436/249638735-cfd43a5a-9e43-4657-ba4d-dbbd194af312.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEzNDkyNTAsIm5iZiI6MTcyMTM0ODk1MCwicGF0aCI6Ii81MTQxMTQzNi8yNDk2Mzg3MzUtY2ZkNDNhNWEtOWU0My00NjU3LWJhNGQtZGJiZDE5NGFmMzEyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE5VDAwMjkxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEyZjFiODkxYjgxM2E3ZDE3YjM2ZWI2MzhlN2ExZDY4MmVkMWZhMTA0MTM1ZTU0Yjc0N2JiNjQyNzYyMjM0NTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.XUBVew43XHZvnLxaN5ufpt5GL8tclsSAI-cLinVwWZo)
I used codegen to grab the locators for the search exercise. However when I ran it from VS Code using the UI mode it successfully gets fills in the search term but it says there are no results available. my code can be found https://github.com/Zorry-Serafimova/tau-introduction-to-playwright-ts/blob/main/tests/search-test.spec.ts
and the page https://github.com/Zorry-Serafimova/tau-introduction-to-playwright-ts/blob/main/pages/search-term-page.ts
📸 Screenshots/GIFs/Videos:
If applicable, add screenshots to help explain your needs.
🛝 Additional context:
Add any other context here.
🎡 A picture of your pet or a toy or something really cool:
The text was updated successfully, but these errors were encountered: