Sometimes the opening of a URL address takes more than 60 seconds. I am not really sure where exactly is the problem for this slow response but I saw that the worst case for loading the page is around 2 minutes. As a result of this the following code throws a timeout exception
org.openqa.selenium.TimeoutException: Timeout waiting to get the document.
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.3', java.version: '1.7.0_45'
Driver info: driver.version: RemoteIOSWebDriver
Command duration or timeout: 60.08 seconds
Build info: version: '2.35.0', revision: '8df0c6bedf70ff9f22c647788f9fe9c8d22210e2', time: '2013-08-17 12:46:41'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-40-generic', java.version: '1.7.0_21'
Session ID: 81f3eff5-8980-4e93-94e6-bed891770e63
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{javascriptEnabled=true, browserVersion=8536.25, browserName=Safari, variation=Regular, locale=en_US, systemName=iPhone OS, supportedLocales=[hr, ro, ca, vi, tr, fr, unknown, hu, unknown, th, id, pt-PT, en-GB, fi, unknown, sv, it, sk, ja, uk, es, da, ms, ko, ar, he, en, nl, cs, el, pl, pt, ru, de], takesElementScreenshot=false, version=6.0, sdkVersion=6.1, aut=/Users/niki/.ios-driver/safariCopies/safari-6.1.app, platformVersion=6.1, elementTree=true, platformName=IOS, name=iPad Simulator, iosSearchContext=true, CFBundleVersion=8536.25, takesScreenshot=true, platform=UNIX, CFBundleIdentifier=com.apple.mobilesafari, simulator=true, rotatable=true, rect={origin={y=0, x=0}, size={height=1024, width=768}}, locationContextEnabled=true, cssSelectors=true, configurable=true, device=ipad, language=en, iosTouchScreen=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:191)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:276)
at com.ecm.webautomation.hof.modules.NavigationModule.openSecureRootBasedUrl(NavigationModule.java:85)
at com.ecm.webautomation.hof.modules.NavigationModule.openLogInPage(NavigationModule.java:41)
at com.ecm.webautomation.hof.modules.UserModule.login(UserModule.java:51)
at com.ecm.webautomation.hof.acceptance.PaymentMethodsTestCases.registeredUserWithoutSavedSpcDetails(PaymentMethodsTestCases.java:737)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
I was wondering how to extend this timeout to lets say 2-3 minutes. Does anyone have an idea how to do this?