How can I access the class I marked blue on the screenshot below and click on it? The "main class" and "section class" always got the same name. I have tried by starting at a class which I believe is the parent and find about its children step by step by using
var x = document.getElementsByClassName("_9eogI E3X2T")[0];
window.alert(x);
but that keeps giving me "undefined" and I don't know how to get into the class I marked on the screenshot because the blue marked area in code always got a different name too :/
Try using let x = document.querySelector('.Nnq7C.weEfm');
querySelector will return the first element matching the query. Keep in mind that you have to add the "." to specify that you want to query a class. Also if you want to query for elements with multiple classes on them, you have to write it as one string without spaces and every class should start with a ".".