cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
47.01k stars 3.18k forks source link

Open Browser Extension Feature #14808

Open Bartlebyy opened 3 years ago

Bartlebyy commented 3 years ago

What would you like?

I want a feature to be able to click on a chrome extension and open it. Similar to where people visit a page, visit/open a chrome extension.

Why is this needed?

I want to use cypress to test our chrome extension, and from querying https://gitter.im/cypress-io/cypress# it looks like I'm far from being the only one who wants this.

You have plugin code letting users load their chrome extensions, but then don't have any documentation showing users how to then open it.

And users then read through your docs assuming you support this and then find nothing on opening it. They then go to your customer chat and get no replies back time and time again ( I stopped looking at past requests after 5 of them were ignored). It's a very frustrating experience.

Please add the functionality to open the extension. You're almost there for supporting extension users, and you already tackled the hard part already.

bahmutov commented 3 years ago

Hi @Bartlebyy what do you mean by "open an extension"? Can you provide screenshots and videos of what do you expect to happen? Can you provide an example extension and the test you are trying to write? Are you testing an extension or want to use 3rd party extension while writing tests?

Bartlebyy commented 3 years ago

I mean being able to click on an extension directly.

I work on the extensions team at Calendly and are looking for alternative tools to use for testing our Chrome and Firefox extensions.

I see you support being able to load a locally created chrome extension, but are unable to actually click on the extension. (Think lastpass extension, you need to click on it to use it)

Our tool when you click on it adds a sidebar to the users DOM.

gif

Bartlebyy commented 3 years ago

So in theory, since I'm new at this I'd want cy.open_extension('calendly') see "Welcome to Calendly for Chrome" appear on screen click login button, etc.

bahmutov commented 3 years ago

Let us think about this, I think it makes more sense to load the extension in the main iframe, so you can interact with it

jennifer-shehane commented 3 years ago

Our other issue for supported testing Chrome extensions: https://github.com/cypress-io/cypress/issues/1965

metal450 commented 3 years ago

Also need the ability to open & test Chrome extension popups

Beaulieu527 commented 3 years ago

Also need this feature! Has anyone figured out a way to do it programmatically with a custom command?

julian-odroqa commented 2 years ago

Any updates on this feature pls?

eldiegod commented 2 years ago

Now that web3 is big out there this is even more important than ever

jonreiland commented 2 years ago

Now that web3 is big out there this is even more important than ever

Seconding this statement. My team is trying to test our blockchain-enabled web app that supports Metamask. A way to automate Metamask interactions would be ideal.

briareus-the-titan commented 2 years ago

Let us think about this, I think it makes more sense to load the extension in the main iframe, so you can interact with it

Can you give an example of how this would work?

jmitchell-figure commented 1 year ago

Would love to see this as well. Our team is working with dApps and I would like to be able to test our wallet connect extension for transferring assets to/from a wallet. Currently I have the chrome extension setup correctly and it will load, but then Cypress can never find the iframe to interact with it.

diegorafaelgraf commented 1 year ago

Are you planning to include this feature in a future version?

NorseGaud commented 1 year ago

For me, it's important to open my Vertically Listed Tabs popup on the left side of the browser, not inside of it. It's a separate window, which I am guessing is a ton of extra complexity.

diegorafaelgraf commented 1 year ago

In my case I need to test using the metamask extension and I'm stuck because I can't interact with the plugin. maybe someone solved it in some other way?

networkmonkey commented 1 year ago

Could we please have some work around this done, having the ability to test and interact with extensions setting would hopefully port more people to cypress

rkefi commented 1 year ago

Any updates on supporting extension interaction? Adding +1 for the web3 case Thx

NanoRoss commented 1 year ago

For these kinds of things that users have been demanding for years, Selenium will continue to be the number one.

philpetrov commented 1 year ago

Hi, i need to work with metamask, playwright has method bringToFront. Do cypress have some updates?

eldiegod commented 1 year ago

stick with playwright cypress is in the downfall

On Thu, Aug 3, 2023 at 3:39 AM Filipp Petrovski @.***> wrote:

Hi, i need to work with metamask, playwright has method bringToFront. Do cypress have some updates?

— Reply to this email directly, view it on GitHub https://github.com/cypress-io/cypress/issues/14808#issuecomment-1663174090, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQ7TX733WRL44U5H5ZXKSTXTL6OZANCNFSM4WXUWQ4Q . You are receiving this because you commented.Message ID: @.***>

BirgitPohl commented 2 months ago

I'm thinking of creating a local server to run and test my chrome extension. But this is like extra-code.

However, currently I'm trying out Cypress component testing and utilising it to test a couple of page-sized components.

Still I'm facing a lot of issues, for example. It doesn't recognize the namespace chrome, so I can't play around with the localStorage and therefore load my component.

Why did I even look into testing the app? I am encountering bugs that I frequently built in, so I need something that prevents me from doing that.

Screenshot 2024-08-22 at 15 07 49