【发布时间】:2015-08-04 17:40:06
【问题描述】:
我想通过 id 点击某个选项.. 问题在我的选择上面
<ul style="display: block; visibility: visible;"><li><a href="#" index="0" class="" onclick="s_objectID="https://viajemais.voeazul.com.br/Contact.aspx#_573";return this.s_oc?this.s_oc(e):true">....
当我单击下拉按钮时,这就是可见的 比我有选择
<select id="ControlGroupContact_ContactInputView_DropDownListStateProvince" name="ControlGroupContact$ContactInputView$DropDownListStateProvince" readonly="false" class="jqTransformHidden"><option selected="" value="">Escolha um</option>
<option value="BR|AC">Acre</option>...
我已经尝试使用该代码:
countries_dropdown = self.browser.find_element_by_class_name('countryBR')
countries_dropdown.click()
country_dropdown = Select(countries_dropdown.find_element_by_id('ControlGroupContact_ContactInputView_DropDownListCountry'))
country_dropdown.select_by_value(payer_details.country_code.upper())
所以即使我打开下拉菜单,我什至会打开下拉菜单,即使我不打开下拉菜单,我得到的错误是
selenium.common.exceptions.ElementNotVisibleException: Message: element not visible: Element is not currently visible and may not be manipulated
(Session info: chrome=44.0.2403.125)
(Driver info: chromedriver=2.15.322448 (52179c1b310fec1797c81ea9a20326839860b7d3),platform=Windows NT 6.3 x86_64)
【问题讨论】: