Skip to content

Commit 0e680bc

Browse files
committed
Implemented file input clicks in legacy Firefox driver.
1 parent d48e75b commit 0e680bc

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

java/client/test/org/openqa/selenium/UploadTest.java

-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ public void testCleanFileInput() throws Exception {
9999
@Test
100100
@Ignore(IE)
101101
@Ignore(MARIONETTE)
102-
@Ignore(FIREFOX)
103102
@Ignore(CHROME)
104103
@Ignore(PHANTOMJS)
105104
@Ignore(SAFARI)

javascript/firefox-driver/js/wrappedElement.js

+11
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@ WebElement.clickElement = function(respond, parameters) {
6464
var element = Utils.getElementAt(parameters.id,
6565
respond.session.getDocument());
6666

67+
// Handle the special case of the file input element here
68+
69+
if (bot.dom.isElement(element, goog.dom.TagName.INPUT)) {
70+
var inputtype = element.getAttribute('type');
71+
if (inputtype && inputtype.toLowerCase() == 'file') {
72+
respond.status = bot.ErrorCode.INVALID_ARGUMENT;
73+
respond.send();
74+
return;
75+
}
76+
}
77+
6778
var unwrapped = fxdriver.moz.unwrapFor4(element);
6879

6980
var offset = Utils.getClickablePoint(unwrapped);

0 commit comments

Comments
 (0)