selenium python的md选项大部分时间失败
嗨,我有以下代码selenium python的md选项大部分时间失败,python,selenium,dropdown,Python,Selenium,Dropdown,嗨,我有以下代码 <md-option ng-repeat="sector in allSector | orderBy:'name'" ng-value="{"id":239,"name":"MU-BHND-JC32-0033","regionInventory":{"id":18,"regionName":"Mumbai","zone":{"id":4,"name":"WEST","longitude":73.1812,"country":{"id":3,"name":"INDIA",
<md-option ng-repeat="sector in allSector | orderBy:'name'" ng-value="{"id":239,"name":"MU-BHND-JC32-0033","regionInventory":{"id":18,"regionName":"Mumbai","zone":{"id":4,"name":"WEST","longitude":73.1812,"country":{"id":3,"name":"INDIA","countryCode":"IND"},"latitude":22.3072},"stateCode":"MU","latitute":19.076,"longitude":72.8777},"latitute":19.29117616,"longitude":73.04375901,"coordinates":null,"centroid":null}" tabindex="0" class="ng-scope md-ink-ripple" role="option" aria-selected="false" id="select_option_982" aria-checked="true" value="[object Object]" style>
试着替换
subRegOpt = driver.find_element_by_xpath("//md-option[@ng-value='MU-BHND-JC32-0033']")
与
试着替换
subRegOpt = driver.find_element_by_xpath("//md-option[@ng-value='MU-BHND-JC32-0033']")
与
subRegOpt = driver.find_element_by_xpath("//md-option[contains(@ng-value, 'MU-BHND-JC32-0033')]")