I have a drop down menu and need to select an item based on its value.
let's say I want to select value "50.0"

full HTML of the table is at the end of the post: below code can work based on the ID (but the problem is that everytime I reload the page the ID changes so I have to update it in my code).
width = browser.find_element_by_css_selector("#linemodechannelwidth > tbody > tr > td.dijitReset.dijitStretch.dijitButtonContents > div.dijitReset.dijitInputField.dijitButtonText > span")
actions3 = ActionChains(browser)
actions3.click(width).perform()
time.sleep(4)
spacing50 = browser.find_element_by_css_selector('#dijit_MenuItem_27_text')
spacing50.click()
what should be the code to use to select the value 50.0 from the dropdown box based on its value and not the ID ?
Below is the HTML of this dropdown menu:
<table class="dijit dijitReset dijitMenuTable dijitSelectMenu dijitValidationTextBoxMenu dijitMenu dijitMenuPassive" role="listbox" tabindex="0" cellspacing="0" id="linemodechannelwidth_menu" widgetid="linemodechannelwidth_menu" style="top: 0px; visibility: visible;" aria-labelledby="linemodechannelwidth">
<tbody class="dijitReset" data-dojo-attach-point="containerNode"><tr class="dijitReset dijitMenuItem" data-dojo-attach-point="focusNode" role="option" tabindex="-1" id="dijit_MenuItem_27" aria-label="50.0 " aria-disabled="false" widgetid="dijit_MenuItem_27" aria-selected="false" style="user-select: none;">
<td class="dijitReset dijitMenuItemIconCell" role="presentation">
<span role="presentation" class="dijitInline dijitIcon dijitMenuItemIcon dijitNoIcon" data-dojo-attach-point="iconNode"></span>
</td>
<td class="dijitReset dijitMenuItemLabel" colspan="2" data-dojo-attach-point="containerNode,textDirNode" role="presentation" id="dijit_MenuItem_27_text">50.0</td>
<td class="dijitReset dijitMenuItemAccelKey" style="display: none" data-dojo-attach-point="accelKeyNode" id="dijit_MenuItem_27_accel"></td>
<td class="dijitReset dijitMenuArrowCell" role="presentation">
<span data-dojo-attach-point="arrowWrapper" style="visibility: hidden">
<span class="dijitInline dijitIcon dijitMenuExpand"></span>
<span class="dijitMenuExpandA11y">+</span>
</span>
</td>
37.5
+
62.5
+
75.0
+
87.5
+