You can use strings to "hit" the click where you want, based on references that would be the screen size.
Then screen with largura X e altura Y.
My mouse goes up to the string 20x 10y
and click.
another way would be you using the keyboard tab. Then you would count how many tabs it would take to get to the element you want to click, and then click and write if needed. and so on.
These are the two ways I thought you could use in these cases. I hope I’ve helped.
The following example is shown in this question
function posicao(e) {
var el = this;
var coordenadas = el.getBoundingClientRect();
var res =
console.log('posição x', coordenadas.left, 'posição y', coordenadas.top)
}
document.getElementById('meio').addEventListener('click', posicao);
document.getElementById('fundo').addEventListener('click', posicao);
#meio, #fundo {
background: #ccd;
padding: 30px;
position: absolute;
border: 2px solid #500;
cursor: pointer;
}
#meio {
top: 50%;
left: 50%;
}
#fundo {
bottom: 0;
right: 0;
}
<div id="meio"></div>
<div id="fundo"></div>
Your question seems to have some problems and your experience here in Stack Overflow may not be the best because of this. We want you to do well here and get what you want, but for that we need you to do your part. Here are some guidelines that will help you: Stack Overflow Survival Guide in English.
– Maniero