Uncaught Typeerror Visible is not a Function in Cypress

Asked

Viewed 27 times

0

My application is giving this error message.

Uncaught Typeerror: navbar.Visible is not a Function This error originated from your application code, not from Cypress. When Cypress detects uncaught errors Originating from your application it will Automatically fail the Current test. This behavior is configurable, and you can Choose to turn this off by Listening to the 'uncaught:Exception' Event.
https://on.cypress.io/uncaught-exception-from-application

The code in question is this:

/// <reference types="cypress" />
 
describe('acesso padrao',  () => {
    before(() => {
        cy.visit('https://meusitehipotetico.br/login')
    })
 
    it('login', () => {
        cy.get('#login_form_type_username').type('1');
    })
})

I’ve tried a lot of other ways and I can’t, someone would have a suggestion?

HTML

<form name="login_form_type" method="post" action="/login_check" role="form">
<div class="form-content">

    <div id="login_username">
        <div id="login_username_error" class="form-error" style="display: none;"></div>
        <div class="form-group">
            <label for="login_form_type_username" class="required">CPF ou Email</label>
                
            <input type="text" id="login_form_type_username" name="login_form_type[username]" required="" placeholder="Digite seu CPF ou email" tabindex="1" onkeyup="validator.onKeyUpMultiformat(this, event)" class="form-control" value="">
        </div>
        <div class="text-right">
            <button type="button" onclick="check_username();" class="btn btn-block btn-success" tabindex="5">Próximo</button>
        </div>
   </div>
</form>
  • 1

    Could display the html that has the widget: login_form_type_username.

  • But from what I understand from the code, the section you posted doesn’t seem to be related to the error message.

  • I just posted the HTML @Danizavtz

  • html looks ok, test too. I could comment on this test and try again?

  • If I comment the test it simply passes. What I need is only to be able to write some number in the CPF fields.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.