I am trying to get the name of the last downloaded file in my selenium javascript application.
I have my selenium driver navigating to the chrome downloads page using: driver.get('chrome://downloads');
, but when I get there, selenium is not able to find ANY elements on the download page.
The chrome downloads page 'chrome://downloads' has a bunch of shadow-root
elements that I don't know how to get underneath in order to access the id's that I want. How do I access identifiers beneath shadow-root
items?
I want to get $("#file-link") as shown here:
But when I use jquery to find it, everything returns null (probably because it's behind shadow-root
)
Here's a big picture of all the information I have including showing that "#file-link" totally exists:
The code I am using to wait for the element to exist is the same that I use for all elements in my application, so I think this is already working:
driver.wait(until.elementLocated(By.id('file-link')), 120000).then(function(){
//yay
});
Here is my version information:
- Chromium v54.0.2840.71
- Node v6.5.0
- ChromeDriver v2.27.440175
- selenium-webdriver v3.4.0
Similar Question
- Selenium webdriver can't find elements at chrome://downloads (This is the same problem I am having but in python)
via Kayvar
No comments:
Post a Comment