简体   繁体   中英

Selenium webdriver: can I check if a resource (e.g. XML file) has been loaded?

I have Fusion Maps and Fusion Charts in my application, which load XML files to get data to visualise.

What I would like to do is, using JUnit tests (webdriver), to check if a certain XML file has been loaded (or, at an higher level, that a file has been loaded).

Is this even possible?

I know that I can do by making javascript calls but I am doubtful about doing js calls from java code...

There's nothing wrong with doing JS calls from java. You can read how to do them here .

Unfortunately, I don't think there's a way (even with the html unit driver) to find if an asset has been downloaded (be it an image, or xml file).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM