+1 vote
asked Nov 18, 2015 in QA Wizard Pro by nico (8,200 points)

2 Answers

+2 votes
Best answer
'Extract and print out the ticket number that the "Thank You" page returns
htmlText = Browser("WysiCorp  Thank You").ExtractHTMLToString() 'Gets the HTML for the Thank You page
ticketNum = HTMLFindByID(htmlText, "ticket") 'Finds the ticket number within the page HTML

if ticketNum = "" then
    Fail("Could not find the ticket number")
    PrintLn("The ticket number is " & ticketNum)
end if


answered Nov 18, 2015 by nico (8,200 points)
+1 vote

XPath can solve this.

id = "ticket"
ticketNum = Browser("WysiCorp  Thank You").GetControlFromXPathQuery("//*[@id='" +  id + "']").Property("Inner Text")

Alternatively, you could populate the repository and interact with the given control, then getting the Inner Text property will get the text that you want.

ticketNum = Window("WysiCorp  Thank You").HTMLElement("ticket").Property("Inner Text")


answered Jan 6, 2016 by Todd (520 points)
248 questions
262 answers
2,047 users