I am creating a library for analyzing webpages. At the moment I use Selenium to access elements in a webpage with xpath.
I was considering to replace Selenium with some offline xpath tool. However after thinking I got suspicious if it is going to work since javascript might be altering the DOM. In that case it would be impossible to use an xpath tool that doesn't render the webpage.
So is Selenium running xpaths against the DOM or the actual HTML file?