troubleshooting Question

Powershell need to find this value

Avatar of Leo Torres
Leo TorresFlag for United States of America asked on
PowershellC#.NET ProgrammingWeb Languages and StandardsHTML
24 Comments1 Solution5184 ViewsLast Modified:
OK, I need to find "Run by:" on web page so I need to if it exists return   "Run by:" or True.
$RunByTest = $ie.Document.getElementsByTagName("span") | ? { $_.InnerText -like 'Run by:*' }  |  select  -First 1 -expandProperty classname

right now it returns blank or false because it cant find value on page and value does exists on page.

sample
or here is some sample code
<table style="border-collapse:collapse;width:100%;" class="table" cellpadding="0" cellspacing="0"><tr class="tableRow"><td class="reportTitle"><span class="textItem">Daily Employee Overtime Report</span></td></tr></table></div><table style="border-collapse:collapse;width:100%;" class="table" cellpadding="0" cellspacing="0"><tr class="tableRow"><td class="tableCell"><table style="border-collapse:collapse;width:100%;" class="reportSubtitle" cellpadding="0" cellspacing="0"><tr class="tableRow"><td class="tableCell"><span class="textItem">Run by:</span></td><td class="tableCell"><span class="textItem">WORKBRAIN</span></td></tr></table></td><td class="tableCell"><table style="border-collapse:collapse;width:100%;" class="reportSubtitle" cellpadding="0" cellspacing="0"><tr class="tableRow">
ASKER CERTIFIED SOLUTION
Qlemo
"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 1 Answer and 24 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 24 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros