Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am doing an exercise to search a solicitor, then access her profile, then log out. I would like to clear the browser cache or the cookies, so when I run the script in a continuous pattern, it will act like start from the beginning.

It doesn't seems to work. Please give me some advise on how to modify my script so I can delete the cookies.

The error message showed in the Selenium IDE log section:

[error] Element id=edit-name not found

  1. For example, for cookie _utma, the value for expires changed from 7/10/2015 9:24pm to 7/11/2015 9:24pm, I am not sure if this means the cookie being deleted successfully OR the value changes due to execution of the script.
  2. what is the correct syntax for deleCookie command in Selenium Here are the syntax I used

deleteCookie > "path=/",domain=".jlaustin.tcheetah.com","recurse=true"

OR deleteCookie >"path=/,domain=.jlaustin.tcheetah.com,recurse=true"

  1. I would like to know what is the difference between a domain and a host From My Firefox browser, the view cookie section show the value for the cookie agent and the cookie *_utma*

    table view of the script, screenshot1 , screenshot2

Here is the script generated by Selenium IDE (version 1.10.0)

<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">search_solicitor</td></tr>
</thead><tbody>
<tr>
    <td>setSpeed</td>
    <td>5000</td>
    <td></td>
</tr>
<tr>
    <td>deleteCookie</td>
    <td>agent</td>
    <td>&quot;path=/&quot;, domain=&quot;.jlaustin.tcheetah.com,&quot; recurse=true&quot;</td>
</tr>
<tr>
    <td>deleteCookie</td>
    <td>user</td>
    <td>&quot;path=/&quot;,domain=&quot;.jlaustin.tcheetah.com&quot;,&quot;recurse=true&quot;</td>
</tr>
<tr>
    <td>deleteCookie</td>
    <td>uweopenid</td>
    <td>&quot;path=/&quot;,domain=&quot;.jlaustin.tcheetah.com&quot;,&quot;recurse=true&quot;</td>
</tr>
<tr>
    <td>deleteCookie</td>
    <td>_utma</td>
    <td>&quot;path=/&quot;,domain=&quot;.jlaustin.tcheetah.com&quot;,&quot;recurse=true&quot;</td>
</tr>
<tr>
    <td>deleteAllVisibleCookies</td>
    <td></td>
    <td></td>
</tr>
<tr>
    <td>open</td>
    <td>/?html=openid&amp;logout=1</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>6000</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>css=input[type=&quot;submit&quot;]</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>5000</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>id=edit-name</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>id=edit-pass</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>name=autologin</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>id=edit-submit</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>id=cmp_admin</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>link=Donor</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>link=manage solicitors</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>link=Baldwin, Donna</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>css=span.systemsmallbold &gt; a</td>
    <td></td>
</tr>
<tr>
    <td>deleteAllVisibleCookies</td>
    <td></td>
    <td></td>
</tr>
</tbody></table>
share|improve this question
@Ankit jain, can your guys take a look at this post and give me some advises regards to how to delete or clear cache using Selenium IDE. Or Shall I write separate code to clear the browser cache? – user2061466 Jul 14 at 19:23
@Anders Lindahl, could you take a look at this post and give me some advises regards to how to delete or clear cache using Selenium IDE. Or Shall I write separate code to clear the browser cache? – user2061466 Jul 14 at 19:24
@Cedric Beust, Could you take a look at this post and give me some advises regards to how to delete or clear cache using Selenium IDE. Or Shall I write separate code to clear the browser cache – user2061466 Jul 14 at 19:24
@hr_117, Could you take a look at this post and give me some advises regards to how to delete or clear cache using Selenium IDE. Or Shall I write separate code to clear the browser cache – user2061466 Jul 14 at 19:25
@@Engineer Dollery, Could you take a look at this post and give me some advises regards to how to delete or clear cache using Selenium IDE. Or Shall I write separate code to clear the browser cache – user2061466 Jul 14 at 19:26
show 1 more commentadd comment (requires an account with 50 reputation)

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.