If you know the x and y values of an element, but you don't know which element it is, how to locate this element through xMagol y

the current process is as follows:
1. The value in the pdf is extracted from the backend
2, the pdf is converted to HTML and displayed at the front end, and the value is extracted by highlighting the backend

.

so here comes the problem. The backend extraction is based on pdf extraction. You can only get the x and y values of the extracted element, but not the xpath, of the element. So how can you find the element

based on the x, y values?
Dom
Sep.03,2021

to answer myself, I finally used the elementFromPoint method. Although it was a bit troublesome and had a lot of judgment and calculation, the problem was solved

.
//--------------------------------------------------------------

found the elementFromPoint method, but because the calculation of this method starts from the upper left corner of the screen, and when the input value exceeds the screen size, it can only return null , so it cannot meet the requirements

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be9a4f-39d40.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be9a4f-39d40.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?