Extracting redirectHtml from JSON response and opening the page in a browser

aa_dfwaa_dfw Posts: 4

I have a test case that spans from Rest client to web browser. My first test is a REST client output of which I need to pass to the browser.
JSON response from the Rest client contains an element with html content. So e.g { "RedirectHTML": "…….”}.
This is the html I need to open from a browser in order to perform some further testing.
I am saving the element from REST response into a JSON Data bank: “Test 1: RedirectHTML”.
I need help with figuring out how to use that data bank element and open that html page in a browser. I think the browser tool expects a URL to be passed and not the html.

Comments

  • Ramiro MartinezRamiro Martinez Posts: 47 admin

    Hi aa_dfw,

    Is there a particular reason why you need to perform a browser test on the html?
    Would an XML assertion on the HTML XML not fit your scenario?
    The general format would be as follows:

    The XML transformer would extract "content only" of the incoming response's html element.

    This would lead to your chained XML assertor, which will have the html as the Expected XML .

    From this step, navigate to configuration and add whichever assertions are needed for your data. Further details on the XML asserter can be found by navigating to:
    Help>Help Content

Sign In or Register to comment.