- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Re: foreach and a response
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-02-2008 12:10 PM
Noodling around in the response map custom query area, it doesn't appear that iTest knows following-sibling.
Re: foreach and a response
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-02-2008 12:38 PM
Re: foreach and a response
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-02-2008 01:02 PM
Re: foreach and a response
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-02-2008 02:17 PM
Man, why does this have to be so hard? I just want to parse an ls command and find the largest SVN number!
If I analyze with the regex ".*", or even (.*)[\s\n\r], and use extraction group number 1, I get empty list items:
image-2.2.2.2_22368.img {} image-2.2.3.0_22313.img {} image-2.2.3.0_22340.img {} image-2.2.3.0_22354.img {} image-2.2.3.1_22466.img {} image-2.2.3.1_22504.img {} image-2.2.3.2_22536.img {} image-2.2.3.3_22649.img {} image-2.2.3.4_22747.img {} image-2.2.4.0_22395.img {} image-2.2.4.0_22427.img {} image-2.2.4.0_22477.img {} image-2.2.4.0_22521.img {} image-2.2.4.0_22552.img {} image-2.2.4.0_22572.img {} image-2.2.4.0_22592.img {} image-2.2.4.0_22594.img {} image-2.2.4.0_22611.img {} image-2.2.4.0_22633.img {} image-2.2.4.0_22654.img {} image-2.2.4.0_22668.img {} image-2.2.4.0_22675.img {} image-2.2.4.0_22716.img {} image-2.2.4.0_22738.img {} image-2.2.4.0_22757.img {} image-2.2.4.0_22784.img {} image-2.2.4.0_22802.img {} image-2.2.4.0_22825.img {} image-2.2.4.0_22851.img {} image-2.2.4.0_22867.img {} image-2.2.4.0_22890.img {} image-2.2.4.0_22901.img {} image-2.2.4.0_22905.img {} image-2.2.4.0_22959.img {} image-2.2.4.0_23022.img {} image-2.2.5.0_23027.img {} image-2.2.6.0_23059.img {} {}If I want to use scriptEval, split [response get_ver] "\n" complains because it passes [response get_ver] to tcl.
If I use foreach i [tclexpr split [response get_ver] "\n"] (or various permutations), tcl complains that variables need a "$" in front.
Maybe I'm just having a bad day...
Re: foreach and a response
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-02-2008 05:13 PM
Doug,
Maybe I'm missing something. But if your goal is just to have a query that returns the largest build number, you can have a query called max_build_number whose query format is max(build_num()). For the response map you posted, this returns 23059, which is the biggest one in your list.
I'm attaching an update to your response map -- using a simpler pattern map (which made more sense to me, but the block map was fine, too).
Re: foreach and a response
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-02-2008 07:07 PM
Re: foreach and a response
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-02-2008 09:31 PM
iTest only supports XPATH 1.0. But in order to support backwards compatibility with FanfareSVT, we inject min, max and avg functions into the standard XPATH 1.0 engine. That is why you can use them.
We will try to add XPATH 2.0 to some future release of itest.
Re: foreach and a response
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-02-2008 09:35 PM
Cool! Think you could get that into the doc? I actually did look in the help to see if max was supported, and it isn't mentioned there.
Re: foreach and a response
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-02-2008 09:37 PM
Re: foreach and a response
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-03-2008 08:53 AM
OK, thanks for the update. The help topic now looks like this:
Supported XPath functions
iTest supports the following XPath functions:http://jaxen.org/apidocs/index.html
To support backward compatibility with FanfareSVT, iTest supports the following additional XPath functions:
min
max
avg
For an XPath language description, see http://www.w3.org/TR/1999/REC-xpath-19991116
