Hello, i'm trying to solve captcha in yandex search (https://yandex.ru/search?text=123). I'm stuck at the stage of clicking on the captcha image. My click attempts don't result in marks appearing on the image.
I tried target on different html elements, tried PointerEvent. Sent events are visible in the debugger, and the same events allow you to click on a button, but the events do not lead to the appearance of marks on the image.
Please any comments?
var el = document.getElementsByClassName('AdvancedCaptcha-ImageWrapper')[0].firstChild;
var rect = el.getBoundingClientRect();
var x = rect.right - rect.left / 2;
var y = rect.bottom - rect.top / 2;
var ev = new MouseEvent('click', {
view: window,
bubbles: true,
cancelable: true,
offsetX: x,
offsetY: y
});
el.dispatchEvent(ev);
I tried target on different html elements, tried PointerEvent. Sent events are visible in the debugger, and the same events allow you to click on a button, but the events do not lead to the appearance of marks on the image.
Please any comments?