powershell - "Method Not found" error when calling GetElementsbyClassName -


i created powershell automation script , gave friend when run it, said

method invocation failed because [mshtml.htmlbodyclass] not contain method named 'getelementsbyclassname'. @ c:\users\עמית\documents\asaf.ps1:22 char:3 +   $a=$docs.body.getelementsbyclassname("fadeout-scroll")     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + categoryinfo          : invalidoperation: (:) [], runtimeexception     + fullyqualifiederrorid : methodnotfound

why happened?

we both have ie11, .net 4.5, visual studio, have function , not.

and looks here in computer ie console have function:

enter image description here

but powershell not:

enter image description here

how update powershell?

found after alot of time:

the missing want microsoft core xml


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -