hover(selector) versus button(selector).exists #2658
Faulkner368
started this conversation in
General
Replies: 1 comment 3 replies
-
Yes Taiko does a check for element to be actionable before performing any action, can you please point me to the place where you noticed this step that you felt redundant ? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am not familiar with Taiko but was doing some PR's recently and encountered some gauge / taiko steps where it appeared to me based on my limited knowledge that a step was redundant.
I felt so because first a
button(selector).exists()
check was made, thenhover(selector)
using the same selector, the documentation states that a error is thrown if hover selector finds no elements.So aren't these two functions testing the same thing and using both redundant ? as checking the button exists using a query selector verifies the button is in the DOM, but since hover just checks it can find an element in the DOM matching the selector then its basically the same check; if you can hover on it then it exists so why have both button exists and hover both using the same selector.
I wanted to see if there was a good reason and or benefit to using the hover, I suspected its existence meant it did more than just check the DOM for the selector otherwise it just repeats things like
button(selector)
orlink(selector)
and feels pointless so wanted to check if I was missing something and the hover was beneficial for its own hover related reasons.Excuse my ignorance regarding Taiko
Beta Was this translation helpful? Give feedback.
All reactions