Replies: 5 comments 2 replies
-
"selector couldn't there be a function inside taiko to always be able to call the last option? |
Beta Was this translation helpful? Give feedback.
-
Somebody help me, pls |
Beta Was this translation helpful? Give feedback.
-
There is no direct method to perform action on the last matching element but you can iterate over the list to of matching elements to perform action on desired element. Please refer https://docs.taiko.dev/api/elementwrapper/#elements. I would also suggest trying a more specific selector to correctly pick the element to be actioned on rather than iterating over to last element as this can avoid any flakiness related to element ordering. |
Beta Was this translation helpful? Give feedback.
-
@NivedhaSenthil could you give me an example of how to click on the last "test" element? await click("teste") final element |
Beta Was this translation helpful? Give feedback.
-
Example jquery $('span.mention').textContent="@" How I set to click($('span.mention').textContent="@") last element? |
Beta Was this translation helpful? Give feedback.
-
Hi, I would like to know how do I select the last element/object. I just found a constant from first to, last no
Examples:
await tap('@', {exactMatch: true}, LAST OBJECT)
await click('@', {exactMatch: true}, LAST OBJECT)
Beta Was this translation helpful? Give feedback.
All reactions