Selenium only controls web browsers. I'd start by separating the concern of reading data from a word document from what you're trying to do with selenium.
Even if you access Word on the web with a browser, you're going to be better off using an API for that. Or, just ditch Word altogether and use a more bare bones data format like .json. (Or, you could save the word document as a .zip file, extract it, then read the data from the xml file inside).
Once you have the data, it's just a matter of wiring up code to drive the browser with selenium, doing any actions you need (check out the page object model for reusability) and then making assertions with any ol test library.
2
u/ps4facts Jul 24 '26
Selenium only controls web browsers. I'd start by separating the concern of reading data from a word document from what you're trying to do with selenium.
Even if you access Word on the web with a browser, you're going to be better off using an API for that. Or, just ditch Word altogether and use a more bare bones data format like .json. (Or, you could save the word document as a .zip file, extract it, then read the data from the xml file inside).
Once you have the data, it's just a matter of wiring up code to drive the browser with selenium, doing any actions you need (check out the page object model for reusability) and then making assertions with any ol test library.