cloudfour/pleasantest
View on GitHubImprove error message when trying to interact with element that is hidden because of low opacity
Open
#398 opened on Feb 2, 2022
debuggability improvementgood first issue
Repository metrics
- Stars
- (175 stars)
- PR merge metrics
- (PR metrics pending)
Description
Currently if you try to click/type an element that has low opacity to the point of not being visible, here is the error message:
Cannot perform action on element that is not visible (it is near zero opacity):
<...element ...>
It would be easier to debug if it cascaded up the DOM tree and printed out any non-opaque element:
Cannot perform action on element that is not visible (it is near zero opacity):
<input ...>
Its ancestor, this <div>, has an opacity of 0.02:
<div ...>
Or if there are multiple:
Cannot perform action on element that is not visible (it is near zero opacity):
<input ...>
Its ancestor, this <div>, has an opacity of 0.25:
<div ...>
Another ancestor, this <div>, has an opacity of 0.25:
<div ...>
Another ancestor, this <div>, has an opacity of 0.25:
<div ...>
This results in the <input> having a net opacity of 0.016, which is not visible.