ClearBrowserCache Method - any way to set a longer timeout?

Class library usage, coding and language questions.
dhale
Posts: 29
Joined: Thu Feb 27, 2014 7:33 pm

ClearBrowserCache Method - any way to set a longer timeout?

Post by dhale » Thu May 09, 2019 2:55 pm

I'm having an issue with my VM's randomly, wondering if anyone knows if its possible to somehow get more than 5 seconds to allow the browser to clear its cache when using the ClearBrowserCache Method (browserName, userProfile)

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4678
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: ClearBrowserCache Method - any way to set a longer timeout?

Post by odklizec » Fri May 10, 2019 9:00 am

Hi,

As far as I know, there is no "delay" parameter in ClearBrowserCache so all you can probably do is to add a Ranorex.Delay right after the ClearBrowserCache method? But maybe I misunderstand your problem? ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

dhale
Posts: 29
Joined: Thu Feb 27, 2014 7:33 pm

Re: ClearBrowserCache Method - any way to set a longer timeout?

Post by dhale » Fri May 10, 2019 2:11 pm

The method is throwing an error. From what I can tell there is probably a 5 second internal timout.
I know my VM's sometimes can get a bit slow for brief periods but for now I'll just have to catch and check the error and handle it myself.
The VM's are configured as Win7 using IE11, 2 cpu, 4gb ram.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4678
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: ClearBrowserCache Method - any way to set a longer timeout?

Post by odklizec » Fri May 10, 2019 2:28 pm

Hi,

I see. Well, as mentioned, there is currently no custom tiemout parameter in this method. Have you, by any chance, tried to use OpenBrowser action, with Clear Cache parameter? Does it behave the same?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

dhale
Posts: 29
Joined: Thu Feb 27, 2014 7:33 pm

Re: ClearBrowserCache Method - any way to set a longer timeout?

Post by dhale » Tue May 14, 2019 2:51 pm

Ha - that's the funny thing. I tried, but I cant and here's why: in this particular area we have encoded JWT tokens and append them on the tail of the URL to bypass some login stuff that takes too long and isn't a part of this specific area of testing - and the encoded token puts the URL length over the "limit" of what Ranorex can handle, so that was choking as well.

So close, but yet so far...
For now I just catch the error and drop in a warning to the report.

mats
Certified Professional
Certified Professional
Posts: 24
Joined: Tue May 18, 2010 12:58 pm

Re: ClearBrowserCache Method - any way to set a longer timeout?

Post by mats » Thu May 23, 2019 9:21 am

If I use the OpenBrowser action with ClearCache parameter, the cache is not deleted afterwards.
Is the cache "cleared" only for the active session?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4678
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: ClearBrowserCache Method - any way to set a longer timeout?

Post by odklizec » Thu May 23, 2019 9:29 am

Hi,

ClearCache simply deletes its cache during browser start. Cache is not deleted during test run or after closing browser.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration