getElementsByClassname method always returns null - by Graham Gold

Status : 

 


2
0
Sign in
to vote
ID 794625 Comments
Status Active Workarounds
Type Bug Repros 2
Opened 7/20/2013 6:03:30 AM
Access Restriction Public

Description

Using invoke-WebRequest, attempting to use the following code to return all elements with the class name "newstitle", with the following code $news always returns nothing:

    $geturl=Invoke-WebRequest http://krpano.com/news/
    $news=$geturl.parsedhtml.body.GetElementsByClassName("newstitle")[0]
    Write-Host  "$news"
Sign in to post a comment.