-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Open
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productKeepOpenThe bot will ignore these and not auto-closeThe bot will ignore these and not auto-closeWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Description
Summary of the new feature / enhancement
Coming from Stackoverflow question: Extract text from html with powershell
And probably ties into #4553 (which I simply don't fully understand)
Just like Member-Access Enumeration for native .Net and PowerShell objects, I would expect to be able to enumerate ComObject members (System.MarshalByRefObject?) in a similar way:
$String = '<div>Some text</div>'
$Unicode = [System.Text.Encoding]::Unicode.GetBytes($String)
$Html = New-Object -Com 'HTMLFile'
$Html.write($Unicode)
$Html.getElementsByTagName('div').innerTextExpected
Some TextActual
No output
Workarrounds
@($Html.getElementsByTagName('div')).innerText
$Html.getElementsByTagName('div') |% { $_.innerText }Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productKeepOpenThe bot will ignore these and not auto-closeThe bot will ignore these and not auto-closeWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime