Click on a specific
I want to click on the
id = "AllInventoryList_length" > < label > Show < select name = "AllInventoryList_length"
aria - controls = "AllInventoryList"
class = "ready"
style = "display: none;" > < option value = "10" > 10 < /option><option value="25">25</option > < option value = "50" > 50 < /option><option value="100">100</option > < option value = "250" > 250 < /option></select > < div class = "chosen-container chosen-container-single chosen-container-single-nosearch"
style = "width: auto;"
title = "" > < a class = "chosen-single"
tabindex = "-1" > < span > 250 < /span><div><b></b > < /div></a > < div class = "chosen-drop" > < div class = "chosen-search" > < input type = "text"
autocomplete = "off"
readonly = "" > < /div><ul class="chosen-results"><li class="active-result result-selected" style="" data-option-array-index="0">10</li > < li class = "active-result"
style = ""
data - option - array - index = "1" > 25 < /li><li class="active-result" style="" data-option-array-index="2">50</li > < li class = "active-result"
style = ""
data - option - array - index = "3" > 100 < /li><li class="active-result result-selected" style="" data-option-array-index="4">250</li > < /ul></div > < /div> entries</label > < /div>```
I can “catch” the fourth <li> with:
```let listNumber = document.getElementsByClassName('active-result')[4].innerHTML;
console.log(listNumber);```
But I cannot click on it to select it:
```let selected = document.getElementsByClassName('active-result')[4];
selected.click();```
Maybe I should rather try and click on the option querySelector with a value of 250?