Forum Discussion
Hey 678
Could you supply a little more background and the use case?
saying "I need to extract some data at page 5 of a 10 page .html file" needs a little drilling down to resolve the ambiguities!
That said - I once had to extract some html which was a .json attribute so I just used the inbuilt xml parser available via the out of the box functionality.
Cheers,
richie
I am using following peice to read the complete html page but it a very long HTML page
def filename = "C:/Users/ProjectReport.html"
// read all the content of the file into a single string
File fh1 = new File(filename)
def report = fh1.getText('UTF-8')
but i need the part of the page in between lines like
Tag line <TestSuite Results> to Tag line <end of TestSuite Results>
- TanyaYatskovska6 years agoSmartBear Alumni (Retired)
Hi 678,
As far as I understand, you want to parse some report. Is it a ReadyAPI report?
678 wrote:
Tag line <TestSuite Results> to Tag line <end of TestSuite Results>
It's not an HTML tag. This makes me think that it will be much easier if you export your report to the XML format. By using a groovy script, you can easily extract the needed node from an XML file by using XPath. Please read the following article for more information:
https://support.smartbear.com/readyapi/docs/testing/scripts/samples/nodes.html
- 6786 years agoRegular Contributor
Yes, its an ReadyAPI Complete Project report but i need only TestSuite Results should capture from the report
that i am going to use to send an email as body
Related Content
- 4 years ago
- 7 years ago
- 2 years ago
Recent Discussions
- 4 hours ago
- 26 days ago