I have a dropdown element, I want to select the All option, the corresponding HTML code is:
<div class="dataTables_length" id="indicators_length"> <label> <span class="result-mune"> <span>Results </span>per page: </span> <select name="indicators_length" aria-controls="indicators" class="jcf-hidden"> <option value="25">25</option> <option value="50">50</option> <option value="100">100</option> <option value="200">200</option> <option value="-1">All</option> </select> <span class="jcf-select jcf-unselectable"> <span class="jcf-select-text"> <span class="">25</span> </span> <span class="jcf-select-opener"></span> </span> </label> </div>
the select
element is not highlighted using the browser Inspect method, looks like this drop down is triggered by js. I tried to use the Select class described here:
select = Select(self._wait.until(EC.presence_of_element_located_by((By.XPATH, "//div[@id = 'indicators_length']//select[@name = 'indicators_length']"))) select.select_by_value('-1')
not working. and ActionChain method and even execute_script method, all not working. This bothers me a lot, hope somebody can help.
select
element was correctly chosen. The thing is that 25 (the default) doesn't change to 'All', and the program raise no error.