Python Selenium - Cannot clear default value and paste new value in drop down box -


i need clear default value website's drop-down box, , paste new value it.

<div>   <select id="gene.profile" class="form-control shinyjs-resettable selectized shiny-bound-input" data-shinyjs-resettable-id="gene.profile" data-shinyjs-resettable-type="select" data-shinyjs-resettable-value="a1cf" tabindex="-1" style="display: none;"><option value="a1cf" selected="selected">a1cf</option></select>     <option value="a1cf" selected="selected">a1cf</option>   </select>   <div class="selectize-control form-control shinyjs-resettable single">     <div class="selectize-input items full has-options has-items focus input-active dropdown-active">     <div data-value="a1cf" class="item">a1cf</div>     <input type="text" autocomplete="off" tabindex="" style="width: 4px; opacity: 0; position: absolute; left: -10000px;">     ::after   </div>   <div class="selectize-dropdown single form-control shinyjs-resettable" style="display: none; visibility: visible; width: 112px; top: 34px; left: 0px;">     <div class="selectize-dropdown-content">...</div>   </div> </div> 

the dropdown box contain list of options, have paste value need box after clearing default "a1cf" value, instead of choosing list

sample code far:

#clicking on box works driver.find_element_by_xpath("//*[@class='selectize-control form-control shinyjs-resettable single']").click()  #clearing box doesn't work option = driver.find_element_by_xpath("//*[@class='selectize-input items full has-options has-items focus input-active dropdown-active']/div[@data-value='a1cf']") option.clear() option.send_keys("zxdc") 

that gives "element must user-editable in order clear it" error, while:

option = driver.find_element_by_xpath("//select[@id='gene.profile']/option[@value='a1cf']") 

gives "element not interactable , may not manipulated" error.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -