Refer text in section tag of HTML page

Tejas Kore

Board Regular
Joined
Nov 2, 2017
Messages
72
Office Version
  1. 365
Platform
  1. Windows
HTML:
<div class="row">
                            <div class="col-xs-12 form-group">
                                <input type="submit" name="btnSearch" value="Search" id="btnSearch" class="btn btn-primary" />
                            </div>
                        </div>
                    </section>
                    <section id="searchResults">
                        <p class="sectiontitle">
                            Results
                        </p>
                        <p>
                            No items were returned by your search.
                            &nbsp; &nbsp;&nbsp;
        
                        </p>
                        <div>

</div>
                    </section>
                </div>

Hello Friends,
Could you please let me know how can I extract the text "No items were returned by your search." ... I tried with ieApp.document.GetElementsById(searchResults).innerText but no luck yet.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
I tried with ieDoc.getElementsById("searchResults").getElementsByTagName("p")(1).innerText . But no luck
 
Upvote 0
It should be getElementByID, without the s...

VBA Code:
ieDoc.getElementById("searchResults").getElementsByTagName("p")(1).innerText
 
Upvote 0
Solution

Forum statistics

Threads
1,223,632
Messages
6,173,469
Members
452,516
Latest member
archcalx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top