Skip to content

waitForText raises "Cannot read property 'then' of undefined" #11

Closed

Description

@antonioribeiro

waitForVisible works fine, but raises this error

codecept

Activity

  1. adrianblynch commented on Dec 7, 2015

    @adrianblynch

    Re waitForVisible: Not a fix, but an answer as to why it's happening. Remove the . from This is me. - Does it start working for you?

    lib/helper/WebDriverIO.js:withStrictLocator() passes text straight through and my guess is that any special characters cause issues.

    You might get around it by modifying the text you search for. No ideal but hey...

  2. antonioribeiro commented on Dec 7, 2015

    @antonioribeiro
    Author

    @adrianblynch, it doesn't seems to be that, tried a different string, without special characters

    image

  3. adrianblynch commented on Dec 7, 2015

    @adrianblynch

    What about the spaces? I thought I tried a string with spaces but maybe it was just the ..

  4. antonioribeiro commented on Dec 7, 2015

    @antonioribeiro
    Author

    Nope. Not even with a single spaceless word.

  5. adrianblynch commented on Dec 7, 2015

    @adrianblynch

    Strange.

    If you switch to I.see("This is me."), what happens?

  6. antonioribeiro commented on Dec 7, 2015

    @antonioribeiro
    Author

    Green.

    Scenario('test login', (I) => {
        I.amOnPage('/auth/login');
        I.see('Entrar');
        I.fillField('email', 'acr@antoniocarlosribeiro.com');
        I.fillField('password', 'foda-se');
        I.click('Entrar');
        I.see('This is me.');
        I.see('Painel de Controle');
        I.waitForVisible('.widget', 10);
        I.see('OPERADORES');
        I.see('ATENDIMENTOS');
        I.see('MENSAGENS');
    });
    

    image

  7. roadhump commented on Dec 9, 2015

    @roadhump
    Contributor
  8. added a commit that references this issue on Dec 14, 2015
    e3a27b7
  9. DavertMik commented on Dec 14, 2015

    @DavertMik
    Contributor

    Thanks for investigation and fix

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions