You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 24, 2023. It is now read-only.
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 the saveFullPageScreen() by first checking isDisplayed() on each element before passing that to the saveFullPageScreen() 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:
The text was updated successfully, but these errors were encountered:
Christopher-Hayes
changed the title
Feature Request: Make Screenshot Fail Gracefully when removeElements contain non-existing elements
Feature Request: Make Screenshot Fail Gracefully when removeElements non-existing
Mar 11, 2020
Christopher-Hayes
changed the title
Feature Request: Make Screenshot Fail Gracefully when removeElements non-existing
Feature Request: Screenshot fail gracefully when removeElements non-existing
Mar 11, 2020
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:
The text was updated successfully, but these errors were encountered: