html - GetElementsByTagName('a') stopped working after server restart -


i have in script:

$link = $ie.document.getelementsbytagname('a') |         where-object {$_.innertext -eq'xxxxxx'} |         select -first 1 

it working fine, , stopped working; stopped working after sever restart , got updated, script still working on machine.

the server has powershell v5.0; while on local machine it's v5.1.

could problem?

i pretty run issues when using ie com object.

try using

$ie.document.ihtmldocument3_getelementsbytagname() 

instead , see if fixes issue, ihtmldocument2/3 methods more reliable on later versions of powershell.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -