|
| 1 | +# How to set timezone to an automation test in Python-selenium on [LambdaTest](https://www.lambdatest.com/?utm_source=github&utm_medium=repo&utm_campaign=Python-selenium-timezone) |
| 2 | + |
| 3 | +If you want to run you automation test for a particular timezone in Python-selenium on Lambdatest, you can use the following steps. You can refer to sample test repo [here](https://github.com/LambdaTest/python-selenium-sample). |
| 4 | + |
| 5 | +# Steps: |
| 6 | + |
| 7 | +To run your automation test for a particular timezone, you can change the timezone using the 'timezone' capability. For example, setting timezone to "UTC-5:00": |
| 8 | + |
| 9 | + |
| 10 | +```python |
| 11 | +desired_caps = { |
| 12 | + 'LT:Options': { |
| 13 | + "build": "Python Demo", # Change your build name here |
| 14 | + "name": "Python Demo Test", # Change your test name here |
| 15 | + "platformName": "Windows 11", |
| 16 | + "selenium_version": "4.0.0", |
| 17 | + "timezone": "UTC-05:00" |
| 18 | + }, |
| 19 | + "browserName": "Chrome", |
| 20 | + "browserVersion": "98.0", |
| 21 | + } |
| 22 | + |
| 23 | +``` |
| 24 | + |
| 25 | +For the full list of available capabilities, you can refer [here](https://www.lambdatest.com/support/docs/selenium-automation-capabilities/). |
| 26 | + |
| 27 | +### Run your test |
| 28 | + |
| 29 | +```bash |
| 30 | +python lambdatest.py |
| 31 | +``` |
| 32 | + |
| 33 | +# Links: |
| 34 | + |
| 35 | +[LambdaTest Community](http://community.lambdatest.com/) |
| 36 | + |
0 commit comments