擅长:python、mysql、java
<pre><code>from selenium.webdriver.remote.webelement import WebElement
### Find the table first
table = browser.find_element_by_css_selector(
'table.dijit.dijitReset.dijitMenuTable.dijitSelectMenu.dijitValidationTextBoxMenu.dijitMenu.dijitMenuPassive'
)
### Loop through all td in the table
for td in table.find_elements_by_tag_name('td'):
assert isinstance(td, WebElement)
### If the text value cast to int is 50 click and break.
if int(td.text) == 50:
td.click()
break
</code></pre>