Closed Christopher-Hayes closed 2 years ago
@Christopher-Hayes
Going to fix this with a console warning like this
Will be released soon
@Christopher-Hayes
I've released version https://github.com/wswebcreation/wdio-image-comparison-service/releases/tag/v1.13.0. Can you please check it and if fixed close the issue?
Is your feature request related to a problem? Please describe. I have elements that only exist on certain pages and the library not finding one of the remove elements causes the screenshot to never be taken. For me, it isn't critical that every element in
removeElements
is removed. I just want the elements that do exist to be removed and non-existing ones to be ignored because some can be intermittent (ex: random sales popup).Describe the solution you'd like I would like the screenshot function (like
saveFullPageScreen()
) to first check if an element exists before attempting to remove it, or at least fail in a way that doesn't stop the screenshot from being taken.Describe alternatives you've considered My current solution is to create a
removeElements
array ahead of thesaveFullPageScreen()
by first checkingisDisplayed()
on each element before passing that to thesaveFullPageScreen()
options.Additional context It looks like xPath doesn't like elements that don't exist, causes the function to fail. For context in the error below
.lp_promo_banner
is the element by trying to hide that doesn't exist on all pages. If it's useful, my (simplified) function call looks like: