I am looking for a way to extract a specific information and saving it in a String variable. The scenario is the test opens a new browser and hits the URL. This URL creates dynamic IDs of one of the tags that I need to input my test so I cannot parse through an already saved xml file.
I hit the URL and the xml loads like this:
<gift_card_issue_response>
<gift_card_issue_status>00</gift_card_issue_status>
<gift_card_issue_result>00GOOD </gift_card_issue_result>
<gift_card_issue_response_data>
<CardNumber443322</CardNumber>
<PinNumber>322</PinNumber>
<CardType/>
</gift_card_issue_response_data>
</gift_card_issue_response>
I need to extract the the card number and pin number and save them in variables. I tried to access the elements using the css selector or xpath, but it would not locate the tags on the page.
Does someone has some idea how I can extract these texts from the web page itself?