Reputation: 250
My web page is very slow and taking approx 1 minute to load page. Hence causing below line to fail.
* configure driver = { type: 'chromedriver', executable: '/Users/vikas/Apps/chromedriver', showDriverLog: true }
* driver 'http://XXXX.XXX'
I configured readTimeout in karate-config.js but no help:
karate.configure('readTimeout', 60000);
Error Message:
ERROR com.intuit.karate - java.net.SocketTimeoutException: Read timed out, http call failed after 30003 milliseconds for URL: http://localhost:9515/session/c7c09b611f294b8d13ef7d63668b2677/url
ERROR com.intuit.karate - http request failed:
java.net.SocketTimeoutException: Read timed out
For Selenium WebDriver there is infinite timeout for driver.get(url) which can be changed by pageLoadTimeout() .
Is there anything with Karate Core to handle such long page loading.
Upvotes: 1
Views: 1362
Reputation: 58058
Yes, the config for the HTTP client used for the UI driver is separate. So you do something like this:
* configure driver = { httpConfig: { readTimeout: 120000 } }
Just add httpConfig
to your existing driver configuration.
Refer: https://github.com/intuit/karate/tree/master/karate-core#configure-driver
Upvotes: 1