Skip to content
Advertisement

How to button clicked using playwright testing framework?

Currently , i am doing an end to end testing in my nuxt project. I want to test the frontend of my project to ensure the UI is presentable and clickable. However , I am facing a problem for my button. It felt like button is not clicked. I am pretty sure the css selector for my button is correctly defined as shown in here

Button Screenshot

The screenshot shows that the button is hovered over or partially clicked. Is there any way to solve this issue ?

page.spec.ts

JavaScript

Advertisement

Answer

You can try force clicking the button. Setting force to true will bypass the actionability check.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement