I have a multi select box that has options that you have to double click in order to send it to a 'Selected' field. No matter what I try, I can't seem to get it to work. The select html looks like so:
<select name="name1" id="id1" ondblclick="a lot of stuff">
<option value='value1'>text1</option>
<option value='value2'>text2</option>
<option value='DoubleClickMe'>DoubleClickMe</option>
<option value='value4'>text4</option>
<option value='value5'>text5</option>
</select>
I want to double click the 'DoubleClickMe' value to send it over to another field. I've tried:
ret = driver.find_element_by_xpath("//select[@id='id1']/option[text()='DoubleClickMe']")
actionChains.double_click(ret).perform()
Originally, this would act like it was double clicking elsewhere on the page (at least highlight some other text). Now... it seems to be selecting a bunch of options to send over, as if it was clicking a heck of a lot more than twice. Similarly, I tried:
actionChains.click(ret).click(ret).perform()
This one is giving me the same results as the previous one.
While in debug mode (pdb), I tried spamming the following (each of which will select the option, but won't read it as a double click:
ret.click()
ret = driver.find_element_by_xpath("//select[@id='id1']")
select = Select(ret)
select.select_by_visible_text("DoubleClickMe")
select.select_by_value("DoubleClickMe")
I tried sending those commands quick enough as to where, if working properly, it should easily be considered a double click.
Is there something that I'm missing or doing wrong?
I'm using:
Windows 7 64-bit
Selenium 2.44
Python 2.7
IE11
Just throwing out ideas... havn't tested this though
(edited)