cancel
Showing results for 
Search instead for 
Did you mean: 

Single click not working, but double click works - Browser Automation

DipinDevP
Level 6

Hi,

Why double clicks works, but not single click in HTML Web elements (Table header, Menu Item etc.)

Can anyone please suggest here?

Thanks,

Dipin Dev P

1 REPLY 1

Hi @DipinDevP ,

I have had the same issue, I had this in Chrome, it was because of the HTML structure of the page. 

Press F12/Inspect element, in the panel look out for Event Listeners and you can see the onclick event has either 'click' or 'dbclick'. That's basically the JavaScript functions attached to the code/webpage, 

document.getElementById('header').addEventListener('click', function(event) {
    setTimeout(function() {
        // Code to handle the click event
        console.log('Header clicked');
    }, 500); // 500ms delay
});

 Use 'Focus' action on the element you want to click. Try Adding wait before trying to interact and perform the Click operations. 

This worked in my case, try to understand more how that element performs.