I am writing a chrome extension to grab some data from a web site I'm subscribed to (I am reasonably sure I can, I just want to recover the data I inserted myself). So far, a content script seems enough for the architecture of my extension. Now, if I have simple element like the following
<button class="button btn btn-default paginateItems">
...
</button>
I can easily find it (using jquery) and click it and it does what it does when I click it as a user. But I have problems with an hidden element like this:
<button id="dropdown01" class="btn btn-default text-center icon-punti font18" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
...
</button>
...
<ul class="dropdown-menu pull-right yellow-bg" aria-labelledby="dropdown01">
<li class="opensans_bold font12 align-center">
<a href="#" class="edit-element" data-id="123123" data-toggle="modal" >
...
</a>
</li>
If I select and click the link, nothing happens. Well, I thought, that must be because it is hidden behind that hidden <li>
, so let's pop the menu up by clicking on the dropdown button. But if I do, I can see that the click was done because the button look changes, but the popup does not show up. So I thought, well, let's change the aria-expanded
attribute of the button to true: but that simply had no effect whatsoever, I could even check with the developer tools that the value of the attribute was not changed.
I really don't know what else I can try, any idea what I am doing wrong, or what I can try?