How is _under different in 5.x.y?In versions prior to V5.0, _under would take one offset value which would indicate the left boundary while looking for elements. There was no check for the right boundary. Since there was no check for the right boundary, sometimes an element below a column header but lying under a different column on the right would get identified.
In V5.0, we have modified _under to look for elements which fall within the left and right boundaries of the reference element.
- If you pass a single value in offset, both left and right side offsets will get the same value.
To pass a different left and right offset, pass an array with 2 values.
This will look for elements which are under the refEl but will look 10 pixels more to the left and 100 pixels more to the right.
Example: _under(refEl, [10,100]).
If you wrote scripts for a previous version and specified an offset, in V5.x.y _under would assign the same offset value for the right boundary. This may cause elements not to be identified, since the right boundary may be too less.
So if you could find an element in a previous version but are unable to do so in V5.x.y, use _under with a second parameter like this:
The relevant portion is the number 100, which gives extra allowance on the right to look under.
info The same explanation holds true for