By default, a Selenium test will have a maximum run time of 600 seconds (10 minutes).
If you need more time you can change that by passing the max_duration capability along with a value.
caps['max_duration'] = 1200
That will set the maximum run time for your selenium test to 1200 seconds (20 minutes).
The highest value is 14400 seconds (4 hours). If you pass anything higher your selenium test will fail quickly with a message telling you the value is too large.
The amount of time we wait for each command to complete is 5 minutes. After 5 minutes if a step in your test has not completed you will get a timeout error from Selenium.