Forum Discussion
I need some help with adding a condition to read a value and then identify the results. Like if failed then i can read a set of properties using xpath. If passed then i can read a set of properties using different xpaths. Thanks in advance
- nmrao6 years agoChampion Level 3
Things is the targeted test result is known to you before even testing.
If the test is for positive case, that should pass the respective assertion(s).
If the test is negative case, then also the test should pass with respective assertion(s).Any case, assertions should be passed.
So, design the test cases accordingly.- rprsekhar6 years agoNew Contributor
Thanks Mr. nmrao for the response. nmrao
I want to put these conditions in same script.
The pass and failure depends on the input i supply for same request. So, i am trying to read both conditions in same script. Based on the xpaths(which depends on the response), it should read the required xpath and ignore the other part. I have to read the xpaths. If xpath1 exists then i have to read the response 1 else if xpath 2 exists i have to read the response2.
Thanks in advance
- rprsekhar6 years agoNew Contributor
This problem is resolved. I used contains method for conditioning by converting entire response as string. It worked for my case.
Thanks for your help. :)
Related Content
- 7 years ago
Recent Discussions
- 6 hours ago
- 4 days ago