Hi,
I am trying to get text from the MS Word document which is opened.
Actually what I am doing:
1. Open MS Word and create new document
2. Type "some words" on the document page
3. Try to verify text "some words" exists on the page
I need something like .GetText/.Text attribute but it is not available for such container:
Assert.Equals(repo.WordApp.Document.GetText(), "some words")
I have tried to do it by image validation/comparison, but it is not stable solution.
Thanks in advance,
Ostap
How to get text from opened MS Word document ?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to get text from opened MS Word document ?
Hi Ostap,
Have you already added the word process or the specific WordDoc class name to the GDI Capture List as described at the following page: Testing of Legacy Applications?
After you added it you should be able to track the text elements of a Word document.
Regards,
Markus
Have you already added the word process or the specific WordDoc class name to the GDI Capture List as described at the following page: Testing of Legacy Applications?
After you added it you should be able to track the text elements of a Word document.
Regards,
Markus