We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 466621d commit 8bc731cCopy full SHA for 8bc731c
1 file changed
javascript/node/selenium-webdriver/lib/webdriver.js
@@ -2538,10 +2538,15 @@ class WebElement {
2538
)
2539
}
2540
2541
- keys = await this.driver_.fileDetector_.handleFile(
2542
- this.driver_,
2543
- keys.join('')
2544
- )
+ try {
+ keys = await this.driver_.fileDetector_.handleFile(
+ this.driver_,
+ keys.join('')
2545
+ )
2546
+ } catch (ex) {
2547
+ console.log('Error trying parse string as a file with file detector; sending keys instead' + ex)
2548
+ }
2549
+
2550
return this.execute_(
2551
new command.Command(command.Name.SEND_KEYS_TO_ELEMENT)
2552
.setParameter('text', keys)
0 commit comments