Object doesn't exist in different scenario
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Object doesn't exist in different scenario
In a condition, where i am using If....elseIf. I need to check more than 2 items to be exist or not. so i am doing like:
Set A = '(element page address)
Set B = '(element page address)
Set C = '(element page address)
but when execution comes to these lines, it gives me "Object doesn't exist". Please understand my question first. If that element exist on application Example:
1) If A exists but B and C not, in that condition execution will go through all the lines Set A, Set B, Set C . Because object A exist so it will not give me error but for gone through B and C only it give me error like"Object doesn't exist".
Yes it will not effecting my script execution but i am getting error in test log, So how should i handle it
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is something inheritance with test complete..
You are checking exists property of B
(for easy explanation take visible property )
if B is not there you can not check it's visible property value( true or false). It gives you an error.
sameway if B is not there, if you check of exist property, will give you error.
To avoid getting error you can use wait methods as shown below
