question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] why im getting different behaviour when using chrome vs safari and firefox ?

See original GitHub issue

I have the following scenario that im trying to automate, change main page language e.g italian then in seach input use an english keyword and expect to get italian suggested options

the scenario is working fine manually against all browser but when i automate it it works fine when using chrome, but for webkit and firefox its not, i keep getting english item results instead of getting items with same selected language.

i have tried to reload page after switching the language, delay the typing speed to give time for API to return the proper value but no use.

any idea what could be the reason ?, unfortunately will not be able to share the project

    test('User can search for a canton using EN/DE/FR lang while selected lang is IT', async ({ page, landingPage }) => {
        await page.goto(path.it.landingPage, { waitUntil: "load" })
        await landingPage.searchForCity('zurich')
        await expect.soft(page.locator('text=Zurigo (ZH) >> nth=0')).toBeVisible();
        await landingPage.searchForCity('Zürich')
        await expect.soft(page.locator('text=Zurigo (ZH) >> nth=0')).toBeVisible();
        await landingPage.searchForCity('Genève')
        await expect.soft(page.locator('text=Ginevra (GE) >> nth=0')).toBeVisible();
    });

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
aslushnikovcommented, May 31, 2022

@amrsa1 new week has started and I’m the new triager now! Can you please add me to your repo so that I can try it out?

0reactions
aslushnikovcommented, May 31, 2022

Investigation has shown that certain websites behave differently if we define locale explicitly as en-US. To fix this behavior, the locale can be reset to '':

The following fixed all the tests:

use: {
  locale: '',
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cross Browser Debugging between Firefox and Safari (or ...
I've noticed that Safari and Chrome behave the same when it comes to HTML and CSS. However, there are differences between Firefox and...
Read more >
Introduction to cross-browser testing - Learn web development
This article should have given you a high-level understanding of the most important concepts you need to know about cross browser testing.
Read more >
When testing layout on Firefox Responsive Design Mode ...
When testing layout on Firefox Responsive Design Mode, page appears drastically different from other Chrome/Safari.
Read more >
Handling common HTML and CSS problems - MDN Web Docs
Use this page, or another site that has a prominent heading or other block-level element. Right/Cmd + click on the element in question...
Read more >
Firefox vs. Chrome: Which is better? - Mozilla
If having tons of open tabs is your thing, then it really comes down to your UI preference. Firefox features a horizontal scroll...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found