[SOLVED]assertion for null node
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2009
07:19 AM
10-14-2009
07:19 AM
[SOLVED]assertion for null node
Hi,
I use getDomNodes to get multiple nodes.
before extracting values i want to make sure the node is not null.
def videodescr = holder.getDomNodes( " //aetgt:GetVideoMetaDataResponse/aetgt:GetVideoMetaDataResult/aetgt:VideoMetadata/aetgt:Video/@Title" )
assert videodescr != null.
The above assertion doesnt work.
What is the step or function i can use to check that nodes are not null.
I use getDomNodes to get multiple nodes.
before extracting values i want to make sure the node is not null.
def videodescr = holder.getDomNodes( " //aetgt:GetVideoMetaDataResponse/aetgt:GetVideoMetaDataResult/aetgt:VideoMetadata/aetgt:Video/@Title" )
assert videodescr != null.
The above assertion doesnt work.
What is the step or function i can use to check that nodes are not null.
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2009
06:41 PM
10-14-2009
06:41 PM
Hi Usha,
If you mean to check that there are Title attributes then please try
assert videodesc.length > 0
Does that work?
regards!
/Ole
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
If you mean to check that there are Title attributes then please try
assert videodesc.length > 0
Does that work?
regards!
/Ole
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2009
11:39 AM
10-15-2009
11:39 AM
yep this worked for me!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2009
01:41 PM
10-15-2009
01:41 PM
great!
/Ole
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
/Ole
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
