<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: How to delete cookies through a script?</title> <atom:link href="http://www.learnqtp.com/how-to-delete-cookies-through-a-script/feed/" rel="self" type="application/rss+xml" /><link>http://www.learnqtp.com/how-to-delete-cookies-through-a-script/</link> <description></description> <lastBuildDate>Tue, 31 Jan 2012 08:17:01 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>By: Amit Bhardwaj</title><link>http://www.learnqtp.com/how-to-delete-cookies-through-a-script/comment-page-1/#comment-21861</link> <dc:creator>Amit Bhardwaj</dc:creator> <pubDate>Mon, 28 Nov 2011 11:28:18 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/?p=34#comment-21861</guid> <description>WebUtil.deletecookies -&gt; It will delete the entire cookies session which will present in your system.
WebUtil.deletecookie  --&gt; This code will delete the cookies related to that time available session.</description> <content:encoded><![CDATA[<p>WebUtil.deletecookies -&gt; It will delete the entire cookies session which will present in your system.</p><p>WebUtil.deletecookie  &#8211;&gt; This code will delete the cookies related to that time available session.</p> ]]></content:encoded> </item> <item><title>By: jerico</title><link>http://www.learnqtp.com/how-to-delete-cookies-through-a-script/comment-page-1/#comment-21562</link> <dc:creator>jerico</dc:creator> <pubDate>Tue, 22 Nov 2011 20:37:07 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/?p=34#comment-21562</guid> <description>hi amuthu,
if u wanna get ABC.xml.....y cant u use Relative path
instead of Absolute path?
tht makes ur wrk ease(may be
)</description> <content:encoded><![CDATA[<p>hi amuthu,</p><p> if u wanna get ABC.xml&#8230;..y cant u use Relative path</p><p>instead of Absolute path?</p><p>tht makes ur wrk ease(may be<br
/> )</p> ]]></content:encoded> </item> <item><title>By: fola</title><link>http://www.learnqtp.com/how-to-delete-cookies-through-a-script/comment-page-1/#comment-12623</link> <dc:creator>fola</dc:creator> <pubDate>Wed, 22 Dec 2010 12:31:38 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/?p=34#comment-12623</guid> <description>I came up with something clever. Basically, I wrote a javascript bookmarklet, then get QTP to navigate to the bookmarklet. See code below - you will need to modify it for your cookies.
&#039;This function Deletes all the BBC cookies on the browser
Function deleteCookies(targetBrowser)
&#039;Javascript function that deletes the bbc cookies from the browser
jsString = &quot;javascript:function delCookie() {var thecookie = document.cookie.split&quot; &amp; &quot;(&quot;&quot;;&quot;&quot;);&quot;
jsString = jsString &amp; &quot; for (var i = 0;i &lt; thecookie.length;i++) {cpath = (thecookie[i].search&quot;
jsString = jsString &amp; &quot;(&quot;&quot;BBCiPlayer&quot;&quot;) == -1) ? &quot;&quot;/&quot;&quot; : &quot;&quot;/iplayer&quot;&quot;; document.cookie = thecookie[i] + &quot;
jsString = jsString &amp; &quot;&quot;&quot;; expires=Thu, 01 Jan 1970 00:00:00 GMT; domain=.bbc.co.uk; &quot;
jsString = jsString &amp; &quot;path=&quot;&quot; + cpath; }} delCookie();&quot;
Browser(targetBrowser).Navigate(jsString)
End Function</description> <content:encoded><![CDATA[<p>I came up with something clever. Basically, I wrote a javascript bookmarklet, then get QTP to navigate to the bookmarklet. See code below &#8211; you will need to modify it for your cookies.</p><p>&#8216;This function Deletes all the BBC cookies on the browser<br
/> Function deleteCookies(targetBrowser)</p><p> &#8216;Javascript function that deletes the bbc cookies from the browser<br
/> jsString = &#8220;javascript:function delCookie() {var thecookie = document.cookie.split&#8221; &amp; &#8220;(&#8220;&#8221;;&#8221;");&#8221;<br
/> jsString = jsString &amp; &#8221; for (var i = 0;i &lt; thecookie.length;i++) {cpath = (thecookie[i].search&quot;<br
/> jsString = jsString &amp; &quot;(&quot;&quot;BBCiPlayer&quot;&quot;) == -1) ? &quot;&quot;/&quot;&quot; : &quot;&quot;/iplayer&quot;&quot;; document.cookie = thecookie[i] + &quot;<br
/> jsString = jsString &amp; &quot;&quot;&quot;; expires=Thu, 01 Jan 1970 00:00:00 GMT; domain=.bbc.co.uk; &quot;<br
/> jsString = jsString &amp; &quot;path=&quot;&quot; + cpath; }} delCookie();&quot;</p><p> Browser(targetBrowser).Navigate(jsString)</p><p> End Function</p> ]]></content:encoded> </item> <item><title>By: MS</title><link>http://www.learnqtp.com/how-to-delete-cookies-through-a-script/comment-page-1/#comment-12519</link> <dc:creator>MS</dc:creator> <pubDate>Mon, 13 Dec 2010 11:08:52 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/?p=34#comment-12519</guid> <description>hey.
i want to know is there any specific code to delete cookies from FF . does Webutil.deletecookies delete the cookies for IE or FF ??
thanks and Regards
MS</description> <content:encoded><![CDATA[<p>hey.</p><p>i want to know is there any specific code to delete cookies from FF . does Webutil.deletecookies delete the cookies for IE or FF ??</p><p>thanks and Regards<br
/> MS</p> ]]></content:encoded> </item> <item><title>By: Neeraj Jain</title><link>http://www.learnqtp.com/how-to-delete-cookies-through-a-script/comment-page-1/#comment-11021</link> <dc:creator>Neeraj Jain</dc:creator> <pubDate>Fri, 23 Jul 2010 03:38:19 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/?p=34#comment-11021</guid> <description>Hi Ankur,
Could you please let me know the script for clicking the top row in Google Search results.
I was able to write the script as follows:
SystemUtil.Run &quot;iexplore.exe&quot;, &quot;www.google.com&quot;
Browser(&quot;title:=Google - Windows Internet Explorer&quot;).Page(&quot;title:=Google&quot;).WebTable(&quot;name:=q&quot;).WebEdit(&quot;name:=q&quot;).Set &quot;Testing Concepts&quot;
wait(5)
Browser(&quot;title:=Google - Windows Internet Explorer&quot;).Page(&quot;title:=Google&quot;).WebTable(&quot;name:=q&quot;).WebButton(&quot;name:=Google Search&quot;).click
What would be the code for getting QTP to click on the first(top) link in the results that are returned by the search?
I would appreciate it if you could help me with this script.
Thanks,
Neeraj</description> <content:encoded><![CDATA[<p>Hi Ankur,</p><p>Could you please let me know the script for clicking the top row in Google Search results.</p><p>I was able to write the script as follows:</p><p>SystemUtil.Run &#8220;iexplore.exe&#8221;, &#8220;www.google.com&#8221;<br
/> Browser(&#8220;title:=Google &#8211; Windows Internet Explorer&#8221;).Page(&#8220;title:=Google&#8221;).WebTable(&#8220;name:=q&#8221;).WebEdit(&#8220;name:=q&#8221;).Set &#8220;Testing Concepts&#8221;<br
/> wait(5)<br
/> Browser(&#8220;title:=Google &#8211; Windows Internet Explorer&#8221;).Page(&#8220;title:=Google&#8221;).WebTable(&#8220;name:=q&#8221;).WebButton(&#8220;name:=Google Search&#8221;).click</p><p>What would be the code for getting QTP to click on the first(top) link in the results that are returned by the search?</p><p>I would appreciate it if you could help me with this script.</p><p>Thanks,<br
/> Neeraj</p> ]]></content:encoded> </item> <item><title>By: pandu</title><link>http://www.learnqtp.com/how-to-delete-cookies-through-a-script/comment-page-1/#comment-8197</link> <dc:creator>pandu</dc:creator> <pubDate>Mon, 17 May 2010 12:45:17 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/?p=34#comment-8197</guid> <description>I dont want to write script in the qtp.
How to access data from excel sheet and do operations on the application.
For that one i need functions.
we can use the property values in the excel sheet.
can u plz help me</description> <content:encoded><![CDATA[<p>I dont want to write script in the qtp.<br
/> How to access data from excel sheet and do operations on the application.<br
/> For that one i need functions.<br
/> we can use the property values in the excel sheet.<br
/> can u plz help me</p> ]]></content:encoded> </item> <item><title>By: preeti</title><link>http://www.learnqtp.com/how-to-delete-cookies-through-a-script/comment-page-1/#comment-6372</link> <dc:creator>preeti</dc:creator> <pubDate>Fri, 15 Jan 2010 14:06:18 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/?p=34#comment-6372</guid> <description>WebUtil.deletecookies is the direct method available in QTP to  delete the cookies</description> <content:encoded><![CDATA[<p>WebUtil.deletecookies is the direct method available in QTP to  delete the cookies</p> ]]></content:encoded> </item> <item><title>By: Hackoo</title><link>http://www.learnqtp.com/how-to-delete-cookies-through-a-script/comment-page-1/#comment-6008</link> <dc:creator>Hackoo</dc:creator> <pubDate>Wed, 30 Dec 2009 18:17:20 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/?p=34#comment-6008</guid> <description>&#039;This VBScript Made by Hackoo
&#039;it Works so fine for me :) I and i hope that could help &#039;you !
set WshShell = CreateObject(&quot;WScript.Shell&quot;)
user= WshShell.ExpandEnvironmentStrings(&quot;%userprofile%&quot;)
Set fso = CreateObject(&quot;Scripting.FileSystemObject&quot;)
file_path = user &amp; &quot;\Cookies&quot;
WScript.echo(file_path)
Set folder = fso.getFolder(file_path)
For Each Fichier in folder.Files
If UCase(FSO.GetExtensionName(Fichier.Path)) = &quot;TXT&quot; Then
fso.DeleteFile(Fichier)
end if
Next
WScript.echo(&quot;All Cookies are deleted succefuly !&quot;)</description> <content:encoded><![CDATA[<p>&#8216;This VBScript Made by Hackoo<br
/> &#8216;it Works so fine for me <img
src='http://www.learnqtp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> I and i hope that could help &#8216;you !<br
/> set WshShell = CreateObject(&#8220;WScript.Shell&#8221;)<br
/> user= WshShell.ExpandEnvironmentStrings(&#8220;%userprofile%&#8221;)<br
/> Set fso = CreateObject(&#8220;Scripting.FileSystemObject&#8221;)</p><p>file_path = user &amp; &#8220;\Cookies&#8221;<br
/> WScript.echo(file_path)<br
/> Set folder = fso.getFolder(file_path)</p><p>For Each Fichier in folder.Files<br
/> If UCase(FSO.GetExtensionName(Fichier.Path)) = &#8220;TXT&#8221; Then<br
/> fso.DeleteFile(Fichier)<br
/> end if<br
/> Next<br
/> WScript.echo(&#8220;All Cookies are deleted succefuly !&#8221;)</p> ]]></content:encoded> </item> <item><title>By: Virender Singh</title><link>http://www.learnqtp.com/how-to-delete-cookies-through-a-script/comment-page-1/#comment-5953</link> <dc:creator>Virender Singh</dc:creator> <pubDate>Mon, 21 Dec 2009 11:14:14 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/?p=34#comment-5953</guid> <description>To delete cookies you can write a one line code.
webutil.deletecookies
webutil.deletecookie
First one deletes all the cookies. Second one deletes cookies specific to the session
Virender Singh
sudhir0101@gmail.com</description> <content:encoded><![CDATA[<p>To delete cookies you can write a one line code.</p><p>webutil.deletecookies</p><p>webutil.deletecookie</p><p>First one deletes all the cookies. Second one deletes cookies specific to the session</p><p>Virender Singh<br
/> <a
href="mailto:sudhir0101@gmail.com">sudhir0101@gmail.com</a></p> ]]></content:encoded> </item> <item><title>By: Vaishali</title><link>http://www.learnqtp.com/how-to-delete-cookies-through-a-script/comment-page-1/#comment-5809</link> <dc:creator>Vaishali</dc:creator> <pubDate>Sat, 05 Dec 2009 12:43:08 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/?p=34#comment-5809</guid> <description>What is the correct script from these number of answers?</description> <content:encoded><![CDATA[<p>What is the correct script from these number of answers?</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 5/22 queries in 0.022 seconds using disk: basic

Served from: www.learnqtp.com @ 2012-02-10 13:13:40 -->
