-
Is there a way in codeceptjs wherein I can issue a click event to the specific position of an element. Just a background of the scenario I'm running into, I have a button element wherein at the center of it is a link that will open a modal. As per my observation, I am expecting like: codeceptjs: 3.3.0 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Found the solution for this one, I've found out that Playwright has an argument option which you can specify the exact position where you want the element to be clicked. But based on my observation when you followed the codeceptjs syntax, it needs to be in the 3rd argument of Here is the sample code ref: https://playwright.dev/docs/api/class-elementhandle#element-handle-click |
Beta Was this translation helpful? Give feedback.
Found the solution for this one, I've found out that Playwright has an argument option which you can specify the exact position where you want the element to be clicked. But based on my observation when you followed the codeceptjs syntax, it needs to be in the 3rd argument of
I.click
.Here is the sample code
I.click('your element text here', xpathLocator, { position: { x:5, y:5} })
ref: https://playwright.dev/docs/api/class-elementhandle#element-handle-click