How to handle request timeout error for Remote webdriver connection?

How to handle request timeout error for Remote webdriver connection?

Getting the below error:

Assembly Initialization method AppiumMsTests.BaseTest.Setup threw exception. OpenQA.Selenium.WebDriverException: OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL https://mobile-hub.lambdatest.com/wd/hub/session timed out after 60 seconds

Hi Charity!

To handle request timeout error for Remote webdriver connection, please add TimeSpan.FromMinutes(3) while you are initializing your driver.

Here is the below command for the same.

IOSDriver<AppiumWebElement> driver = new IOSDriver<AppiumWebElement>(new Uri("https://username:Accesskey@mobile-hub.lambdatest.com/wd/hub"), driverOption, TimeSpan.FromMinutes(3 ));