Page tree
Skip to end of metadata
Go to start of metadata


HybridClearCache(ClearCookies, ClearCache)

Supported in iOS Supported in Android

Description

Clears the browser's cache.

  • Chrome: On non-iOS only. Chrome's cache, cookies and users history data will be cleared.
  • Safari: On iOS only. For this browser both the cookies and the cache will be cleared.

Parameters

(warning) Parameters are no longer effective on Chrome nor on Safari. Cookies and Cache will always be deleted.

(warning) Starting from the next version of seeTest, this command's signature will be deprecated, and the new method's signature will not receive any input parameters.

Scenario

 In this example we will demonstrate how this command clears the chrome browser history cache and stored data .

  •  Go to Settings->Apps ->Chrome, and see the app cache before performing the cache clear command:

and, under Manage Space you can see the app data:



  • Run :
client.hybridClearCache(true, true);
  • The result:



Code Examples

Java Example
client.setDevice("adb:Nexus7");
client.hybridClearCache(true, true);
C# Example
client.SetDevice("adb:Nexus7");
client.HybridClearCache(true, true);
VBScript Example
client.SetDevice "adb:Nexus7"
Report
client.HybridClearCache true, true
Report
Python Example
self.client.setDevice("adb:Nexus7")
self.client.hybridClearCache(True, True)
Perl Example
$client->setDevice("adb:Nexus7");
$client->hybridClearCache(1, 1);
  • No labels