Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google autocomplete with cypress does not seem to work at all #30354

Open
paddyinsofia opened this issue Oct 3, 2024 · 0 comments
Open

Google autocomplete with cypress does not seem to work at all #30354

paddyinsofia opened this issue Oct 3, 2024 · 0 comments
Labels
stage: needs investigating Someone from Cypress needs to look at this

Comments

@paddyinsofia
Copy link

paddyinsofia commented Oct 3, 2024

Current behavior

I am trying to get google autocomplete with maps for addresses t owork with cypress but it does not seem to function and there is very little information online for it. I need to be able to select address and move to the next fields

Desired behavior

Would like to be able to auto select address

Test code to reproduce

// Google Maps Autocomplete for Address
            const location = '418 Central Park West'; // Address you're testing with

            // Type the address into the Google Autocomplete input (only once)
            cy.get('input[name="newQuote_itineraryStopAddress_1"]')
              .clear()
              .type(location, { delay: 500 });

            // Ensure the autocomplete dropdown is visible
            cy.get('.pac-item', { timeout: 10000 }).should('be.visible');

            // Use the down arrow and Tab keys to select the first suggestion
            cy.get('input[name="newQuote_itineraryStopAddress_1"]').type('{downarrow}{tab}');

            // Optionally, verify that the input field now contains the selected address
            cy.get('input[name="newQuote_itineraryStopAddress_1"]')
              .should('have.value', '418 Central Park West, New York, NY, USA'); // Replace with the expected full address

Cypress Version

13.14.2

Node version

22.8.0

Operating System

Linux Debian

Debug Logs

No response

Other

No response

@jennifer-shehane jennifer-shehane added the stage: needs investigating Someone from Cypress needs to look at this label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs investigating Someone from Cypress needs to look at this
Projects
None yet
Development

No branches or pull requests

2 participants