Jump to content

How to capture the text that is rendered by Chrome?


 Share

Recommended Posts

When I was automating the use of Internet Explorer (via the IE.au3 UDF), there were 2 functions I frequently used: _IEBodyReadHTML and _IEBodyReadText

I am now using Chrome and WD_Core.au3.  I'm using _WD_GetSource in place of _IEBodyReadHTML, but I've not found anything quite like _IEBodyReadText.  Is there such a function -- that will capture the text of a page that is rendered by Chrome?

Thanks...

Geoff

G

Link to comment
Share on other sites

19 hours ago, CYCho said:

First you get body element of the page and then get the text of that element.
 

$sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//body")
$sText = _WD_ElementAction($sSession, $sElement, "text")

Perfect! Worked the first time.  Many thanks, CYCho...

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...