On the old contacts page I want to click on the "add to groups" button using jquery. But doing a simple
$("div#\\:uo").click()
Doesn't work, because I think google has tried to prevent it from happening.
The way I think they are doing this, is by adding certain classes on Hover (you can see it change in the element inspector), and only firing the click event if those classes are there. The classes that get added in this case are tk3N6e-LgbsSe-ZmdkE
, this is in addition to the already existing classes tk3N6e-LgbsSe VIpgJd-TzA9Ye-eEGnhe tk3N6e-LgbsSe-n2to0e tk3N6e-LgbsSe-vhaaFf-LK5yu ipG21e
On click the following classes also get added tk3N6e-LgbsSe-FNFY6c
and the attribute aria-expanded
changes from false
to true
So how can I go about clicking that button programmatically? That button is visible only when you have some contacts selected.