How to set timezone for Selenium pytest testing?

How to set timezone for Selenium pytest testing?

Hi Miro!

While performing pytest testing with Selenium, you can easily set the time zone using the “timezone” capability -

capabilities = {
       "build": "Sample PY Build",
       "platformName": "Windows 11",
       "browserName": "Chrome",
       "browserVersion": "latest",
       "timezone": "UTC-05:00"
}

You can also refer to the following GitHub repo for the same -