Skip to content

session data exists after rerun tests #8

Closed

Description

@nhu

Hi,

there must be an issue with terminating the data of the used session. If I run my tests once and rerun them, the second run has data of the first run. How can I disable this behavior or is it a bug?

I am using webdriverio helper with phantomjs.

Activity

  1. DavertMik commented on Dec 2, 2015

    @DavertMik
    Contributor

    Thanks. First real bug! I think cookies should be cleaned in _after hook of webdriver to ensure session is not saved.

  2. nhu commented on Dec 3, 2015

    @nhu
    Author

    Hi,

    I am unsure if this is a bug in codeceptjs or in webdriverio.
    Because you even can't clear the session storage without getting errors.

    clearStorage(){
      return this.browser.sessionStorage('DELETE');
    }
    
  3. DavertMik commented on Dec 3, 2015

    @DavertMik
    Contributor

    I will take a look and do what I can with it...

  4. nhu commented on Dec 7, 2015

    @nhu
    Author
  5. Teknologica commented on Mar 25, 2016

    @Teknologica

    I've stumbled on the same issue. Clearing localStorage, sessionStorage or cookies has no effect using Phantom JS with Webdriver IO.

    class ClearUser extends Helper {
        clearAuthentication() {
            let client = this.helpers['WebDriverIO'].browser;
            return client
                .localStorage('DELETE')
                .sessionStorage('DELETE')
                .deleteCookie();
        }
    }
  6. DavertMik commented on Mar 25, 2016

    @DavertMik
    Contributor

    Right now I can recommend not to use phantomjs...
    Anyway I will take a look when I have time

  7. Teknologica commented on Mar 25, 2016

    @Teknologica

    That's unfortunate, but there's cases where the tests can't run in a browser with a GUI so phantom js is required. I'll keep looking for a solution.

  8. Teknologica commented on Mar 25, 2016

    @Teknologica

    The issue of Phantom Js is related to Ghost Driver. See https://github.com/detro/ghostdriver/issues/170 -- it's been around since 2013.

  9. DavertMik commented on Mar 25, 2016

    @DavertMik
    Contributor

    I plan to implement Nightmare helper in one of next releases.
    I hope it will work better than PhantomJS

  10. umutm commented on May 27, 2016

    @umutm

    Any progress regarding Nightmare integration? And, is it still in the roadmap? Thanks.

  11. DavertMik commented on Jan 13, 2017

    @DavertMik
    Contributor

    Nightmare is implemented, webdriverio has its new versions so I think this can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions