HybridClearCache( ClearCookies, ClearCache )
|
|
|
Clears the browser cookies and/or the cache, according the values set for the parameters.
This command supports only chrome browser version 4.4 and above.
ClearCookies - Boolean. Cookies will be cleared when set to "true".
ClearCache - Boolean. Cache will be cleared when set to "true".
Command usage: The 'HybridClearCache' command clears the browser cookies and/or the cache.
Scenario: In the following example, we will use the ' HybridClearCache' command to delete the cookies and cache on the Wikipedia web page.
Parameters:
ClearCookies: Boolean. Cookies will be cleared when set to "true".
ClearCache: Boolean. Cache will be cleared when set to "true"
In this example – both parameters will be set to 'true'
Step 1: Launch chrome:www.wikipedia.com on android device (Nexus 7).
Step 2: We will use the 'HybridClearCache' command to clear both cookies and cache. The command will open the 'Settings' menu of the browser, and navigate to the privacy settings in order to delete the cache and cookies, as can be seen in the attached screenshots.
client.setDevice("adb:Nexus7");client.launch("chrome:http://www.wikipedia.com", true, false);client.hybridClearCache(true, true);client.SetDevice("adb:Nexus7");client.Launch("chrome:http://www.wikipedia.com", true, false);client.HybridClearCache(true, true);client.SetDevice "adb:Nexus7"Reportclient.Launch "chrome:http://www.wikipedia.com", true, falseReportclient.HybridClearCache true, trueReportself.client.setDevice("adb:Nexus7")self.client.launch("chrome:http://www.wikipedia.com", True, False)self.client.hybridClearCache(True, True)$client->setDevice("adb:Nexus7");$client->launch("chrome:http://www.wikipedia.com", 1, 0);$client->hybridClearCache(1, 1);