question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

clear method doesnt work

See original GitHub issue

i try to clear user cookie in my ember app. and the cookie still there…

export default Service.extend({
  cookies: Ember.inject.service(),
  removeCookies() {
    let cookieService = this.get('cookies');
    cookieService.clear('user');
  }
});

its work in chrome. but not in firefox… whats wrong…

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
marcoowcommented, Apr 4, 2018

Thanks for the details @eighthjouster! I just confirmed the respective test breaks in Firefox.

1reaction
eighthjoustercommented, Apr 2, 2018

There is an easy workaround: Just before deleting the cookie, set it again to any value (an empty string should be fine). Firefox will of course “revive” the cookie, and clearing it will work at that point. For example:

// Let's delete the 'arepa' cookie:

    cookieService.write('arepa', '');
    cookieService.clear('arepa');

// The 'arepa' cookie is now gone.
Read more comments on GitHub >

github_iconTop Results From Across the Web

selenium clear() command doesn't clear the element
I cleared a text field using webelement.clear() method, later while executing next command (click event), the text area I had previously cleared ...
Read more >
CLEAR Method skipped while running the tests
Step 1 : Enter Text · Step 2 : Validate Previously entered Text · Step 3 : Clear the text using clear method....
Read more >
clear method not working in Selenium Webdriver - YouTube
clear method not working in Selenium Webdriver. Watch later. Share. Copy link. Info. Shopping. Tap to unmute. If playback doesn't begin ...
Read more >
[Solved] clear() Function does not working - CodeProject
If txtFName is a List or Array or Dictionary then it is perfectly fine as Clear() is available for them.
Read more >
Can't clear input field using IWebDriver.Clear() method
I don't know why the clear() method isn't working for you, but I faced a situation like that recently and I used the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found