I have this part of code:
try {
Document doc=Jsoup.parse(broswer.getPageSource(),broswer.getCurrentUrl());
return doc;
} catch (Exception ex) {
event.log("Error while creating JSOUP document", ex);
}
the problem is that it randomly hangs on getPageSource()
. Sometimes test can run for few hours without problem and sometimes it hangs on getPageSource()
. I have tried latest selenium/ latest chrome, but also few previous combination and its still giving me same problem. This problem did not occurs with Firefox driver.
Is there any workaround? Like limiting time for getPageSource()
?