Ask a Question

Invalid class string: cannot obtain ClassID.

Occasional Contributor

Invalid class string: cannot obtain ClassID.

I am trying to do this example:

TestWithXPath(): but in the line   Doc = Sys.OleObject["Msxml2.DOMDocument.4.0"] appear the error Invalid class string: cannot obtain ClassID.

Esteemed Contributor

It's possible that you don't have version 4.0 of MSXML2 installed.


Change that line to


Doc = Sys.OleObject["Msxml2.DOMDocument"]

and try again

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Showing results for 
Search instead for 
Did you mean: