TestPlan response
Document

response

by Group Public on Friday September 18 2009 @ 12:10:08 (1/1 Points)

API ↪Reference ✑ Reply ✓ Stick It ✗ Ditch It ⚐ Tag It

response is a function which returns an XPath result of the provided XPath on the current document. This allows you to inspect the current state to validate for correctness or to extract values.

Syntax

# List all titles on the page
set %TitleNodes% as response //h1
foreach %Title% in %TitleNodes%
  Notice %Title%
end

Be aware that exactly what response returns depends on the XPath you have provided. This can be numeric, textual, a single node, or a list of nodes. In most cases you don't need to worry about this much since TestPlan is a dynamic language and converts as necessary.

© 2008-2010 edA-qa mort-ora-y
Using Persephone and TestPlan
Tag: