I am scrapping a webpage that uses Java Applet
. This applet generate a select tag and I want to click one of its options.Selenium
does find the element when I run:
doc_select = Select(self.driver.find_element_by_class_name('selectClass'))
If I inspect doc_select
, I get:
<selenium.webdriver.support.select.Select instance at 0xb5a486ec>
And I can see that the driver has found all of the options in the debugger.
However, if I try to select one of the options using:
doc_select.select_by_value('9501')
It throws me the exception:
{ElementNotVisibleException}Message: Element is not currently visible and so may not be interacted with Stacktrace: at fxdriver.preconditions.visible (file:///tmp/tmpmxvBee/extensions/[email protected]/components/command-processor.js:10092) at DelayedCommand.prototype.checkPreconditions_ (file:///tmp/tmpmxvBee/extensions/[email protected]/components/command-processor.js:12644) at DelayedCommand.prototype.executeInternal_/h (file:///tmp/tmpmxvBee/extensions/[email protected]/components/command-processor.js:12661) at DelayedCommand.prototype.executeInternal_ (file:///tmp/tmpmxvBee/extensions/[email protected]/components/command-processor.js:12666) at DelayedCommand.prototype.execute/< (file:///tmp/tmpmxvBee/extensions/[email protected]/components/command-processor.js:12608)
Is there any way to interact with elements generated by Java Applet
? How to make those applets elements visible to Selenium
? There is some alternative to Selenium
in which I can automate Java Applets
?
Webdriverwait
to wait until select box visible...let me know if you have any problem... – Saurabh Gaur