File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
javascript/firefox-driver/js Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,20 @@ SyntheticMouse.prototype.isElementShown = function(element) {
99
99
100
100
101
101
SyntheticMouse . prototype . isElementClickable = function ( element ) {
102
+ // Check to see if this is an option element. If it is, and the parent isn't a multiple
103
+ // select, then check that select is clickable.
104
+ var tagName = element . tagName . toLowerCase ( ) ;
105
+ if ( 'option' == tagName ) {
106
+ var parent = element ;
107
+ while ( parent . parentNode != null && parent . tagName . toLowerCase ( ) != 'select' ) {
108
+ parent = parent . parentNode ;
109
+ }
110
+
111
+ if ( parent && parent . tagName . toLowerCase ( ) == 'select' && ! parent . multiple ) {
112
+ return this . isElementClickable ( parent ) ;
113
+ }
114
+ }
115
+
102
116
// get the outermost ancestor of the element. This will be either the document
103
117
// or a shadow root.
104
118
var owner = element ;
You can’t perform that action at this time.
0 commit comments